This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Java Design Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Java Design Pattern" Watch "Java Design Pattern" New topic

Java Design Pattern

Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
I am started reading the Java Design pattern book by Cooper. I am not able to differentiate the patterns. For example the difference between Factory pattern and abstract factory pattern & Builder pattern.
Why do we need one interface extra for this abstract factory pattern.
For example in this book they have considered the same example for this two pattern. (Accessing the data using database , nmay be local or remote).
1. In the factory pattern they are using getRemoteConnection() and getLocalConnection() in two separate interfaces local and remote
2. In the abstract factory pattern they have created a wrapper interface for this two methods.
Can you please explain.
I agree. Here's the link:
subject: Java Design Pattern
It's not a secret anymore!