Home » Tag Archives: Design Patterns

Tag Archives: Design Patterns

Behavioural Design Patterns: Iterator

The iterator pattern is one of the most used patterns from the behavioural ones. Most of the times you use it without even noticing it. Supposing you have a container with elements and you want to traverse them. Iterating the elements might differ based on the container, retrieval method etc. By using the iterator pattern we can decouple the algorithms ...

Read More »

Behavioural Design Patterns: Interpreter

Previously we had a look at the chain of responsibility and the command pattern. They do tackle different problems however they both delegate an action to another component, the command patterns always delegates the action, the chain of responsibility if the action cannot be handled it will be forward it to its successor. We are going to switch context and ...

Read More »

Behavioural Design Patterns: Command

Previously we used the Chain of Responsibility pattern in order to handle a complex problem with road incidents in a region, solving the problem in the first place or forwarding it to another incident handler. The command pattern is quite different to the cor pattern since it helps us in order to delegate an action/request to another object capable of ...

Read More »

Behavioural Design Patterns: Chain of Responsibility

We had a look on creational design patterns and structural design patterns. On this blog we will focus on behavioural design patterns. From wikipedia Behavioural design patterns are design patterns that identify common communication patterns between objects and realise these patterns. By doing so, these patterns increase flexibility in carrying out this communication. Creational design patterns realise the creation of ...

Read More »

Structural Design Patterns: Proxy Pattern

Previously we used the facade pattern in order to interact with a legacy application. Our next pattern would be the proxy pattern. The proxy pattern is used when we want Control the access to an object Add extra functionality when accessing an object. One of the most common usages is when we want to monitor specific actions and add some ...

Read More »

Structural Design Patterns: Facade Pattern

As developers most of the time we have to deal with complex systems, with many dependencies and even non existing documentation at all. In these situations finding a way to tackle those challenges is essential. The most common way to deal with it, is to hide all those dependencies and specify a front facing interface. The pattern to use in ...

Read More »

Structural Design Patterns: Decorator Pattern

Previously we altered the behaviour of our abstract objects using the bridge pattern and we implemented a tree like structure for our components using the composite pattern and delegating the requests. The decorator pattern allows behavior to be added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class. So imagine ...

Read More »

Structural Design Patterns: Composite Pattern

Previously we checked the adapter pattern the use cases and the bridge pattern. The pattern we will examine in this post is the composite pattern. By following the composite pattern we “compose” objects into tree structures representing part-whole hierarchies, therefore clients can treat individual objects and compositions uniformly. By referencing the word hierarchies the first thing that comes to mind ...

Read More »

Structural Design Patterns: Bridge Pattern

On the previous post we had a look at the adapter pattern. On this blog we are going to use the bridge pattern. As mentioned by GOF the bright pattern usage is to “decouple an abstraction from its implementation so that the two can vary independently”. How this translates to a software problem? Imagine that you need to implement software ...

Read More »