Definitions: Christopher Alexander says “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem in such a way that you can use this solution a million times over, without ever doing it the same way twice”.

As young children learn about good and evil from fairy tails, beginning software engineers learn about good design (design patterns) and bad design (anti-patterns).

History: 1987 Ward and Kent inspired by Alexander’s work in Architecture created 5 patterns for guiding SmallTalk programmers and presented it in OOPSLA ’87. Meanwhile Cope compiles idioms for C++ which published in ’91 (Advanced C++ Programming Styles and Idioms). ’90 to ’94 various GoF met and published Design Patterns: Elements of Reusable Object-Oriented Software. Other notable names are Jim Coplien, Doug Lea, Desmond D’Souza, Norm Kerth, Wolfgang Pree and others. Hillside Group and PLoP conference are major groups in this field.

Each pattern defines following attributes:
The Name:
The Problem:
The Solution:
The Consequences:

Why Patterns: To find pertinent objects, factor them into classes at the right granularity, establish relationships between them and design a flexible interface. Design should be specific enough for the problem at hand, but general enough to address future problems (scale up or down).

Books: Design Patterns: Elements of Reusable Object-Oriented Software, Pattern-Oriented Software Architecture, Volume 1, Pattern-Oriented Software Architecture, Volume 2, Patterns of Enterprise Application Architecture, Enterprise Integration Patterns

Architectural Patterns
Structural organization for software systems
It provides a set of predefined sub-systems, specifies their responsibilities, and includes rules for establishing relationships between them
e.g. 3-tier database systems (Database, Intermediate DB Layer, User-Application), Client/Server, Component (Module) -Based Software Systems, Feedback Systems
Event-Driven Systems

Design Patterns
Design Patterns: Elements of Reusable Object-Oriented Software written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (also called the Gang of Four Book or GOF)
Basic Concepts:  Inheritance vs. Composition, Code to interface
Types: Creational Patterns deal with object creation at run-time
Structural Patterns deal with the composition of objects and classes
Behavioral Patterns deal with the way in which classes or objects interact and distribute responsibility

GoF Pattern List
Creational Patterns
Abstract Factory, Builder, Factory Method, Prototype, Singleton
Structural Patterns
Adapter, Bridge, Composite, Container, Decorator, Façade, Flyweight, Proxy
Behavioral Patterns
Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Multiple, Dispatch, Observer, State, Strategy, Template Method, Visitor

Other Patterns:

Concurrency Patterns
Data Access Patterns
Enterprise Patterns
Real-Time Patterns

Idioms are lower level patterns than general design patterns; they are often specific to a programming language, and usually only encompass a few lines of code
Idioms however are important to understand, and it’s often crucial to pick up the particular idioms of a language to use it properly

AntiPatterns, like their design pattern counterparts, define an industry vocabulary for the common defective processes and implementations within organizations. Deadliest hit list begins with the Blob, where one object does most of the work in a project, and proceeds to Continuous Obsolescence, where technology changes so quickly that developers can’t keep up. Some of the more entertaining antipatterns include the Poltergeist (where do-nothing classes add unnecessary overhead), the Boat Anchor (a white elephant piece of hardware or software bought at great cost) and the Golden Hammer (a single technology that is used for every conceivable programming problem).