Posts

  • S/O - Adapter

    • Category: structural
    • Type: object
    • Motivation: make hunter hunt wild dog without change the hunter
  • S/C - Adapter

    • Category: structural
    • Type: class
    • Motivation: make hunter hunt wild dog without change the hunter
  • C/O - Singleton

    • Category: Creational
    • Type: object
    • Motivation: Ensure only one object of a particular class is ever created: there is only one president of a country at a time.
  • C/O - Prototype

    • Category: Creational
    • Type: object
    • Motivation: create object base on an existing object though cloning
  • C/O - Builder

    • Category: Creational
    • Type: object
    • Motivation: to avoid too many parameters in constructor method (create object with several options)