On Tue, 28 Dec 2004 12:08:54 -0500, Jeff Small <[EMAIL PROTECTED]> wrote:
> Okay, this makes sense. I'm reading about 4 different "sources" for how to
> build CFCs correctly
I hope that includes both of the Macromedia Web Team docs :)
http:/livedocs.macromedia.com/wtg/public/
Note that even tho' the second one is mostly specific to Mach II,
there's a lot of advice about CFC and application design in terms of
OO.
> So in my code where I'm using my CFC, I'm using CFOBJECT like so:
> <cfobject name="myObject" component="mySite.myComponent">
I'd strongly advise switching to <cfset> and createObject() - it's
more flexible:
<cfset myObject = createObject("component","mySite.myComponent")/>
This allows you to chain method calls, as others have noted, and will
probably help get you more into the habit of using <cfset> and method
calls (rather than <cfinvoke> which I also advise against).
Why? I think there's a psychological "hint" behind <cfobject> and
<cfinvoke> - they look like old-school tags and, hence, old school
thinking; whereas if you make a conscious effort to switch to <cfset>
and use createObject() / method calls directly, you'll get a "hint"
that this isn't just old-school tags and it'll help you switch gears
into new school (OO / CFC) thinking.
> This part somewhat confuses me, but again, I'm using CFOBJECT and not
> "CreateObject" so I'm not really setting anything "equal" to anything.
Which just reinforces my point about psychological hints above...
--
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188900
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54