Patterns

From sheep
Revision as of 21:16, 14 September 2021 by Martin (talk | contribs) (Created page with "== Strategy Pattern == Where algorithms are chosen at runtime Image:strategy.png == Visitor Pattern == Separate algorithm from structure Allows adding new methods to e...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Strategy Pattern

Where algorithms are chosen at runtime

Strategy.png

Visitor Pattern

Separate algorithm from structure

Allows adding new methods to existing structure

Limitation:

  • concrete visitor tied to what concrete elements exist
  • adding a new concrete element => modifying all visitor algorithms & creating new concrete visitor

Visitor.png