> I have seen some discussion on this list from time to time about
> management of white space in CF code. Is there a preferred strategy
> for dealing with it?

3 Schools of thought;
1) Use CFSetting EnableCFOutputOnly and only CFOutput what you need - faster
to the browser but heavier on the server
2) Use CFScript a lot (on 4.5.1SP2 anyway) which generates no white-space,
and just ignore any whitespace - faster on the server and slightly slower to
the browser
3) Don't do anything about it and live with shed-loads of white-space - this
is the lazy man's option <g>

Personally, I've switched from 1 to 2 since the release of SP2 and am using
CFScript a lot in new products

If you use the first option a lot, and don't allow for any white-space
(between tags) it makes it virtually unreadable if any of the layout goes
wrong

As long as your code is well written and not too many idents, then it
shouldn't produce a huge amount of space except form the occasional block of
cariage returns
You could always get around this by putting remarks between your tags, but
this can make your code unreadable...

In the end it all comes down to personal preference - out latest big project
starts with about 4-5 blank lines as the remarks and queries live there, but
after that there's very little, and what there is looks like spacing gaps
(for readability)

HTH

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to