On Thursday, Jun 26, 2003, at 16:37 US/Pacific, Matt Robertson wrote:
> Great resource, those coding guidelines.

Thanx. I intend to publish a revised set of guidelines this summer that 
take into account my team's experiences with developing about a quarter 
of a million lines of CFMX code that is heavily based on CFCs!

> I noticed the guidelines specify removing cf processing into a 
> physically different template.

I assume you're referring to this comment:

"Separate logic from presentation as much as possible. If logic and 
presentation code cannot be physically separated (into different 
files), then try to structure files along the following lines:

<cfsilent>
...CFML logic...
</cfsilent>

<cfoutput>
...HTML generation...
</cfoutput>"

It's not specifying that you use separate files - it's making the 
recommendation to separate logic from presentation (a la MVC idiom, for 
example) and it acknowledges that it isn't always reasonable to have a 
physical separation.

> An example is below.

And it seems a reasonable example. I'd imagine "do something" and "do 
something else" are alternative ways to set up the data for the 
presentation section of the page and that "call security" is probably 
either a cfthrow or a cflocation to an 'error' page.

> Anything re-usable would be broken out into includes and modules.  The 
> stuff I'm talking about is only unique code.

Yup, I'd only separate out the logic to its own file in this case if it 
were very complex and overwhelmed any reader of the page who might want 
to simply tweak the presentation layout. You all know that scenario... 
scrolling through hundreds of lines of dense CF code to find half a 
page of HTML at the bottom when all you want to do is edit one 
class="..." attribute! :)

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to