Structural Patterns
GOF patterns were the first design patterns described
GOF patterns were the first design patterns described
The Decorator pattern enables us to change the behavior of an object by hiding the contained functions and adding new functionalities around it. It is also a common way to avoid the limits of single inheritance by multiple interface implementations (composition over inheritance). Usage This pattern finds its typical …
Read MoreThe Composite Pattern enables us to collect objects into trees that can be easily explored. The Parent represents the access point to the tree, where it in fact will be a Container, usually. The container will be able to contain other Container objects or Leaf objects. Often the sublcasses or the leaves can be …
Read MoreThe adapter aims to be a converter between two specific interfaces: one belonging to “our” side of the application, the other to the library or other tool we need to interact with. This is very important, because it enables us to delay decisions, as the choice of a spcific implementation of the adapter …
Read More