Also you had discussed, at one point, passing the factory into the object during init - this way if the number of dependant objects changed in the future you wouldn't have to muck with how the primary object was instantiated since the factory would already have references to those dependant objects.

Bill

On 11/2/05, Patrick McElhaney <[EMAIL PROTECTED]> wrote:
On 11/2/05, Scratch <[EMAIL PROTECTED]> wrote:

>
> On a related note, remind me again why it's better to create the dependent
> objects in the Factory rather than just creating them in the object's
> init():

The init() method is a convention used to simulate constructors. In
other OO languages, you create an instance of an object by calling its
constructor. They're not two distinct steps that can be done at
different points.


Patrick

--
Patrick McElhaney
704.560.9117
http://pmcelhaney.weblogs.us


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]





--
[EMAIL PROTECTED]
http://blog.rawlinson.us

If you want Gmail - just ask. ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to