![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Just a point on nomenclature. Maybe I don't understand exactly what you are saying here, but usually a factory only creates objects that are used by the system. These objects are all based on some abstract base class or interface, of course. The factory itself is not the base class, however. At runtime, based on whatever criteria is relevant, the factory instantiates and returns instances of derived objects which have the appropriate implementation.
> So, I proppsed a design and my boss kinda likes it. Thought I'd share and argue. > To sum up, its a mix of Singleton and Abstract Factory. > I have an interface >
> Now I have classes that implement this interface, specific to a database vendor. For example,
> And another class, > Now all this is of no good with out this last part. create a reference of > Now, all calls will be made to this reference. So, one who concentrates on business logic, is happy with the promise of interface and doesnt need to care about database calls or whatever. > So to move to IBM DB2, I just need to implement >
Replies:
|
Sponsored Links
|