Not only this, but for security purposes you'll want to have your data
tier CFC's w/ an access modifier of package and have "wrapper" or
"proxy" or, my personal favorite, "business delegate" CFC's expose your
data tier as webservices (which is the same thing for flash remoting).
For plain html I've been known to do this:
<cffunction name="listBox" output="false">
<cfset var r = "" />
<cfsavecontent variable="r">
<select name="foo">.. You get the idea..
</cfsavecontent>
<cfreturn r />
</cffunction>
And just an fyi: Flash 7 has enhanced html support in it's textfields--
a good definitely a good idea to keep flash in mind as it evolves..
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Sean A Corfield
> Sent: August 8, 2003 5:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] Display CFC (aka CFC for display purposes)
>
>
> On Friday, Aug 8, 2003, at 13:57 US/Pacific, John Farrar wrote:
> > Here goes a bomb... you could create the logic and create a cfc that
> > does
> > the display and "inherits" the logic.
>
> Reuse of code through inheritance is poor practice (well, you knew
> *someone* was going to object to your suggestion!) and it makes no
> sense anyway: inherited CFCs should relate to their parent as "IS-A".
> Otherwise you should be using composition (or other technique).
>
> > DisplayMamal is a LogicMammal approach.
>
> But the "IS-A" relationship does not really hold here! A
> DisplayMammal
> isn't a mammal at all, it's a type of display object - it's an object
> that responds to rendering requests by invoking data methods on some
> other object.
>
> Consider:
> Man is-a LogicMammal
> so you could reasonably have Man extend LogicMammal.
>
> What is a DisplayMan? Does it extend Man or DisplayMammal? DisplayMan
> is more likely to be a specialization of DisplayMammal but you'd need
> to provide it a Man instance to render.
>
> You'd be on much safer OO ground with this sort of hierarchy:
>
> DisplayMammal refers to instance of LogicMammal
> ^ ^
> extends extends
> | |
> DisplayMan refers to instance of LogicMan
>
> You would create an instance of DisplayMan and initialize it with the
> instance of LogicMan that it is intended to render (or pass in the
> instance to each 'render' request).
>
> DisplayMammal would have the basic formatting for primitive
> aspects of
> LogicMammal, e.g., normal body temperature, number of legs
> etc and then
> DisplayMan would add or customize formatting for LogicMan-specific
> aspects.
>
> Make sense?
>
> Sean A Corfield -- http://www.corfield.org/blog/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).