I would do some testing to see if using a Java object in this way is any
faster than using an Application scope variable.

Also, you should keep away from the name "page context" since it has a
special meaning in J2EE and even in CFMX pageContext is always declared
to equal the current pageContext object.

My $0.02.

> -----Original Message-----
> From: Jesse Houwing [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 02, 2003 12:27 PM
> To: CF-Talk
> Subject: Page context
> 
> 
> Ok, this might sound weird, but I'm thinking of building 
> something I'd 
> call a page-context.
> 
> The idea is that on certain pages one needs to have a lot a variables 
> that you load once, from a database or file and then use 
> pretty often. 
> You can manually cache these variables in the application 
> scope, but I 
> was looking for something more specific. An example of such 
> data might 
> be: a default sort order, l10n texts etc.
> 
> So this would work like a normal client or session variable, 
> but these 
> variables would be unique for each page (haven't though about 
> includes 
> yet, but they may have their own page context too). I'm working on a 
> simple system that stores these variables in-memory in either the 
> application or the server scope, but I'd rather not use any of those. 
> Another option would be to create a java object that can be 
> referenced 
> statically to get to these variables (haven't worked that out either).
> 
> Then appart from the default page data there might be user 
> specific paga 
> date like the users preferred sort order, last 10 entered search 
> keywords etc. One could store these in the clientscope or the session 
> scope, but then these would be accessible from any other page 
> aswell. So 
> in this case there would be a pageSession and a pageClient scope to 
> handle these kinds of data.
> 
> I haven't worked out the details yet, but I'm open for any 
> ideas, pros, 
> cons etc.
> 
> Jesse
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to