Difference between Factory and Abstract Factory
Abstract Factory: This is a Creational pattern.
It provides an interface for creating families of related or dependent objects (products) without specifying their concrete classes.
J2EE technology uses this pattern for the EJB Home interface, which creates new EJB objects.
It isolates concrete classes.
It makes exchanging product families easy.
It promotes consistency among products.
Supporting new kinds of products is difficult
Factory Method : This pattern defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
J2EE technology uses this pattern for the EJB Home interface, which creates new EJB objects.
Eliminates the need to bind application-specific classes into your code.
Gives subclasses a hook for providing an extended version of an object being constructed.
Difference between Factory and Abstract Factory
The Factory Method pattern is for creating a single object type. It provides a generic interface for client objects, and defers instantiation to subclasses that implement the generic interface.
The Abstract Factory pattern is for creating multiple, related objects, and defers instantiation to subclasses that implement the generic interface of the factory object








