Hi
 
AbstractFactory is a collection of Factory Methods.
 
For example,
 
class WindowFrameworkCreator
{
    Component getWindow();
    Component getDialog();
    Component getScrollBar();
}
 
 
class WindoFrameworkCreator is an AbstractFactory and getXXX methods are Factory methods.
 
 
 
Another example of Factory Method
 
class RDBMSConnectorFactory
{
    RDBMSConnector getConnector ()
    {
        // return either Oracle or SQL Server Connector - by reading conf file
    }
}
 
 
regards
Pralhad
-----Original Message-----
From: Pablo Schor [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 8:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [patterns-discussion] Abstract Factory vs. Factory Method

I've been using the factory pattern for a while, but don't know exactly if
I'm using the Abstract Factory or the Factory Method. They look the same to
me, but what are the differences?



thank you,


Pablo

Reply via email to