List/Grid Tag Archives: Design Patterns

apache-camel-logo

Circuit Breaker Pattern in Apache Camel

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 tim ...
spring-logo

The Builder pattern and the Spring framework

Introduction I like to make use of the builder pattern whenever an object has both mandatory and optional properties. But building objects is usually the Spring framework responsibility, so let’s see how you can employ it using ...
java-logo

Design Pattern: Immutable Embedded Builder

Last week I wrote about what makes a pattern anti-pattern. This week I present a design pattern… or wait… perhaps this is an anti-pattern. Or is it? Let’ see! The builder pattern is a programming style when there is a class ...
java-logo

Design Patterns: Pattern or Anti-Pattern, that is the question

I have recently encountered the wiki page Anti-pattern that has an exhaustive list of anti patterns. Some of them were obvious for me. Some of them made me think a bit, other a bit more. Then I started to look for the anti-pattern ...
java-logo

Three Reasons Why I Like the Builder Pattern

There are three ways to create new objects in Java programming language:The telescoping constructor (anti)pattern The Javabeans pattern The builder patternI prefer the builder pattern over the other two methods. Why? Joshua Bl ...
java-logo

The Decorator Pattern

The Decorator Pattern One design pattern that I don’t see being used very often is Decorator. I’m not sure why this pattern isn’t more popular, as it’s quite handy. The Decorator pattern allows one to add functionality to ...
java-logo

How to read CSV files in Java – A case study of Iterator and Decorator

In this post, I will talk about how to read CSV (Comma-separated values) files using Apache Common CSV. From this case study, we will learn how to use Iterator and Decorator in context of design pattern to improve the reusability ...
java-logo

State Design Pattern in Java – Example Tutorial

State pattern is one of the behavioral design pattern. State design pattern is used when an Object change it’s behavior based on it’s internal state. If we have to change the behavior of an object based on it’s state, we can ...
java-logo

Strategy Design Pattern in Java – Example Tutorial

Strategy pattern is one of the behavioral design pattern. Strategy pattern is used when we have multiple algorithm for a specific task and client decides the actual implementation to be used at runtime. Strategy pattern is also kn ...
java-logo

Template Method Design Pattern in Java

Template Method is a behavioral design pattern and it’s used to create a method stub and deferring some of the steps of implementation to the subclasses. Template method defines the steps to execute an algorithm and it can provi ...
Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

15,153 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books
Get tutored by the Geeks! JCG Academy is a fact... Join Now
Hello. Add your message here.