Home » Tag Archives: Design Patterns (page 4)

Tag Archives: Design Patterns

Mediator Design Pattern in Java – Example Tutorial

java-logo

Mediator Pattern is one of the behavioral design pattern, so it deals with the behaviors of objects. Mediator design pattern is used to provide a centralized communication medium between different objects in a system. According to GoF, mediator pattern intent is: Allows loose coupling by encapsulating the way disparate sets of objects interact and communicate with each other. Allows for ...

Read More »

Memento Design Pattern in Java – Example Tutorial

java-logo

Memento pattern is one of the behavioral design pattern. Memento design pattern is used when we want to save the state of an object so that we can restore later on. Memento pattern is used to implement this in such a way that the saved state data of the object is not accessible outside of the object, this protects the ...

Read More »

Observer Design Pattern in Java – Example Tutorial

java-logo

Observer pattern is one of the behavioral design pattern. Observer design pattern is useful when you are interested in the state of an object and want to get notified whenever there is any change. In observer pattern, the object that watch on the state of another object are called Observer and the object that is being watched is called Subject. ...

Read More »

Iterator Design Pattern in Java – Example Tutorial

java-logo

Iterator pattern in one of the behavioral pattern and it’s used to provide a standard way to traverse through a group of Objects. Iterator pattern is widely used in Java Collection Framework where Iterator interface provides methods for traversing through a collection. According to GoF, iterator design pattern intent is: Provides a way to access the elements of an aggregate ...

Read More »

Design Patterns: State

java-logo

This article will be about State design pattern. It is one of behavioral design patterns. You don’t need to know many theory to understand the main concepts of the pattern. The post will be break in several parts where I will provide information about situations where the pattern need to be applied, cons and pros which it has and an ...

Read More »

Design Patterns after Design is Done

software-development-2-logo

Design Patterns are a useful tool when you are designing a system, an effective shorthand for communicating and sharing design ideas and a way to build consistency into the code – if people understand them and follow patterns properly. I’m not interested in arguments over whether design patterns are good or not, or which patterns are good and which ones ...

Read More »

Design Patterns: Strategy

java-logo

This time I want to talk about Strategy design pattern. In this way I start articles about behavioral design patterns. These kind of patterns represent some schemas of interaction between objects to make a code more flexible and well organized.The most essential point of this approach is loose coupling between objects. The Strategy should be used when you have several ...

Read More »

Singleton Design Pattern – A Lion’s Eye View

java-logo

A few days ago when I was in my home town, one of my sub-juniors from my colleague attended an interview in an MNC and was severely injured in that interview process. I mean he could not qualify the interview because of the difficult questions fired by the interview panel. When I came back to Bangalore, he shared the embarrassing ...

Read More »

Design Patterns: Prototype

java-logo

The one of creational design patterns is a Prototype design pattern. Despite that the Prototype is the creational pattern it distinguishes from other patterns by a concept. I mean that the Prototype in some sense creates itself. I’m going to explain it bellow. All magic of the Prototype pattern is based on a clone() method of a java Object. So ...

Read More »

Builder Pattern: Good for code, great for tests

java-logo

I’ve found the builder design pattern occasionally useful in code, but frequently useful in tests. This article is a quick summary of the pattern in general, followed by look at a working example of using it in tests. See the code in github. Background to the Builder pattern According to the GoF book, the builder design pattern is used to ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close