/design-patterns-in-tcl

A collection of popular design patterns implemented in TCL language with TclOO package

Primary LanguageTclBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

design-patterns-in-tcl

A collection of popular design patterns implemented in TCL language with TclOO package

Collection contains :

  • Abstract factory - Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
  • Bridge - Decouple an abstraction from its implementation so that the two can vary independently.
  • Builder - Separate the construction of a complex object from its representation so that the same construction process can create different representations.
  • Chain of responsibility - More than one object has chance to handle request.
  • Command - Request as object to log requests, expand API by unavailable methods.
  • Composite - Compose objects into tree structures to represent part-whole hierarchies.
  • Decorator - Extend method functionality without changing method.
  • Facade (TBD)
  • Flyweight (TBD)
  • Interpreter - Define representation for some grammar.
  • Iterator
  • Mediator - Simplifing communication between objects.
  • Memento - Store internal object state and restore on request.
  • Observer - Notify all registered objects about changes.
  • Singleton - Only one instance of this kind of object possible.
  • State - Object state as a class - an object oriented state machine.
  • Strategy - Different algorithms which can be used interchangeably.
  • Visitor - Different algorithms which can be used interchangeably.

Theory and additional meterials

Design patterns implemented according to the tips and documentation available on the sourcemaking.com webpage and in the Design Patterns: Elements Of Reusable Object-Oriented Software book