Observer Design Pattern

Observer Pattern is design Pattern which describes one to many relationship, which helps in publisher-subscriber model, where one publisher can notify to multiple subscribers.Usually one or more subscriber classes will be there for this pattern, and these classes will be notified based on the publisher notification change. Java Swing listeners are part of an Observer … Continue reading “Observer Design Pattern”

Factory Design Pattern

Factory Pattern is a design pattern to create objects based on the type with the help of Factory class. Factory Class create and return the object based on the type of request, and Caller class not aware of which class returned, however the created class do the operation based on the requested type. In this … Continue reading “Factory Design Pattern”

Singleton Design Pattern

A Singleton design Pattern is a very simple design pattern where only one instance(object) is created for a Class. And the Object can be accessed publicly, however only one instance will be there available through out its life time. In Java, Singleton Pattern can be easily implemented by making the constructor to private and provide … Continue reading “Singleton Design Pattern”

Design Patterns & Types

A design pattern is a template in which application can be designed so that it will provide us the tight cohesion and loose coupling of the components/classes, so that the application can be extended/modified very easily for further use. Designers gave us the templates so that the design can be picked up based on the … Continue reading “Design Patterns & Types”