Greetings all. I need some advice on modeling the factory pattern. First
the basics:
My target language is Java. I have created an interface, call it
MyInterface. I have created a factory, call it MyFactory. I have created a
controller class, call it MyController, that will invoke a create() method
on the factory class and receive back an instance of a class that implements
MyInterface. The factory class will decide (perhaps based on an argument to
the create() method) which implementation of MyInterface to create and
return. Also in the model I've included a concrete class MyConcrete, which
implements MyInterface, on the model.
Based on this (what I think is a) fairly straightforward model, does anyone
have advice on:
- what relationships make sense between all of these?
- do you use associations or dependencies or both?
- how do you account for the dynamic nature of the relationships between
MyController and the concrete class(es) that may be returned by the factory?
- how do you account for the fact that MyFactory may return other concrete
implementations that do not yet exist?
Steven F. Caswell
Senior Software Architect
BuildNet
______________________________________________________
1770 The Exchange, Suite 240, Atlanta, GA 30339
main: 770-226-8089 | fax: 770-952-6201 | direct:
678-931-2527
[EMAIL PROTECTED] | http://www.buildnet.com
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************