> I prefer the former since you can then "chain" method 
> calls in cfscript:
> 
> <cfscript>
>       me = createObject("component","person");
>       me.setFirstName("Sean").setLastName("Corfield");
> </cfscript>

I hadn't seen that syntax before with CFCs, but that's ok, since I don't
care for it. I think it's sensible enough when you have actual object
hierarchies (calling a method of one object returns another object, within
which you'd call another method perhaps) - you see that quite a bit in MS
stuff, such as ADSI and WMI. But in this case, I think it makes the code
less readable, since "me.setFirstName("Sean")" returns the object "me".

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to