Tags » Design Patterns

TDD a Confirmation Dialog (Vol. 1)

In this video, I walk through the steps of flushing out the business logic required for implementing a user-confirmation interaction via TDD.


Function composition using Java 8

The objective of this blog post is to give you a basic idea of functional composition in Java 8. We will look at 2 methods, … 669 more words

Flyweight Design Pattern

This pattern helps in reducing the cost of creation of large number of objects by reusing existing objects.

An object’s data can be divided into two parts. 834 more words


Decorator Pattern

Decorator Pattern is used to add/modify the behaviour of an Object at runtime.We create a wrapper around the object for adding/modifying it’s behaviour.

We will take an example of Hotel Room for understanding the Decorator pattern. 193 more words


Facade Design Pattern

Facade pattern provides simplified interface to a complex system with multiple sub-sytems. The Facade interacts with the subsystems instead of the Client directly interacting with subsystems. 466 more words


Composite Design Pattern

Composite pattern is used for representation of part-whole hierarchies.

We would take up a simple example of an Employee.

An employee can be a CEO or a Vice President or can be a Trainee. 285 more words


Adapter Design Pattern

Adapter pattern helps in making two incompatible interfaces to work together.It is basically a bridge between two incompatible interfaces.We need to note the fact that here the interfaces may be incompatible but the inner functionality suits the requirement.  434 more words