Programming in the Large with Design Patterns (2012)
For several years I ran a web site that offered educational materials on a variety of software engineering topics. The most popular search term at the site by a considerable margin was “design patterns”. Design patterns have captured the attention of the developer community, and for good reason.
In a word, the reason is design. Good design is critical to the long-term success of nontrivial computer programs. Companies are willing to pay top dollar for talented designers and architects that can deliver software that is testable, extensible and free from unnecessary complexity.
One option for acquiring the expertise needed to be an effective designer is to spend 10-15 years working as a designer or as an apprentice to a designer. Learning from first-hand experience has many advantages but the one big disadvantage is the time it takes to acquire the knowledge. It can take a decade or more to experience a broad range of design problems and even longer to experience similar problems in different contexts. Another more efficient route to becoming a skilled designer is to study design patterns. Design patterns capture expert knowledge in a form that facilitates learning and reuse.
This book makes learning design patterns easy. It starts with a general introduction to all types of programming patterns and goes on to describe 10 of the most popular design patterns in detail: Singleton, Iterator, Adapter, Decorator, State, Strategy, Factory Method, Observer, Facade and Template Method.
Each pattern is introduced with a non-technical example or story that illustrates the pattern concept. The details are described with Java code examples and UML diagrams. Each pattern description also includes a discussion section that offers more in-depth information for the curious. For example, the discussion section for Singleton explains why introducing a singleton is only marginally better than using a global variable.
Instructor resources, including PowerPoint presentation slides and review questions with answers, are available at the companion website http://programminglarge.com/.