I have a cfc that will generate some html to be displayed inline.  I
was just going to reuturn a string rather than have it output directly.  Is
this the proper way to do that?

I've been struggling to draw a clear line between the usage of CFCs and
Custom Tags, but one general trend I see developers practicing seems to be
to put "display code for reuse" in Custom Tags rather than in CFCs. For
example, I have a Custom Tag that can spit out either a printable HTML
invoice or the same invoice in PDF--and customize contents of the invoice
based on user input. The same logic can very well be encapsulated in a CFC
instead, but the Custom Tag is better for black-box processing like this
one. It's hard to tell without knowing more of your situation, but just
thought I'd share the thought. :-)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332614
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to