Scala design patterns
Enlarge text Shrink text- Book
Write efficient, clean, and reusable code with Scala About This Book Unleash the power of Scala and apply it in the real world Increase your efficiency by leveraging the power of Creational, Structural, Behavioural, and Functional design patterns Build object oriented and functional applications quickly and effectively Who This Book Is For If 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 Learn Immerse yourself in industry-standard design patterns - structural, creational, and behavioral - to create extraordinary applications Feel the power of traits and their application in Scala Implement abstract and self types and build clean design patterns Build complex entity relationships using structural design patterns Create applications faster by applying functional design patterns In Detail 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. Style and approach The 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.
Title |
Scala design patterns : write efficient, clean, and reusable code with Scala / Ivan Nikolov. |
---|---|
Additional Titles |
Write efficient, clean, and reusable code with Scala |
Edition |
1st edition. |
Publisher |
Birmingham : Packt Publishing |
Creation Date |
2016 |
Notes |
Includes index. |
Content |
Cover Copyright Credits About the Author Acknowledgments About the Reviewer www.PacktPub.com 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 patternsThe adapter design pattern The 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 patternThe visitor design pattern Functional 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 How to choose a design pattern Setting up the development environment Installing Scala Scala IDEs Dependency management SBT Maven SBT versus Maven Summary Chapter 2: Traits and Mixin Compositions Traits Traits as interfaces Mixing in traits with variablesTraits 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 traits 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 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 Chapter 4: Abstract and Self Types Abstract types |
Series |
Community experience distilled |
Extent |
1 online resource (383 p.) |
Language |
English |
National Library system number |
997010719463105171 |
MARC RECORDS
Have more information? Found a mistake?