SOA (Service Oriented Architecture) A Service Oriented Architecture is a software architecture pattern, which application components provide services to other components via a communications protocol over a network. The communication can involve either simple data passing or it could involve two or more… Continue Reading
This pattern allows a client object to construct a complex object by specifying only its type and content, being shielded from the details related to the object�s representation. This way the construction process can be used to create different representations.… Continue Reading
A DAO is much closer to the underlying storage, it’s really data-centric. That’s why in many cases you’ll have DAOs matching db tables or views 1 on 1. A DAO allows for a simpler way to get data from storage,… Continue Reading
Provide an interface to create the family of a related object of a class without exposing the creational logic. Example – Factory of Factory.
Provide an interface of two incompatible interface/object. Works as a bridge/mediator between two different objects. A great application is constantly hooked into other libraries and APIs, so we implement the adapter method So that we do not experience any trouble… Continue Reading
Provide an interface to create a related object of a class without exposing the creational logic. Example – Vehicle Factory – Car, Bus, Truck.
The observers will be monitored and notified of every state change of subject until they stop observing the subject. So it follows Hollywood principle-“Don’t call us, we will call you”. Defines a one-to-many dependency between objects so that when one… Continue Reading
Clone or duplicate an object after costly DB operation or other costly operation. Put clone object into a HashMap. Example: Example – Costly DB Operation, Hash Mapping Suppose we are doing a sales analysis on a set of data from… Continue Reading
Provide a surrogate or placeholder for another object to control access to it. Use an extra level of indirection to support distributed, controlled, or intelligent access. Add a wrapper and delegation to protect the real component from undue complexity. Problem… Continue Reading
Sometimes it’s important to have only one instance for a class. For example, in a system, there should be only one window manager (or only a file system or only a print spooler). Usually, singletons are used for centralized management… Continue Reading