Home » Tag Archives: Design Patterns (page 2)

Tag Archives: Design Patterns

Command Design Pattern Applied

java-logo

Hi there! Today i’m gonna share with you a really great programming design pattern. It has a lot of usages and it is one of my favorites. The programming degin pattern command has a huge variety of use cases. In this post we will see how to implement something from the real world. We will implement an electronic car key ...

Read More »

Applying decorator pattern to decorate views on Android

android-logo

Hi there! Today i’m gonna show how to apply the design pattern decorator to android’s views making use of its dependency injection’s concept. I thought it was a nice, clear and simple way to decorate views and that’s my motivator to share it with you. I’m assuming you know the decorator pattern already and are looking for real examples involving ...

Read More »

Builder Design Pattern Applied

java-logo

Hi there! Today i’m gonna share the first of a brand new design pattern series i made. The builder design pattern is a very useful and common pattern while developing serious apps. In this post i’ll give a tiny builder pattern framework, so you can always come back here and get it to work with. A mnemonic, while dealing with ...

Read More »

Decorator Design Pattern Applied

java-logo

Hi there! Today i’m gonna show the decorator design pattern in action. The decorator design pattern is a largelly used design pattern while dealing with grafics, trees and dynamic changes during runtime. It is also a greate choice if you are looking or trying to do recursion with. I love it. In this post we will implement a students decoration. ...

Read More »

Template Method Pattern Example Using Java Generics

java-logo

If you find that a lot of your routines are exactly the same except for certain sections, you might want to consider the Template Method to eliminate error-prone code duplication. Here’s an example: Below are two classes that do similar things:                 Instantiate and initialize a Reader to read from a CSV file. Read ...

Read More »

Open Session In View Design Tradeoffs

software-development-2-logo

The Open Session in View (OSIV) pattern gives rise to different opinions in the Java development community. Let’s go over OSIV and some of the pros and cons of this pattern.   The problem The problem that OSIV solves is a mismatch between the Hibernate concept of session and it’s lifecycle and the way that many server-side view technologies work. ...

Read More »

Double Checked Locking on Singleton Class in Java

java-logo

Singleton class is quite common among Java developers, but it poses many challenges to junior developers. One of the key challenge they face is how to keep Singleton class as Singleton? i.e. how to prevent multiple instances of a Singleton due to whatever reasons. Double checked locking of Singleton is a way to ensure only one instance of Singleton class ...

Read More »

Java Singleton Design Pattern

java-logo

Its one of the simplest design pattern in Java. If any one asks me which design pattern you are good then I would proudly say Singleton. But when they ask in depth concept of singleton then I get stumped. Is it really singleton is that much difficult ? Really not but it has many scenarios that we need to understand ...

Read More »

Difference between State and Strategy Design Pattern in Java

java-logo

In order to make proper use of State and Strategy design Pattern in Core Java application, its important for a Java developer to clearly understand difference between them. Though both State and Strategy design patterns has similar structure, and both of them are based upon Open closed design principle, represents ‘O’ from SOLID design principles, they are totally different on ...

Read More »

Circuit Breaker Pattern in Apache Camel

apache-camel-logo

Camel is very often used in distributed environments for accessing remote resources. Remote services may fail for various reasons and periods. For services that are temporarily unavailable and recoverable after short period of time, a retry strategy may help. But some services can fail or hang for longer period of time making the calling application unresponsive and slow. A good ...

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