Tag Archives: design-patterns

Design Patterns: Template Method

This method consist in having a Template for your classes. It solves the problem of having multiple classes with duplicated code. Instead we can just create an abstract class and make our classes inherit from it. This way we can implement the common functionality in the parent class and have other classes inherit the unique behavior from a unique place.
Continue reading

Design Patterns: Adapter

2015-43-09 10-43-09-063 The adapter is used when you want to integrate a class from another source into your code.

It could also be used to enable the use of legacy classes into your new architecture. It can also be used with classes that needs very specific methods to complete some work, like database access classes, and then they could be adapted to use a common interface.
Continue reading