Friday, September 16, 2011

Easy Learning of Java Design Patterns by Pranay

Hi All,

I have searched many thing regarding design pattern in java and conclude some on it as below.

I am sure this will very helpful to you all.

Design Patterns explained using Java source code examples. Although it will take me a little while to create each design pattern example, this page will eventually contain links to all of those examples.

If you're not familiar with software design patterns, they're described on Wikipedia like this:

Wiki for Design Pattern

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code.

The usefulness of design patterns is explained well by this quote:

Design patterns can speed up the development process by providing tested, proven development paradigms.

As we all like to program faster, and we don't like to paint ourselves into corners, design patterns are a good thing. I've found that design patterns are like being able to talk with an experienced software designer ... a way of capturing "lessons learned" about good software design practices.

Design patterns - history, organization
Design patterns were initially made famous in the "the "Gang of Four" Design Patterns book , and subsequently described in other books, such as The Design Patterns Smalltalk Companion. "Patterns" themselves originated in the field of architecture, as captured and organized by a man named Christopher Alexander (no relation to this author).

Design patterns have been split into at least three categories -- Creational Patterns, Structural Patterns, and Behavioral Patterns -- and in keeping with this organization, my tutorials are organized in the same manner below.

Design patterns in Java
While design patterns are intended to be independent of programming languages, I've found that it's very useful to show examples of design patterns implemented in different languages. For example, if you're not familiar with Smalltalk, the Design Patterns Smalltalk Companion may be a little hard for you to digest, but if you're familiar with a language like Java, a Java design pattern example will be much easier to understand.

Therefore, to specifically try to help Java programmers, I'm creating this series of Java design pattern examples.

Java 'Creational' design pattern examples
According to Wikipedia, "creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation." Here are links to my Java Behavioral Design Pattern examples:

Factory Method Design Pattern in Java
Abstract Factory Design Pattern
Builder Design Pattern
Object Pool Design Pattern
Prototype Design Pattern
Singleton Design Pattern
Structural design pattern in Java

According to Wikipedia, "structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships between entities." Here are links to my Java Behavioral Design Pattern:

Adapter Design Pattern
Bridge Design Pattern
Composite Design Pattern
Decorator Design Pattern
Facade Design Pattern
Flyweight Design Pattern
Private Class Data
Proxy Design Pattern
Java 'Behavioral' design pattern examples
According to Wikipedia, "behavioral design patterns are design patterns that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication."

one very nice book on this is also available :OReilly.Head.First.Design.Patterns.pdf

I hope these Java design patterns are helpful.
Please stay tuned, as I hope to complete all of these patterns in the next month and will back to you with a new stuffs.

Easy Learning Happy Learning