WHAT ARE DESIGN PATTERNS?
Design patterns are guidelines for identifying and solving common design problems in object-oriented programming. Unlike frameworks or class libraries, design patterns are abstract, providing recommendations on how to solve specific kinds of programming problems without providing fully fleshed-out code to implement those recommendations. They distill years of software programming experience into a set of organizational principles for object-oriented application architecture.
Design patterns were popularized and formalized in the 1990s by the publication of Design Patterns: Elements of Reusable Object Oriented Software,1 but the ideas predate the book. Many of the core design patterns, like Iterator and Singleton, are widely used and familiar to most Java and C++ programmers. Other patterns, like Builder, are less frequently used but are highly useful in the appropriate situation.
Why Use Design Patterns?
Design patterns are useful for two reasons. The obvious...