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)

Summary

By now, we have a fair idea about what a design pattern means and how it can affect the way we write our code. We've iterated through the most famous design patterns out there, and we have outlined the main differences between them. We saw that in many cases, we could use Scala's features in order to make a pattern obsolete, simpler, or different to implement compared to the classical case for pure object-oriented languages. This book will show you how Scala makes it easier to write high-quality code.

Knowing what to look for when picking a design pattern is important, and you should already know what specific details to watch out for and how important specifications are.

Last but not least, we advise you to run the examples in this book, and we have provided some pointers that should make this really easy. In some cases, creating a complete solution using SBT or Maven might be too much hassle and somewhat unnecessary, but we believe it is a good practice to follow. Additionally, the approaches we explained are used throughout the industry and will be beneficial outside the scope of this book.

In the next chapter, we will get straight to the practical part of this book, where we will look at traits and mixing compositions, what they are useful for, and how and when to use them.