Book Image

Scala Design Patterns - Second Edition

By : Ivan Nikolov
Book Image

Scala Design Patterns - Second Edition

By: Ivan Nikolov

Overview of this book

Design patterns make developers’ lives easier by helping them write great software that is easy to maintain, runs efficiently, and is valuable to the company or people concerned. You’ll learn about the various features of Scala and will be able to apply well-known, industry-proven design patterns in your work. The book starts off by focusing on some of the most interesting and latest features of Scala while using practical real-world examples. We will be learning about IDE’s and Aspect Oriented Programming. We will be looking into different components in Scala. We will also cover the popular "Gang of Four" design patterns and show you how to incorporate functional patterns effectively. The book ends with a practical example that demonstrates how the presented material can be combined in real-life applications. You’ll learn the necessary concepts to build enterprise-grade applications. By the end of this book, you’ll have enough knowledge and understanding to quickly assess problems and come up with elegant solutions.
Table of Contents (14 chapters)

The Design Patterns Out There and Setting Up Your Environment

In the world of computer programming, there are multiple ways to create a solution to a given problem. However, some might wonder whether there is a correct way of achieving a specific task. The answer is yes; there is always a right way, but in software development, there are usually multiple right ways to achieve a task. Some factors exist that guide the programmer to the right solution and, depending on them, people tend to get the expected result. These factors could define many things—the actual language being used, the algorithm, the type of executable produced, the output format, and the code structure. In this book, the language is already chosen for us—Scala. There are, however, a number of ways to use Scala, and we will be focusing on them—the design patterns.

In this chapter, we will explain what design patterns are and why they exist. We will go through the different types of design patterns that are out there. This book aims to provide useful examples to aid you in the learning process, and being able to run them easily is key. Hence, some points on how to set up a development environment properly will be given here. The top-level topics we will go through are as follows:

  • What is a design pattern and why do they exist?
  • The main types of design patterns and their features
  • Choosing the right design pattern
  • Setting up a development environment in real life

The last point doesn't have much to do with design patterns. However, it is always a good idea to build projects properly, as this makes it much easier to work in the future.