Factory is concerned with a single type of object (Contact, DBConnection,
Document, etc.). Managers, on the other hand, are façades that encapsulate
one or more other objects from the client. Managers frequently are also
factories, but they don't have to be. Thus, it's only a factory if it
DOESN'T provide that façade to the extra objects.
Of course this is personal style. You can name your classes whatever you
want (including TheCfcThatBuildsDocumentObjects).
Cheers,
barneyb
> -----Original Message-----
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 26, 2004 12:30 PM
> To: CF-Talk
> Subject: RE: What is a Factory?
>
> Heh... that sounds to me like the functionality described for
> "Manager" objects. Or at least without more information about a
> specific scenario, the way I think I'd be liable to design that sort
> of thing would place this functionality in a Manager rather than a
> Factory.
>
> Thanks Mosh
>
> > Isaac:
>
> > A lot of times, a Factory is used to not only create but
> > also to manage the
> > creation of objects. For example, in a situation where
> > you want to support
> > database connection pooling, you would use a Factory to
> > manage the creation
> > an/or reuse of connections.
>
> > --
> > Mosh Teitelbaum
> > evoch, LLC
> > Tel: (301) 942-5378
> > Fax: (301) 933-3651
> > Email: [EMAIL PROTECTED]
> > WWW: http://www.evoch.com/
>
> > -----Original Message-----
> > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, February 26, 2004 3:00 PM
> > To: CF-Talk
> > Subject: Re: What is a Factory?
>
>
> > Boy that seems like a useless abstraction... The factory
> > that is ...
> > the Manager I understand, but it seems like if you wanted
> > a new
> > something to put into a manager, you'd just use "newThing
> > = new
> > Something(blah,blah)" instead of having a separate
> > "factory" object to
> > create them. Is there some other reason for it that I'm
> > not aware of?
>
> >> On Thu, 2004-02-26 at 11:17, Troy Simpson wrote:
> >>> All,
> >>>
> >>> I noticed that some application user the terms Factory
> >>> and Manager in
> >>> the Class/Object Names. Like AppFactory, AppManager,
> >>> and
> >>> EventManager
> >>> in Mach-II
> >>>
> >>> 1. What is the general definition of a Factory?
> >>> 2. What is the general definition of a Manager?
>
> >> In a very basic way (from a java stand point) a factory
> >> produces and a manager manages
>
> >> so you'd tend to see stuff like
>
> >> Thing thing = Factory.createInstance() not
> >> Manager.createInstance()
>
> >> Manager.add(thing)
> >> not Factory.add(thing)
>
> >> Pretty much just what you think it does :)
>
> >> --
> >> Rob <[EMAIL PROTECTED]>
>
> >>
>
>
>
> >
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

