Also, the display portion of my intranet will be so custom, that it wouldn't make sense to spend the time to make it very reusable.
I think this is one of the key insights here: display "logic" is typically much less generic and much less reusable than business logic. A Person CFC can, if well-designed, be applicable in several situations (perhaps with some additional work, or even through extension) but how to display a Person is likely to be very specific to the current application.
If you look at MVC, the elements of the model tend to be more abstract and reusable - and much less tainted by their environment - than the elements of the view. The same model can be reused for a Flash view, an HTML view and a WAP view.
We are moving toward having a couple of standard custom tags that handle all the layout frills of creating HTML views while maintaining our model purely as CFCs. This allows us to build one back end (CFCs) and then create a Flash view that uses Flash Remoting to call fa�ades to access the model CFCs or create an HTML view very simply:
... page environment mostly passed in
or created by simple logic here ...
<cf_renderpage>
... main body of the HTML page ...
<cf_rnav>
... the contents of the right
navigation pane ...
</cf_rnav>
</cf_renderpage>In my opinion, it's OK for the views to be 'environment aware' but it's important for the model to be as 'environment neutral' as possible.
Example 2 <cf_myTag firstName="#Session.firstName#"> <cfoutput>#Attributes.firstName#</cfoutput></cf_myTag>
To me, this adds unnecessary complication / redundancy. It seems less readable and less maintainable to me.
I think Mach II is an interesting reference point here: the model can be built to be entirely environment neutral (modulo any listener CFCs that implement the Session Fa�ade pattern) but all the data is passed into the views via request scope variables. To me, this seems pretty clean and intuitive.
Note: I accept that there are also arguments for 'pure logic' custom tags (that do no output) and those should maintain encapsulation as much as possible, in my opinion.
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).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
