Write efficient, clean, and reusable code with Scala
About This BookUnleash the power of Scala and apply it in the real worldIncrease your efficiency by leveraging the power of Creational, Structural, Behavioural, and Functional design patternsBuild object oriented and functional applications quickly and effectivelyWho This Book Is ForIf you want to increase your understanding of Scala and apply it to real-life application development, then this book is for you. We've also designed the book to be used as a quick reference guide while creating applications. Previous Scala programming knowledge is expected.
What You Will LearnImmerse yourself in industry-standard design patterns—structural, creational, and behavioral—to create extraordinary applicationsFeel the power of traits and their application in ScalaImplement abstract and self types and build clean design patternsBuild complex entity relationships using structural design patternsCreate applications faster by applying functional design patternsIn DetailScala 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.
Style and approachThe design patterns in the book will be explained using real-world, step-by-step examples. For each design pattern, there will be hints about when to use it and when to look for something more suitable. This book can also be used as a practical guide, showing you how to leverage design patterns effectively.
Personally it's my favorite Scala book and it is quite good at filling the knowledge gap I have when trying to apply Design Patterns from Java (among other languages).
The books starts to build you the needed Scala knowledge and language features you have before reviewing a single design pattern. In fact the first reviewed design pattern is ~190 pages in.
This is imo the right approach to this. Most Design Patterns books jump right into the design patterns before you even understand the "most valuable" language features. This results into Scala code written as if it was Java, Ruby as if it was Java and etc.
I totally recommend this book to anyone seriously using Scala.
I enjoyed it. Covers all the GoF patterns using Scala along with Monoids, Functors, Monads and some other Scala specific patterns like the Cake Pattern for Dependency Injection. The writing and examples are clear and well planned (which also all compiled which was nice!). The chapters on Monoids, Functors, and Monads were also very good guiding through creating and implementing each along with use cases and there rational. I'd recommend this to people learning Scala but who are past the basics (so have an idea of the functional features and the likes of traits, case classes, and lists). It is not essential by any means but should be more popular than it currently is among Scala Devs.
I read this book because there is no equivalent book for Kotlin. My goal was to write a Kotlin version of the examples. For the most part, I achieved this goal. The exceptions where those that depended on an external library, for which there was no Kotlin equivalent. While I new nothing about Scala, I learned about both Scala and Kotlin. Overall, this book was worth the time and effort.