A summary of the best books you can read for learning design patterns
The next step after learning a programming language is to master the fine art of design patterns. Design Patterns help you solve common problems when developing software. For example: how can a developer make sure only one object can be created in total? Well, the Singleton pattern can help you with that! This page contains a review of all the best books you can find for learning design patterns.
1: Design Patterns: Elements of Reusable Object-Oriented Software
The design patterns: elements of reusable object-oriented software is one of the industry standards. This book is well written and describes the patterns in depth. It is often referred as Gang of Four design patterns (because of the four authors). If you are looking for a good book, then look no further.
The book starts with a case study of designing a document editor. It shows the reader the design process for new software and the problems one might encounter. In this case study a number of questions pop up: how will we handle user interactions? How will we support multiple themes e.g. a normal and a black theme.
The remainder of the book handles the “Design Patterns Catalog”. These patterns are logically grouped: all patterns related to creating objects can be found in the creational patterns. Patterns the handle issue with the structure of you system are called structural patterns. The last and biggest collection of patterns are called the behavioural patterns. The handle problems related to the execution of you program.
Each pattern is split into multiple sections:
Intent: Gives a one sentence description of the patterns
Known as: Other names of the similar pattern
Motivation: In the motivation you will learn how the patterns works and what problem it solves.
Applicability: Defines all the possible scenarios when you can use this pattern.Structure: Describes the abstract class diagram for this pattern
Consequences: The benefits and implications of using the pattern
Implementation: The different aspects of implementing this pattern. Several examples are given in c++
Known uses: examples of real world cases when this pattern was used
Related pattern: How the pattern can be used with other patterns.
Because of the way the catalog is organised it is a great way of learning each pattern individually and use the book a reference work afterwards. You will find yourself browsing through this book a lot when designing software. Finding a pattern that might help you solve your problem.
Great reference book for looking up design patterns
Examples are given in c++
Web applications were not used as examples
The same structure for each patterns makes it repetitive and boring
This is a great book to learn design patterns. Each pattern is explained in depth and can be overwhelming. But if you take your time, this book will be worth it.
The head first design patterns book takes on a less academic approach compared to the GoF design patterns book. It also uses Java as its way to explain how patterns work. It even explains how some patterns are implemented in Java itself e.g. the Observer pattern.
This book is organised to learn design patterns by using a combination of theory in the form of a sample application and practice. For practice is has some fun concepts like a pattern crossword puzzle or blocks of code that you need to piece together. Other exercises include creating class diagrams and answering questionnaires.
This book is really written as a do it yourself book. You should be prepared to extensively write in the book and even maybe cut out the paper to re-arrange the code.
The book does not contain all patterns and once you have finished it, it is not easy to use it as a reference book afterwards.
Fun way to learn patterns
Lots of exercises
Does not contain all patterns
It really assumes you are good with Java
Cannot easily be used as a reference guide
This book is great if you want to learn design patterns in a less academic way.