> That isn't really an answer however. You are saying not to do it, but why
> not? Is it personal preference or is there a specific reason why this is to
> be avoided.
>
> I use it myself as well when I need something at the top of every page (and
> to check security to make sure you can view that page as well). Is there
> any real problem with doing this except that it doesn't fit in with the
> idea of what you say it should be like?

Sure he gave you a reason...seperate processing/business logic from the display 
tier.

Application.cfm is really meant (but not enforced) for security, session 
management, and application settings like global vars etc.

You can also have CFCs output display code....but it's also a bad practice.

Think of this scenario....what if you have a page you don't want to show the 
header on (pop-up window containing a file upload interface....you don't want a 
header and menu in that window).

You have to Add some mechanism to hide the display code in certain 
circumstances 
to stop the header/menu from displaying when using application.cfm to disaply 
them:

If you use a display template (which includes your header/menu file(s)) for all 
main window pages, all you need to do is make the pop-up a seperate file from 
your main site template and no "hooks" are required.

So if you have display code in Application.cfm you have to perform conditional 
checks on EVERY page request to show or hide that display (if that flexibility 
is required).  If you properly seperate out the display code you do NOT have to 
perform that additional conditional check on every page request.

This is a rather simplistic example....but I think you'll see that you can end 
up adding complexity and overhead because of doing things that are possible but 
not a good practice ;-)

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228003
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to