Scala Design Patterns : Design modular, clean, and scalable applications by applying proven design patterns in Scala, 2nd Edition.
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. In this book, you'll learn about the various features of Scala and will be able to apply well-known, industry-p...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2018.
|
Edición: | 2nd ed. |
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: The Design Patterns Out There and Setting Up Your Environment; Design patterns; Scala and design patterns; The need for design patterns and their benefits; Design pattern categories; Creational design patterns; The abstract factory design pattern; The factory method design pattern; The lazy initialization design pattern; The singleton design pattern; The object pool design pattern; The builder design pattern; The prototype design pattern; Structural design patterns.
- The adapter design patternThe decorator design pattern; The bridge design pattern; The composite design pattern; The facade design pattern; The flyweight design pattern; The proxy design pattern; Behavioral design patterns; The value object design pattern; The null object design pattern; The strategy design pattern; The command design pattern; The chain of responsibility design pattern; The interpreter design pattern; The iterator design pattern; The mediator design pattern; The memento design pattern; The observer design pattern; The state design pattern; The template method design pattern.
- The visitor design patternFunctional design patterns; Monoids; Monads; Functors; Scala-specific design patterns; The lens design pattern; The cake design pattern; Pimp my library; Stackable traits; The type class design pattern; Lazy evaluation; Partial functions; Implicit injection; Duck typing; Memoization; Choosing a design pattern; Setting up the development environment; Installing Scala; Tips for installing Scala manually; Tips for installing Scala using SBT; Scala IDEs; Dependency management; SBT; Maven; SBT versus Maven; Summary; Chapter 2: Traits and Mixin Compositions; Traits.
- Traits as interfacesMixing in traits with variables; Traits as classes; Extending classes; Extending traits; Mixin compositions; Mixing traits in; Composing; Composing simple traits; Composing complex traits; Composing with self-types; Clashing traits; Same signatures and return types; Same signatures and different return types traits; Same signatures and return types mixins; Same signatures and different return types mixins; Multiple inheritance; The diamond problem; The limitations; Linearization; Rules of inheritance hierarchies; Linearization rules; How linearization works; Initialization.
- Method overridingTesting traits; Using a class; Mixing the trait in; Mixing into the test class; Mixing into the test cases; Running the tests; Traits versus classes; Summary; Chapter 3: Unification; Functions and classes; Functions as classes; Function literals; Functions without syntactic sugar; Increased expressivity; Algebraic data types and class hierarchies; ADTs; Sum ADTs; Product ADTs; Hybrid ADTs; The unification; Pattern matching; Pattern matching with values; Pattern matching for product ADTs; Modules and objects; Using modules; Summary; Chapter 4: Abstract and Self Types.