Yeah...I find I can get tremendous leverage by creating "display
methods"...such as if you have a Person object (cfc), you can have a method
displayAsTableRow, displayAsDiv, displayFormDetail etc.  You can really
limit code repetition this way.

-- Josh


-----Original Message-----
From: Dave Watts [mailto:[email protected]] 
Sent: Thursday, January 15, 2009 6:18 AM
To: cf-talk
Subject: Re: Calling functions with cfoutput

> Custom tags, cfmodule and cfinclude all exist for good reason, they
> are designed for modularising output. If you fully understand their
> use, you most likely would not desire to use a function to modularise
> your output though, of course, you are perfectly free to do so.
>
> While you are free to do what you will in any language, learning
> established practice is far from trivial or ridiculous. Things are
> usually done for good reason.

It is a mistake to confuse conventions, no matter how common they are
or how widely they're shared, with best practices. There is nothing
inherently wrong with generating output from within a CFFUNCTION, and
it has an OUTPUT attribute for exactly this reason.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317996
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to