I'm just starting to write my first CFC in anger, as it were, and was curious 
about what others were doing.
Are people writing a number of of getX,getY,getName,get.... methods, each 
returning a string/numer and then using
<cfobject component="com.locavista.location"
        name="objLocation">
<cfoutput>#objLocation.getName(156537)#</cfoutput>
OR writing a single get that returns a query or custom object, and then using
<cfinvoke component="com.locavista.location"
        method="get"
        iLocId="156537" 
        returnVariable="objLocation" >
<cfoutput>#objLocation.description#</cfoutput>

Obviously, no difference in output, but writing lots of get'ers is time 
consuming, though provides better abstraction from the datastore.
Also, each getX will make a database query, so outputting a list of the 
objects will be much slower using the first method than the second, as I see 
it.

So I'm plumbing for doing it the 2nd way - is there any sort of consensous on 
this ?
-- 
Tom C
"Land of the free, home of the brave... you have to be brave to live there and 
enjoy the freedoms"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

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

Reply via email to