> My only problem with Request scope is that its available _everywhere_. I
> understand you can be a good developer and not use it in your model or
> elsewhere but I still dislike the request scope for that reason. Being a
> person that is constantly working on framework and components to be used in
> my company I cherish encapsulation and request scope spits in the face of
> that. Sure Application and Session do too but they server a good purpose for
> carrying state so I like them :)  I do like your point about global
> variables for the life of the request and being easy to differentiate
> between those and page variables. I am with Dave though maybe Application or
> Session would be a better place for that info? Just my 2 cents.

I agree with you for most app building. However, I was recently tasked
with building a pretty much flat site but where ColdFusion templating
would be really useful. For this simple app, I just setup
onRequestEnd.cfm to be the HTML template that outputted
#request.header# for various page specific header tags (javascript,
etc) and #request.body# for the main content.  Each individual page
would then just savecontent to request.body and possibly
request.header to be outputted later in onRequestEnd.cfm. The request
scope was the logical place for these variables.

(I'm sure that onRequestEnd tactic must have been / is a common tactic
- not claiming originality!)

Dominic

--
Blog it up: http://fusion.dominicwatson.co.uk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305992
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to