Gamma, Helm, Johnson, Vlissides
Gang of four
23 patterns
Defined by
Intent Aka Motivation Applicability Structure Participants Collaborations Consequences Implementation techniques Known uses Related patterns
Design patterns
Tried and tested solutions for recurring problems in programming
Good patterns
You must know
Patterns are classified into
Creational - concerned with object construction and the installation process
Structural - concerned with composition of classes/objects: how classes and objects are composed to form larger structures
Behavioural - concerned with the way classes and objects interact/patterns of communication between classes
Interface
Set of methods (and variables) that one class allows other classes to access
A CLASS i n t e r f a c e speaking abstractly is the collection of methods and fields that the class permits other classes to access.
A class implements a given interface by means of the code in its methods
Interface defined by what it does, not how its implemented
Structural patterns
Creational patterns
Behavioural patterns