One way that you could use a CFC to generate display content whithout
greatly mixing your abstraction layers is the use XML. Have a separate
package called <myApp>.UI.* and have your methods in the CFC's in this
package return xml strings.

Then you only need to open up your stylesheet to your designers and they are
no longer editing your code. 

At the same time,  you have also separated your business & presentation
logic.

Pat


-----Original Message-----
From: Massimo, Tiziana e Federica [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 30 August 2003 5:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Display in CFCs

> I don't think there's anything wrong with doing display in a CFC as long
as
> that's the whole point of the CFC.  Don't mix up database and business
logic
> code with display code.  As long as you stick to that, where you put your
> display code (a custom tag or a cfc) makes no difference.

I 100% agree



> To me it makes
> sense to do it in a CFC as opposed to a tag, because then you have self
> documenting methods (instead of poorly documented tags).

It's not like a CFC automagically document itself, a lazy developer can
easily avoid to specify return type and hint attributes and you are left
without any documentation. CFC sort of standardize and automate extracting
documentation, but there is nothing like true "self documenting" (same for
JavaDoc).

If you care about documenting your stuff, there would be no differences
between CFC and custom tags, if you don't care... You will likely end up
with a mess anyway :-))

----------------------------
Massimo Foti
Certified Dreamweaver MX Developer
Certified Advanced ColdFusion MX Developer
http://www.massimocorner.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).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
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).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to