Proxy vs Observer design pattern

The Proxy design pattern allows to define a “proxy” class which will act as a wrapper object which will be called by the client to access the product object without exposing the details. This proxy class can also be used to add extra functionality without changing the product behavior. This design pattern can be used in cases to provide additional security access to an existing product or providing an interface for remote resources. General class diagram of proxy pattern is shown below.

(more…)
Proxy vs Observer design pattern Read More

Observer Design Pattern explained with simple example

Observer design pattern is one of the most famous and widely used design pattern in software industry. In this design pattern basically multiple objects which are called as observers, registers themselves to an object called as subject for getting automatic notifications, whenever any state changes occurs in subject. This is mainly used for event handling modules.

Before going ahead have a look at Design pattern simplified version.

(more…)
Observer Design Pattern explained with simple example Read More