Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Scala Design Patterns

You're reading from   Scala Design Patterns Write efficient, clean, and reusable code with Scala

Arrow left icon
Product type Paperback
Published in Feb 2016
Publisher
ISBN-13 9781785882500
Length 382 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ivan Nikolov Ivan Nikolov
Author Profile Icon Ivan Nikolov
Ivan Nikolov
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. The Design Patterns Out There and Setting Up Your Environment FREE CHAPTER 2. Traits and Mixin Compositions 3. Unification 4. Abstract and Self Types 5. Aspect-Oriented Programming and Components 6. Creational Design Patterns 7. Structural Design Patterns 8. Behavioral Design Patterns – Part 1 9. Behavioral Design Patterns – Part 2 10. Functional Design Patterns – The Deep Theory 11. Functional Design Patterns – Applying What We Learned 12. Real-Life Applications Index

Preface

Software engineering and design has existed for many years now. We use software almost everywhere in our lives, and this makes programs extremely distinct in terms of the problems they solve.

Regardless of the number of things that can be done with programming, there are still some specific features that repeat over and over again. Over time, people have come up with some best practices that help to tackle specific patterns that emerge in programs. These are called design patterns.

Design patterns solve not only commonly occurring problems, but also deal with language limitations. No matter what the specific design patterns are and what single issue they solve, all of them in the end aim at producing better software. This includes improved readability, simplicity, easier maintainability, testability, extendibility, and efficiency. Today, design patterns are an important part of every good software engineer's arsenal.

Together with the large number of problems that we tackle with programming, there are also many languages that we can use. Every language is different and has its strengths and weaknesses, so we also need to take this into consideration when doing something. In this book, we will look at design patterns from the point of view of Scala.

Scala has become extremely popular in the last couple of years. Many companies use it in production for various purposes—big data processing, writing APIs, machine learning, and so on. Switching to Scala from popular languages, such as Java, turns out to be quite simple because it is a hybrid of an object-oriented language and a functional programming language. Using Scala to its full potential, however, requires us to be familiar with not only the object-oriented features, but also with the functional ones. The use of Scala could improve performance and the time it takes to implement the features. One of the reasons is the really high expressivity of Scala.

The fact that Scala is close to object-oriented languages means that many of the design patterns for object-oriented programming are still applicable here. The fact that it is also functional means that some other design patterns also applicable, and some of the original ones could be modified to better fit the paradigm of Scala. In this book, we will be focusing on all of them—we will go through some specific features of Scala and then we will look at the popular Gang of Four design patterns viewed from the Scala perspective. We will also become familiar with design patterns that are exclusive to Scala, and we will understand different functional programming concepts, including monoids and monads. Having meaningful examples always makes learning and understanding easier. We will try to provide examples that you can easily map to real problems that you would potentially be solving. We will also introduce some libraries, which will be useful for anyone who writes real-world applications.

lock icon The rest of the chapter is locked
Next Section arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image