Software
  • Introduction
  • Code craft
    • Clean code
    • Reusable code
    • Refactoring
    • Code smells
  • Service craft
  • Software Principles
  • Big Data
    • Introduction
    • Data modelling
  • Patterns
    • Enterprise patterns
    • Software patterns
  • Agile & proj management
    • Scrum vs Kanban
    • Kanban
    • Scrum
  • Conflict management
  • Reading
  • Software Architecture
    • Architecture components
Powered by GitBook
On this page
  • Creational
  • Structural
  • Behavioural

Was this helpful?

  1. Patterns

Software patterns

PreviousEnterprise patternsNextAgile & proj management

Last updated 5 years ago

Was this helpful?

Aka how to code and not reinvent the bloody wheel again

Stolen shamelessly from

Creational

  • Factory = create an object by specifying the type

  • Abstract factory = create an object factory by specifying the type

  • Builder = build a complex object by separating the construction from the representation (construction is outside the class definition) and construction should be like an assembly.

  • Pool = create a pool of objects to reuse, instead of create/destroy cycles

  • Singleton = single instance / manager object

  • Prototype = create object by copying an existing one

Structural

  • Adapter = adapt from 1 interface to another

  • Bridge = separate object abstraction(interface) from implementation, and rely on abstraction ( dependency inversion)

  • Composite

  • Decorator

  • Facade

  • Flyweight

  • Private class data

  • Proxy

Behavioural

  • Chain of responsibility

  • Command

  • Interpreter

  • Mediator

  • Memento

  • Null object

  • Observer

  • State

  • Strategy

  • Template

  • Visitor

https://sourcemaking.com/design_patterns