50
50
Mar 01, 2010
In simple words,
Factory pattern ---to create a single object (U will have only one Factory class here)
Abstract Pattern--- To create chain of related objects through multiple Factory Classes.
56
93.9
Mar 05, 2010
Factory Methods lets the subclasses to decide which class to instatiate.whereas the abstract factory provides and interface for creating families of related or dependent objects. Both patterns help us in decoupling our code by creating objects but Factory Methods uses inheritence and the abstract Factory uses object composition
50
50
Mar 13, 2010
A very good exmple I read once on the web is as follows:
Say, you want a door for your house:
One way is to call carpenter and let him take the measurements and then get you the door. --- factory method
Second way is to go to shop which sells doors and get the one which fits your requirements. --- abstract factory