Book Image

Scala Design Patterns

By : Ivan Nikolov
Book Image

Scala Design Patterns

By: Ivan Nikolov

Overview of this book

Scala has become increasingly popular in many different IT sectors. The language is exceptionally feature-rich which helps developers write less code and get faster results. Design patterns make developer’s 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 will learn about the various features of Scala and 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 features of Scala while using practical real-world examples. We will also cover the popular "Gang of Four" design patterns and show you how to incorporate functional patterns effectively. By the end of this book, you will have enough knowledge and understanding to quickly assess problems and come up with elegant solutions.
Table of Contents (20 chapters)
Scala Design Patterns
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Summary


In this chapter, we saw how to apply some of the advanced concepts of the Scala programming language in order to tackle some of the problems that commonly emerge in actual software projects. We looked at the lens design pattern, where we also had our first encounter with the brilliant Scalaz library. We saw how to implement dependency injection without any extra libraries in Scala, and what it is used for. We also learned how we can write extensions to the libraries for which we don't have any modification access. Last but not least, we looked at the type class design pattern, lazy evaluation in Scala, partial functions (also known as function currying), duck typing, memoization, and implicit injection. By now, you should have quite an extensive knowledge of the language possibilities of Scala as well as design patterns, which could be used together to write exceptional software.

In the next and last chapter of this book, we will focus a bit more on the Scalaz library, and we will...