Software Design Patterns
Software Design Patterns
Builder
Factories
Prototype
Singleton
Adapter
Bridge
Composite
Decorator
etc etc
Design Patterns
Design Patterns can be seen as repeatable solutions to common problems arising in software design. They provide a great, language-agnostic way of talking about software architecture.
"Head First Design Patterns" explains simply:
Design patterns don't go directly into your code, they first go into your BRAIN. Once you've loaded your brain with good working knowledge of patterns you can start to apply them to your new designs There are a number of benefits to considering using a design pattern:
Helps your system prepare for accommodating change - an inevitability of software development
Allows for a shared language when describing a system - you can "say more with less"
Can lead to a better designed system (through appropriate use of a design pattern)
There are 23 'Gang of Four' patterns that are generally considered the foundation for all other patterns. They are categorised into three groups: Creational, Structural and Behavioural.
Criticisms
SourceMaking highlights some of the criticisms of using design patterns:
Targets the wrong problem
Lacks formal foundations
Leads to inefficient solutions
Does not differ significantly from other abstractions
Some argue that design patterns ultimately boil down to good software design with careful consideration of SOLID principles. Jeff Atwood also has some thoughts on design patterns
Last updated