dcsimg
Kindly explain the difference between Abstract Factory, Builder and Factory Method patterns using java code/ UML class-interaction diagrams.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   James_Varkey
Posted On:   Wednesday, October 30, 2002 12:55 AM

Kindly explain me the differences between Abstract Factory, Builder and Factory Method patterns with example using java code. I'm sorry I tried the Design patterns Erich Gamma et.al But couldn't digest.


If somebody can provdie UML class diagrams/ interaction diagrams to define the structure for each pattern, I will be much grateful. Thank you.

Re: Kindly explain the difference between Abstract Factory, Builder and Factory Method patterns using java code/ UML class-interaction diagrams.

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, October 30, 2002 08:06 AM

I think there is some good discussion and clarification of these in Bruce Eckel's book "Thinking in Java", either the printed version or the online version.



Also see "Item 1" on static factory methods, singletons etc., in Josh Bloch's book "Effective Java".



Basically I think it's usually good to provide static factory methods (cf Josh Bloch), but that there are different reasons & ways internally, depending on your internal structure, for doing so (cf Bruce Eckel). These correspond to those different "design patterns" you mention.

About | Sitemap | Contact