> 
> Very basic rule of thumb - your controller doesn't know about 
> your database,
> and your model doesn't draw things or know what page is 
> coming up next.

I love that definition. After I read that I had one of those
"Oh, now I get it" moments.

> There's a fair bit written about locking in CF.  This is not 
> specific to
> CFCs.  There's no simple answer.  You have to lock to avoid 
> race conditions,
> but identifying and correcting race conditions is a bit of a 
> black art.

No animal sacrifice involved, I hope. 8)

> BTW, cfproperty maybe doesn't do what you think it does?  In 
> object-speak
> "property" is a synonym for "instance variable".  Unless 
> you're creating
> webservices, cfproperty has nothing to do with instance variables.

I just used cfproperty to make it clear that its type was
to be a CFC.

> > 5. If a CFC (FirstCfc) property is a reference to another object
> > (SecondCfcInstance), can SecondCfcInstance "see" the FirstCfc's
> > properties and methods?
> 
> Public methods - yes.
> Package methods - if in the same directory.
> Private methods - no.
> Properties (i.e. instance variables) in the "variables" scope - no
> Properties (i.e. instance variables) in the "this" scope - yes

Basically the same as any other piece of code? If I understand 
you, SecondCfc doesn't gain anything by being referred to in FirstCfc;
only FirstCfc can now see SecondCfc's properties and methods?

> I'd like to go off on a tangent here and recommend that (if 
> you haven't
> already), you have a look at Subversion and CFCUnit.  It 
> sounds like you're
> going to want play around with a few different approaches, 
> and if you set up
> version control and automated testing you will remove 90% of 
> the stress in
> doing that (other than that next deadline...).

Already 4 weeks late. Probably should have stuck with the
procedural approach for now, but I don't get time between
projects to learn new stuff, so I just dived in. 

Thanks,

Joe


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

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

Reply via email to