Behavioral Patterns - Iterator Pattern Exercise

May 18, 2018

The iterator pattern is widely used in collections, it simplifies the way a collection could be iterated as well as provides a mutable capability to the collection during the iteration. Most languages provide an interface to the iterator pattern.... Read more

Behavioral Patterns - Chain of Responsibility Pattern Exercise

May 18, 2018

The Chain of Responsibility Pattern is very useful to avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along with the chain until an... Read more

Behavioral Patterns - Command Pattern Exercise

May 18, 2018

The Command Pattern is almost the second most popular pattern after the Singleton Pattern. It can be used to encapsulate each request to an object and turn the client application to a stateless application while the delegated object who receives the ... Read more

Dependency Injection and Inversion of Control

Apr 29, 2018

We often mix the Dependency Injection (DI) with the Inversion of Control (IoC). In fact, DI is one form of IoC. This article clarifies the terms. ... Read more