Re: application variables and a clustered enviroment

2010-08-09 Thread James Holmes

You'll need a webservice or another remote method of supplying the
data to the other server.

--
WSS4CF - WS-Security framework for CF
http://wss4cf.riaforge.org/



On 9 August 2010 22:08, Chad McCue  wrote:
>
> My company has two servers each having enterprise level coldfusion 
> administrator installed on it. My site has code that will handle various 
> counters based on user activity via application variables, I will have a main 
> admin login that will be able to process these application variables and view 
> hit counters.
>
> My question is if my admin is logged in on server 1, how can I access the 
> numbers saved in the application variables by users that are on server 2 to 
> combine with the numbers from application variables on server 1?
>
> Is it possible to use server variables with the ability to reference them 
> from either server based on the servers IP?
>
> I am trying to do this without having to save the information in a DB table 
> so I don't have to handle adding and removing based on session timeout 
> issues, this data has to be as real time as possible.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336119
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: application variables

2006-06-14 Thread dave
lol, no kidding AND you'da had to ftp it himself and made sure it was in right 
directory.

But hell, I still mostly use dw

~Dave - formerly known as "the disruptor"~ 


From: "Dawson, Michael" <[EMAIL PROTECTED]>
Sent: Wednesday, June 14, 2006 5:39 PM
To: CF-Talk 
Subject: RE: application variables 

That wouldn't have happened if you were using Eclipse, right Dave? ;-)

(I just had to say it.)

M!ke 

-Original Message-
From: daniel kessler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 2:56 PM
To: CF-Talk
Subject: Re: application variables

alright, it was an odd Dreamweaver problem/user error.
I had the file open and then realized it was in the above directory. I
then moved the file into an inner directory (without closing the old
file and reopening it), then I adjusted the file and saved it. It saved
a new file to the above directory (instead of saving to the old file)
and all editing went to that new file that I didn't expect it to make.

jeez

sorry for the confusion.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243555
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


RE: application variables

2006-06-14 Thread Dawson, Michael
That wouldn't have happened if you were using Eclipse, right Dave?  ;-)

(I just had to say it.)

M!ke 

-Original Message-
From: daniel kessler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 2:56 PM
To: CF-Talk
Subject: Re: application variables

alright, it was an odd Dreamweaver problem/user error.
I had the file open and then realized it was in the above directory.  I
then moved the file into an inner directory (without closing the old
file and reopening it), then I adjusted the file and saved it.  It saved
a new file to the above directory (instead of saving to the old file)
and all editing went to that new file that I didn't expect it to make.

jeez

sorry for the confusion.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243554
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


re: application variables

2006-06-14 Thread dave
you might try to chance this:
 

to this

 

hey thats my bday:)

~Dave - formerly known as "the disruptor"~ 


From: dave <[EMAIL PROTECTED]>
Sent: Wednesday, June 14, 2006 3:51 PM
To: CF-Talk 
Subject: re: application variables 

maybe I missed something but that code doesnt have much to do with each 
other..
Just the "request.the_date" part.

Also why are you duplicating a session if it doesnt exist? Wouldn't it need to 
exist before you can duplicate it?

" 



Page Code:

#request.the_date#, 2006

10 am - 1 pm
 "

~Dave - formerly known as "the disruptor"~ 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243549
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


Re: application variables

2006-06-14 Thread daniel kessler
alright, it was an odd Dreamweaver problem/user error.
I had the file open and then realized it was in the above directory.  I then 
moved the file into an inner directory (without closing the old file and 
reopening it), then I adjusted the file and saved it.  It saved a new file to 
the above directory (instead of saving to the old file) and all editing went to 
that new file that I didn't expect it to make.

jeez

sorry for the confusion.

>Hmm .. can't do much without seeing your actual code, but maybe you 
>'redefine' your request scope after your Application.cfm has been run. 
>Something like
>
>
>   request = structNew();
>
>   /* Or maybe this */
>   structClear( request );
>
>
>Would easily remove your properly set variable in the request scope.
>
>But like I said: it's just a suggestion, and I can't really tell what's 
>going on without seeing any code. I guess you'll have to do some 
>hardcore debugging yourself, so good luck with that :)
>
>Rens
>
>daniel kessler wrote:
>>

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243548
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


Re: application variables

2006-06-14 Thread daniel kessler
alright, it was an odd Dreamweaver problem/user error.
I had the file open and then realized it was in the above directory.  I then 
moved the file into an inner directory (without closing the old file and 
reopening it), then I adjusted the file and saved it.  It saved a new file to 
the above directory (instead of saving to the old file) and all editing went to 
that new file that I didn't expect it to make.

jeez

sorry for the confusion.

>Hmm .. can't do much without seeing your actual code, but maybe you 
>'redefine' your request scope after your Application.cfm has been run. 
>Something like
>
>
>   request = structNew();
>
>   /* Or maybe this */
>   structClear( request );
>
>
>Would easily remove your properly set variable in the request scope.
>
>But like I said: it's just a suggestion, and I can't really tell what's 
>going on without seeing any code. I guess you'll have to do some 
>hardcore debugging yourself, so good luck with that :)
>
>Rens
>
>daniel kessler wrote:
>>

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243547
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: application variables

2006-06-14 Thread dave
" I did show the actual code. I pasted it into the first posting of this 
thread. Not sure what else you would need to see. "
The code you showed didnt have anything to do with each other, except the date 
part and if thats the only error then why not just put it on the page itself?

Or do a cfparam at the top with a default setting

~Dave - formerly known as "the disruptor"~ 





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243546
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: application variables

2006-06-14 Thread dave
Do you have another Application.cfm nested in a closer directory?

~Dave - formerly known as "the disruptor"~ 


From: daniel kessler <[EMAIL PROTECTED]>
Sent: Wednesday, June 14, 2006 3:19 PM
To: CF-Talk 
Subject: Re: application variables 

I am using cfoutput. I've not tried the others and in the past haven't needed 
them just to display a variable.
It gives the error:

Element THE_DATE is undefined in REQUEST.

>Have you used ,  or 
>enablecfoutputonly="true" /> perhaps? Did you use  .. ?
>
>What *does* it show? Nothing it all, or just not the contents of the 
>variable?
>
>Rens
>
>daniel kessler wrote:
>>



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243545
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


re: application variables

2006-06-14 Thread dave
maybe I missed something but that code doesnt have much to do with each 
other..
Just the "request.the_date" part.

Also why are you duplicating a session if it doesnt exist? Wouldn't it need to 
exist before you can duplicate it?

" 

 







Page Code:

#request.the_date#, 2006
10 am - 1 pm "

~Dave - formerly known as "the disruptor"~ 





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243544
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


Re: application variables

2006-06-14 Thread daniel kessler
I don't do structNew, but I could.  I know you're not suggesting it, but then 
I'd at least know it's there.

I did show the actual code.  I pasted it into the first posting of this thread. 
 Not sure what else you would need to see.

>Hmm .. can't do much without seeing your actual code, but maybe you 
>'redefine' your request scope after your Application.cfm has been run. 
>Something like
>
>
>   request = structNew();
>
>   /* Or maybe this */
>   structClear( request );
>
>

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243542
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: application variables

2006-06-14 Thread |Rens| > 0
Hmm .. can't do much without seeing your actual code, but maybe you 
'redefine' your request scope after your Application.cfm has been run. 
Something like


   request = structNew();

   /* Or maybe this */
   structClear( request );


Would easily remove your properly set variable in the request scope.

But like I said: it's just a suggestion, and I can't really tell what's 
going on without seeing any code. I guess you'll have to do some 
hardcore debugging yourself, so good luck with that :)

Rens

daniel kessler wrote:
>>> Try changing the name of your App. It's most likely caching the 
>> application
>>> variables as set up in the initial load of your app.cfm file. I've 
>> had that
>>> happen to me before and changing the app name did it for me.
> 
> It does appear to be something like this though.  I went for a walk to think 
> it through, came back and refreshed the page and it all worked fine.  I 
> refreshed again and I received the error again: Element THE_DATE is undefined 
> in REQUEST.
> 
> Here's the page:
> http://hhp.umd.edu/studentservices/CareerExpo/blocks/dsp_ExpoIndex.cfm?fuseaction=expohome
> 
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243540
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


Re: application variables

2006-06-14 Thread daniel kessler
> >Try changing the name of your App. It's most likely caching the 
> application
> >variables as set up in the initial load of your app.cfm file. I've 
> had that
> >happen to me before and changing the app name did it for me.

It does appear to be something like this though.  I went for a walk to think it 
through, came back and refreshed the page and it all worked fine.  I refreshed 
again and I received the error again: Element THE_DATE is undefined in REQUEST.

Here's the page:
http://hhp.umd.edu/studentservices/CareerExpo/blocks/dsp_ExpoIndex.cfm?fuseaction=expohome

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243539
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


Re: application variables

2006-06-14 Thread daniel kessler
I am using cfoutput.  I've not tried the others and in the past haven't needed 
them just to display a variable.
It gives the error:

Element THE_DATE is undefined in REQUEST.

>Have you used ,  or enablecfoutputonly="true" /> perhaps? Did you use  .. ?
>
>What *does* it show? Nothing it all, or just not the contents of the 
>variable?
>
>Rens
>
>daniel kessler wrote:
>>

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243538
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


Re: application variables

2006-06-14 Thread |Rens| > 0
Have you used ,  or  perhaps? Did you use  .. ?

What *does* it show? Nothing it all, or just not the contents of the 
variable?

Rens

daniel kessler wrote:
>> Try changing the name of your App. It's most likely caching the application
>> variables as set up in the initial load of your app.cfm file. I've had that
>> happen to me before and changing the app name did it for me.
> 
> I tried changing the app name and I still had the same response.  Restarting 
> the browser didn't help.
> 
> I then launched a different browser and it also displayed the information 
> correctly before I clicked refresh and then it gave me the same error.
> 
> 
> 
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243537
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: application variables

2006-06-14 Thread daniel kessler
>Try changing the name of your App. It's most likely caching the application
>variables as set up in the initial load of your app.cfm file. I've had that
>happen to me before and changing the app name did it for me.

I tried changing the app name and I still had the same response.  Restarting 
the browser didn't help.

I then launched a different browser and it also displayed the information 
correctly before I clicked refresh and then it gave me the same error.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243535
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: application variables

2006-06-14 Thread daniel kessler
I tried that and I had the same response.
I know the variable has info, cause I set it in the application.cfm and it's 
only set there.  As I understand it, that runs first before the page.

>Have you tried putting [] around the value... It might be there, just
>empty??

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243532
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


RE: application variables

2006-06-14 Thread Ben Nadel
Have you tried putting [] around the value... It might be there, just
empty??


...
Ben Nadel 
Web Developer
Nylon Technology
350 7th Avenue
Floor 10
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com
 
"Some people call me the space cowboy. Some people call me the gangster of
love."

-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 1:54 PM
To: CF-Talk
Subject: application variables

I'm doing something obviously wrong but can't seem to see it.

In my Application.cfm, I declare a variable and in a page, I use it.   
But it's not showing up.  The page at first displayed the information, but
it's not doing so now.  I have a cfapplication tag in the Application file
and it had a sessiontimeout, and when I removed the timeout, I stopped
getting the var.  Putting it back in didn't seem to help.  BTW, I am putting
this in the request scope and I was told to do that years ago, but I never
knew why and just do it cause I was told.  What is the request scope?

Here's my code.

Application.cfm



 






Page Code:

#request.the_date#, 2006 10 am - 1 pm



I'm just trying to put the information that I have displayed in several
places into one place to make it easy to change.

thanks.
_

Daniel Kessler

College of Health and Human Performance
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
Phone: 301-405-2545
http://hhp.umd.edu






~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243528
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


RE: application variables

2006-06-14 Thread Andy Matthews
Try changing the name of your App. It's most likely caching the application
variables as set up in the initial load of your app.cfm file. I've had that
happen to me before and changing the app name did it for me.



-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 14, 2006 12:54 PM
To: CF-Talk
Subject: application variables


I'm doing something obviously wrong but can't seem to see it.

In my Application.cfm, I declare a variable and in a page, I use it.
But it's not showing up.  The page at first displayed the
information, but it's not doing so now.  I have a cfapplication tag
in the Application file and it had a sessiontimeout, and when I
removed the timeout, I stopped getting the var.  Putting it back in
didn't seem to help.  BTW, I am putting this in the request scope and
I was told to do that years ago, but I never knew why and just do it
cause I was told.  What is the request scope?

Here's my code.

Application.cfm











Page Code:

#request.the_date#, 2006
10 am - 1 pm



I'm just trying to put the information that I have displayed in
several places into one place to make it easy to change.

thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243527
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Application variables from db?

2006-04-09 Thread Denny Valliant
On 4/9/06, Ken <[EMAIL PROTECTED]> wrote:
>
> Hi Charles. Got a question for you. Say you updated the value of  the
> field
> OrgShortname in the database, for one of the websites. How soon would the
> application variable associated with it get updated?
> Also, in your code, are you not loading the database too much, since you
> have the query in your application.cfm file. How often is this query going
> to run?


Since it's in Application.cfm, which gets run once per request, it's getting
run every request. Which means it's being "get" and "set" with each
request.  Sound place for a cgi type "if" deal, but the downside of having
the query in the application.cfm is it's getting run each request as well,
and depending on how you have your error trapping set up, you could hit a DB
error before you've set you db error handling, or whatnot.  Might make more
sense, if there aren't a lot of sites, to store the list in memory and
compare against that instead of running the query.

You can use a structClear() to clear the application and session scopes, not
to sure if the structClear on Application is kosher or not.

:Denny

-ps sorry for the lack of trimming/whatnot of my posts. Still getting used
to gmail's way, which is s freaking slick it's not funny. I really gotta
hand it to 'em, rocking UIs!


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237315
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Application variables from db?

2006-04-09 Thread Ken
Hi Charles. Got a question for you. Say you updated the value of  the field
OrgShortname in the database, for one of the websites. How soon would the
application variable associated with it get updated?
Also, in your code, are you not loading the database too much, since you
have the query in your application.cfm file. How often is this query going
to run?

Thanks,
Ken


On 4/9/06, Charles Sheehan-Miles <[EMAIL PROTECTED]> wrote:
>
> With the main app I'm working on, the first thing in application.cfm is a
> query to match the host header name against the correct website in the
> database, then everything else is determined from there, including the
> application name -- so I'm hosting multiple websites/customers off the
> same
> code base, depending on what is in the database.
>
>  ="#CreateTimespan(0,0,30,0)#">
> select * from rsOrganization where
> OrgServername = '#CGI.server_name#'
> 
>
>  setclientcookies="Yes"
>clientmanagement="Yes"
> clientstorage="hostingClientVariables"
>sessionmanagement="Yes"
> sessiontimeout="#CreateTimespan(0,4,0,0)#"
>
> applicationtimeout="#CreateTimespan(0,4,0,0)#" setdomaincookies="Yes">
>
>
>
>
> On 4/9/06 5:15 PM, "Ken" <[EMAIL PROTECTED]> wrote:
>
> > Hi. Is it ok to set certain application variables in application.cfmfrom
> > values stored in the database?
> > There are certain site-wide settings that I need to store in the
> database.
> > Then do this in the application.cfm file:
> >
> > 
> >
> > 
> > Select Settings from db Where 
> >  >
> > 
> >
> > 
> >
> > My questions are:
> > 1. Is it ok to set application variables using the above method?
> > 2. If I need to update the above Application.MySetting1 variable to a
> new
> > value, how will I do so?
> >
> > Thanks,
> >
> > Ken.
> >
> >
> >
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237307
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Application variables from db?

2006-04-09 Thread S . Isaac Dealey
> Hi. Is it ok to set certain application variables in
> application.cfm from
> values stored in the database?
> There are certain site-wide settings that I need to store
> in the database.
> Then do this in the application.cfm file:

> 

> 
> Select Settings from db Where 
>  

> 

> My questions are:
> 1. Is it ok to set application variables using the above
> method?
> 2. If I need to update the above Application.MySetting1
> variable to a new
> value, how will I do so?

> Thanks,

> Ken.

I don't think there's anything necessarily wrong with having variables
that are both in your database and in the application scope. I would
recomment a slightly different approach. I would construct a CFC which
accepts your dsn and clientid in its init method. I assume each row of
this table represents a different client using the same application. I
would then have the init method call a fetch method which fetches the
row for the indicated client and populates values in the CFC's
variables scope. Once that had been done I would implement a
getSetting method for fetching an individual setting, and store the
CFC in your application scope, thus, rather than referencing
application.setting1 in your application, you would reference
application.appMgr.getSetting("setting1") or possibly
application.appMgr.getSetting1() if you prefer individual accessor
methods.

The advantage of this is that if you need to change the manner in
which the settings are stored or managed later, it will be easiest to
do that internally within the CFC if your application references this
method, instead of directly referencing an application variable.
Another setSetting() or individual setSetting1() methods can then
update the CFC and the database (or other storage medium)
simultanously.

Now here's the rub. Do you need to manage these settings in a central
application (one that can manage multiple client applications
simultanously) or only within each individual application? If you
don't need a centralized application for managing these, then it's
pretty straightforward, and you can use the onApplicationStart method
of your Application.cfc to instantiate and store your appMgr cfc in
the application scope.

If you need a centralized application then you'll have to find some
way to get the data into each individual application when you update
it. One way to do this is to use the cfapplication tag in your central
application to temporarily relocate the current request into the
target application and update its appMgr cfc -- the problem you'll
experience with this approach will be to ensure that the application
has already started, because if you use cfapplication to initialize
the application name, the ColdFusion server won't know where to look
for the Application.cfc and so it won't execute the onApplicationStart
method. Using a simple http request for the application's login or
home page using the cfhttp tag may be enough to ensure it's started
before making changes. An alternative would be to build a webservice
into each subordinate application, which of course brings other
challenges with it.



s. isaac dealey 434.293.6201
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237305
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


Re: Application variables from db?

2006-04-09 Thread Charles Sheehan-Miles
With the main app I'm working on, the first thing in application.cfm is a
query to match the host header name against the correct website in the
database, then everything else is determined from there, including the
application name -- so I'm hosting multiple websites/customers off the same
code base, depending on what is in the database.


select * from rsOrganization where
OrgServername = '#CGI.server_name#'







On 4/9/06 5:15 PM, "Ken" <[EMAIL PROTECTED]> wrote:

> Hi. Is it ok to set certain application variables in application.cfm from
> values stored in the database?
> There are certain site-wide settings that I need to store in the database.
> Then do this in the application.cfm file:
> 
> 
> 
> 
> Select Settings from db Where 
>  
> 
> 
> 
> 
> My questions are:
> 1. Is it ok to set application variables using the above method?
> 2. If I need to update the above Application.MySetting1 variable to a new
> value, how will I do so?
> 
> Thanks,
> 
> Ken.
> 
> 
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237304
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Application variables default timeout iin CFAdmin

2006-01-27 Thread James Holmes
It's up to you - if an application that hasn't been visited in three
years is important, then set it to 999 days. You may decide the memory
saving is worth a shorter timeout.

On 1/27/06, Baz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In the CFAdmin, under 'Memory Variables', there's a default application
> variables timeout setting. I personally don't want my application variables
> to ever timeout, is it common practice to just put 999 days? Are there any
> issues to this? Is there any reason to want your app variables to timeout
> often?

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230565
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Application Variables

2004-11-09 Thread Andrew Dixon
Hi Ian.

That is what I thought, but it was worth checking.

Thanks.

Andrew.


On Tue, 9 Nov 2004 08:43:02 -0800, Ian Skinner
<[EMAIL PROTECTED]> wrote:
> The latter, you will have to do something more sophisticated to remove the 
> variables.  Something along the lines of storing their creation data/time and 
> then removing the values after the hour is up.
> 
> --
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
> 
> "C code. C code run. Run code run. Please!"
> - Cynthia Dunning
> 
> Confidentiality Notice:  This message including any
> attachments is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the
> intended recipient, please contact the sender and
> delete any copies of this message.
> 
> 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183806
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Application Variables

2004-11-09 Thread Ian Skinner
The latter, you will have to do something more sophisticated to remove the 
variables.  Something along the lines of storing their creation data/time and 
then removing the values after the hour is up.


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

"C code. C code run. Run code run. Please!"
- Cynthia Dunning



Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183750
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


Re: Application Variables in a CFC

2004-01-15 Thread Mickael
Thanks Massimo, that explains it
  - Original Message - 
  From: Massimo Foti 
  To: CF-Talk 
  Sent: Thursday, January 15, 2004 8:50 AM
  Subject: Re: Application Variables in a CFC

  You can read an explanation here:

  http://www.cfczone.org/faq.cfm#q10

  
  Massimo Foti
  http://www.massimocorner.com

  Co-Author of Dreamweaver MX 2004 Magic:
  http://www.dwmagic.com/
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application Variables in a CFC

2004-01-15 Thread Hassan Arteaga Rodriguez
Try datesource="#Application.dsn#". U should declare it in Application.cfm
page.

 
Regards  

 
__
MSc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer.
DIGI- Grupo de Desarrollo
COPEXTEL, S.A.

  _  

From: Mickael [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 15, 2004 08:49 AM
To: CF-Talk
Subject: Application Variables in a CFC

Hello All,

I have started to learn to use CFC's.  I tried making a simple CFC to
performs a query that I need on may parts of my site.

In all my cfquery tags I use datesource="#dsn#" and it works fine.  When I
add this to the CFC it errors out.  Yet it I place the actual DSN name from
the ODBC connection it works?  Is this a problem with me not scoping the
variable?  Shouldn't my application.cfm declare this prior to the CFC
loading?

Thanks 

Mike 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Application Variables in a CFC

2004-01-15 Thread Massimo Foti
You can read an explanation here:

http://www.cfczone.org/faq.cfm#q10


Massimo Foti
http://www.massimocorner.com

Co-Author of Dreamweaver MX 2004 Magic:
http://www.dwmagic.com/
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-10 Thread Ricky Fritzsching
Thanks Tim! I will definitely try that out.

 
Ricky

  _  

From: Tim Blair [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 3:34 AM
To: CF-Talk
Subject: RE: Application variables between two applications

> Now, how could I call this same object from the differenct 
> application? You would think since it is in memory, there has 
> to be way that I can retreive it.

You can use the underlying java of CF to get a hold of the application
scope for any currently active application:


  // application tracker object
  appObj = createObject("java",
"coldfusion.runtime.ApplicationScopeTracker");
  // get "external" app scope
  appScope = appObj.getApplicationScope("myappname");


Note that this is "undocumented" and so could well change in a future
release of CF.  Also if the app name you give it doesn't exist it won't
error - you'll just get a java null value back, which CF isn't too hot
on handling...

For more info on using the ApplicationScopeTracker and similar
SessionTracker have a look at
http://tech.badpen.com/index.cfm?mode=entry
 &entry=3

HTH,

Tim.

---
RAWNET LTD - Internet, New Media and ebusiness Gurus.
Visit our new website at http://www.rawnet.com for
more information about our company, or call us free
anytime on 0800 294 24 24.
---
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,

unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
--- 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-10 Thread Tim Blair
> Now, how could I call this same object from the differenct 
> application? You would think since it is in memory, there has 
> to be way that I can retreive it.

You can use the underlying java of CF to get a hold of the application
scope for any currently active application:


  // application tracker object
  appObj = createObject("java",
"coldfusion.runtime.ApplicationScopeTracker");
  // get "external" app scope
  appScope = appObj.getApplicationScope("myappname");


Note that this is "undocumented" and so could well change in a future
release of CF.  Also if the app name you give it doesn't exist it won't
error - you'll just get a java null value back, which CF isn't too hot
on handling...

For more info on using the ApplicationScopeTracker and similar
SessionTracker have a look at
http://tech.badpen.com/index.cfm?mode=entry&entry=3

HTH,

Tim.

---
RAWNET LTD - Internet, New Media and ebusiness Gurus.
Visit our new website at http://www.rawnet.com for
more information about our company, or call us free
anytime on 0800 294 24 24.
---
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread Jim Davis
There was thread on this just a few days ago on alt.comp.lang.coldfusion -
see it here:

 
http://groups.google.com/groups?hl=en

365%40enews1.newsguy.com&rnum=1>
&lr=&ie=UTF-8&oe=UTF-8&threadm=bqtqji0365%40enews1.newsguy.com&rnum=1

 
I've got a long post in there talking about how to do this - and which
describes one method for doing this using references (if you know what
you're doing).

 
Jim Davis

 
  _  

From: Ricky Fritzsching [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 11:21 AM
To: CF-Talk
Subject: Application variables between two applications

 
I have an administrative application that has persistent application
variables that I would like to share into another application on the
production side. 
When a user makes a change in the admin, it refreshes the persistence of the
variables and I need it somehow to change in both the admin and production
application.

Any ideas?

---
Ricky Fritzsching
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread Ian Skinner
If a subdirectory defines it's own application name, there will be a new
application scope in that directory and below.  The other application scope
still exists, and if and when a file is called outside the sub-directory but
under the original application, those variables are again available.

 
We use this in our intranet, to parse off sections of our intranet that we
want to behave differently.

-- 
Ian Skinner 
Web Programmer 
BloodSource 
www.BloodSource.org 
Sacramento, CA 

-Original Message-
From: John Burns [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 9:49 AM
To: CF-Talk
Subject: RE: Application variables between two applications

I would guess this is the reason for naming the application so that you
_cannot_ access the variables from other applications.  Imagine if you
stored sensitive data in one application and it was somehow available within
another application. (Especially in a shared hosting environment)

I'm curious, however, what would happen if you had an application.cfm in the
webroot that grabbed all of the information that you needed for any of your
applications underneath that root.  Then, I believe, they would all
automatically inherit those application variables.  Anyone have more insight
on the workings of application.cfm in multiple directories?

Example:

WEBROOT

  -application.cfm

|_ APPLICATION 1

|   -application.cfm

|_ APPLICATION 2

|   -application.cfm

John Burns

-Original Message-
From: Ricky Fritzsching [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 12:27 PM
To: CF-Talk
Subject: RE: Application variables between two applications

I have all the business logic in CFC's, but I am using many objects for
these CFC's that pull the data in the application scope.

For example, in my admin application I am using this to refresh my data set
once the data has been manipulated.



application.oPartnerCollection.Select_Corps(oPartner.Partner_ID,"0","true");


Now, how could I call this same object from the differenct application? You
would think since it is in memory, there has to be way that I can retreive
it.

Thx so far - your making think about ways that I can correct this in the
future. 

Ricky

  _  

From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 11:00 AM
To: CF-Talk
Subject: RE: Application variables between two applications

> The admin tool is for the other website. So in a nutshell, 
> are you suggesting that I just rename the application name in 
> the other website to match name of the application in the admin?
>

No, not if the applications aren't truly the same.

> Server variables - hmm...that might be a thought.
>

Just be aware that other apps on the box will also have access to the data.
Really only an issue if you are on a shared machine.

> I would prefer to keep them in the app scope, but if I have 
> to use the server scope that is ok.

You can consider using CFCs as well. App1 would ping App2's CFC and request
the data from it. 
  _

  _ 
   _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread Bert Dawson
What about using the server scope?

Bert

-Original Message-
From: Ricky Fritzsching [mailto:[EMAIL PROTECTED] 
Sent: 09 December 2003 16:21
To: CF-Talk
Subject: Application variables between two applications

I have an administrative application that has persistent application
variables that I would like to share into another application on the
production side. 
When a user makes a change in the admin, it refreshes the persistence of the
variables and I need it somehow to change in both the admin and production
application.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread John Burns
I would guess this is the reason for naming the application so that you
_cannot_ access the variables from other applications.  Imagine if you
stored sensitive data in one application and it was somehow available within
another application. (Especially in a shared hosting environment)

I'm curious, however, what would happen if you had an application.cfm in the
webroot that grabbed all of the information that you needed for any of your
applications underneath that root.  Then, I believe, they would all
automatically inherit those application variables.  Anyone have more insight
on the workings of application.cfm in multiple directories?

Example:

WEBROOT

  -application.cfm

|_ APPLICATION 1

|   -application.cfm

|_ APPLICATION 2

|   -application.cfm

John Burns

-Original Message-
From: Ricky Fritzsching [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 12:27 PM
To: CF-Talk
Subject: RE: Application variables between two applications

I have all the business logic in CFC's, but I am using many objects for
these CFC's that pull the data in the application scope.

For example, in my admin application I am using this to refresh my data set
once the data has been manipulated.



application.oPartnerCollection.Select_Corps(oPartner.Partner_ID,"0","true");


Now, how could I call this same object from the differenct application? You
would think since it is in memory, there has to be way that I can retreive
it.

Thx so far - your making think about ways that I can correct this in the
future. 

Ricky

  _  

From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 11:00 AM
To: CF-Talk
Subject: RE: Application variables between two applications

> The admin tool is for the other website. So in a nutshell, 
> are you suggesting that I just rename the application name in 
> the other website to match name of the application in the admin?
>

No, not if the applications aren't truly the same.

> Server variables - hmm...that might be a thought.
>

Just be aware that other apps on the box will also have access to the data.
Really only an issue if you are on a shared machine.

> I would prefer to keep them in the app scope, but if I have 
> to use the server scope that is ok.

You can consider using CFCs as well. App1 would ping App2's CFC and request
the data from it. 
  _

  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread Ricky Fritzsching
I have all the business logic in CFC's, but I am using many objects for
these CFC's that pull the data in the application scope.

 
For example, in my admin application I am using this to refresh my data set
once the data has been manipulated.

 


 
application.oPartnerCollection.Select_Corps(oPartner.Partner_ID,"0","true");


 
Now, how could I call this same object from the differenct application? You
would think since it is in memory, there has to be way that I can retreive
it.

 
Thx so far - your making think about ways that I can correct this in the
future. 

 
Ricky

  _  

From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 11:00 AM
To: CF-Talk
Subject: RE: Application variables between two applications

> The admin tool is for the other website. So in a nutshell, 
> are you suggesting that I just rename the application name in 
> the other website to match name of the application in the admin?
>

No, not if the applications aren't truly the same.

> Server variables - hmm...that might be a thought.
>

Just be aware that other apps on the box will also have access to the data.
Really only an issue if you are on a shared machine.

> I would prefer to keep them in the app scope, but if I have 
> to use the server scope that is ok.

You can consider using CFCs as well. App1 would ping App2's CFC and request
the data from it. 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread Raymond Camden
> The admin tool is for the other website. So in a nutshell, 
> are you suggesting that I just rename the application name in 
> the other website to match name of the application in the admin?
>

No, not if the applications aren't truly the same.

> Server variables - hmm...that might be a thought.
>

Just be aware that other apps on the box will also have access to the data.
Really only an issue if you are on a shared machine.

> I would prefer to keep them in the app scope, but if I have 
> to use the server scope that is ok.

You can consider using CFCs as well. App1 would ping App2's CFC and request
the data from it.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread Ricky Fritzsching
The admin tool is for the other website. So in a nutshell, are you
suggesting that I just rename the application name in the other website to
match name of the application in the admin?

 
Server variables - hmm...that might be a thought.

 
I would prefer to keep them in the app scope, but if I have to use the
server scope that is ok.

 
Ricky

  _  

From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 10:40 AM
To: CF-Talk
Subject: RE: Application variables between two applications

Is the Admin tool _for_ the other web site? If so, then just share
application names. Otherwise, you can consider using server variables to
share data between the apps. Other options include using the ServiceFactory
methods which are not supported but work pretty well. 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Application variables between two applications

2003-12-09 Thread Raymond Camden
Is the Admin tool _for_ the other web site? If so, then just share
application names. Otherwise, you can consider using server variables to
share data between the apps. Other options include using the ServiceFactory
methods which are not supported but work pretty well.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Application variables

2002-11-25 Thread Jeffry Houser
  I believe you are mixing up request and application variables.

  If the application.cfm is running, then it is safe to assume that this is 
a new page request, and request variables have not been defined yet (unless 
they were defined earlier in the Application.cfm )

  Additionally, if you feel safe assuming that if the one you check for is 
not set, then none are not set, use cfset ( or even better CFSCript) to set 
the variables.  This will allow you to avoid the extra overhead with cfparam.

At 11:09 AM 11/25/2002 -0800, you wrote:
>Nope.  I will generally test for the existence of one of my REQUEST vars in
>Application.cfm.  If it doesn't exist I assume none of them are set and I
>use CFPARAM to set them all.  Once set they won't be reset on every page.
>If I ever need to reset them, I just comment out the CFIF that checks for
>the existence of one of them and re-save the file and hit any page in the
>system.
>
>HTH
>
>Bryan Stevenson B.Comm.
>VP & Director of E-Commerce Development
>Electric Edge Systems Group Inc.
>t. 250.920.8830
>e. [EMAIL PROTECTED]
>
>-
>Macromedia Associate Partner
>www.macromedia.com
>-
>Vancouver Island ColdFusion Users Group
>Founder & Director
>www.cfug-vancouverisland.com
>- Original Message -
>From: "Andy Ousterhout" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Monday, November 25, 2002 10:57 AM
>Subject: RE: Application variables
>
>
> > Do you have to set them each time, for each page?
> >
> > -----Original Message-----
> > From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 25, 2002 12:40 PM
> > To: CF-Talk
> > Subject: Re: Application variables
> >
> >
> > Well a big plus is that you don't need to lock REQUEST scoped vars.
> >
> > Bryan Stevenson B.Comm.
> > VP & Director of E-Commerce Development
> > Electric Edge Systems Group Inc.
> > t. 250.920.8830
> > e. [EMAIL PROTECTED]
> >
> > -
> > Macromedia Associate Partner
> > www.macromedia.com
> > -
> > Vancouver Island ColdFusion Users Group
> > Founder & Director
> > www.cfug-vancouverisland.com
> > - Original Message -
> > From: "Andy Ousterhout" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Monday, November 25, 2002 10:31 AM
> > Subject: RE: Application variables
> >
> >
> > > What's are the Pro's and Con's  of using Request Variables over
> > Application
> > > Var?
> > >
> > > -Original Message-
> > > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, November 25, 2002 12:16 PM
> > > To: CF-Talk
> > > Subject: Re: Application variables
> > >
> > >
> > > You can overwrite them with  ... though I typically use  > > request.myapp.myvar = "something"> instead of application variables for
> > this
> > > sort of thing also. The app could be using  tags instead of
> > 
> > > tags in which case it would chew through the xml file on each request
> > > unecessarily since the param won't overwrite the existing value.
> > >
> > > Or it could use something like  > > structkeyexists(application,"init")> to determine when to load the
> > > application vars, in which case, it won't reload them when you modify
>the
> > > xml file because application.init already exists. You could use a url
> > > variable to force the app to reload the xml file in this situation,
> > however,
> > > which wouldn't be too tough to accomplish or too hard on the server...
> > >
> > >  > > default="#yesnoformat(not structkeyexists(application,"init"))#">
> > > 
> > > ... chew up the xml file here ...
> > > 
> > >
> > > Then when you update the xml file, just load the application's default
> > page
> > > with &init=true in the query string
> > >
> > > > You have to restart CF to reset APPLICATION vars (timing out the app
> > might
> > > > work too).
> > >
> > > > Personally I like to use REQUEST scope over APPLICATION scope ;-)
> > >
> > > > Bryan Stevenson B.Comm.
> > > > VP & Direct

Re: Application variables

2002-11-25 Thread Bryan Stevenson
wasn't my idea ;-)

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

-
Macromedia Associate Partner
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
- Original Message -
From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 12:29 PM
Subject: Re: Application variables


> > Bryan Stevenson wrote:
> >> You have to restart CF to reset APPLICATION vars (timing
> >> out the app might
> >> work too).
>
>
> > application=strucnew();
>
> I'm not necessarily convinced that would clear the application scope
rather
> than creating a local variable called application.
>
> structclear(application); might be better.
>
> s. isaac dealey954-776-0046
>
> new epoch  http://www.turnkey.to
>
> lead architect, tapestry cms   http://products.turnkey.to
>
> certified advanced coldfusion 5 developer
> http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
>
>
> 
~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: Application variables

2002-11-25 Thread Bryan Stevenson
Nope.  I will generally test for the existence of one of my REQUEST vars in
Application.cfm.  If it doesn't exist I assume none of them are set and I
use CFPARAM to set them all.  Once set they won't be reset on every page.
If I ever need to reset them, I just comment out the CFIF that checks for
the existence of one of them and re-save the file and hit any page in the
system.

HTH

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

-
Macromedia Associate Partner
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
- Original Message -
From: "Andy Ousterhout" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 10:57 AM
Subject: RE: Application variables


> Do you have to set them each time, for each page?
>
> -Original Message-
> From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 12:40 PM
> To: CF-Talk
> Subject: Re: Application variables
>
>
> Well a big plus is that you don't need to lock REQUEST scoped vars.
>
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]
>
> -
> Macromedia Associate Partner
> www.macromedia.com
> -
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> - Original Message -
> From: "Andy Ousterhout" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 10:31 AM
> Subject: RE: Application variables
>
>
> > What's are the Pro's and Con's  of using Request Variables over
> Application
> > Var?
> >
> > -Original Message-
> > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 25, 2002 12:16 PM
> > To: CF-Talk
> > Subject: Re: Application variables
> >
> >
> > You can overwrite them with  ... though I typically use  > request.myapp.myvar = "something"> instead of application variables for
> this
> > sort of thing also. The app could be using  tags instead of
> 
> > tags in which case it would chew through the xml file on each request
> > unecessarily since the param won't overwrite the existing value.
> >
> > Or it could use something like  > structkeyexists(application,"init")> to determine when to load the
> > application vars, in which case, it won't reload them when you modify
the
> > xml file because application.init already exists. You could use a url
> > variable to force the app to reload the xml file in this situation,
> however,
> > which wouldn't be too tough to accomplish or too hard on the server...
> >
> >  > default="#yesnoformat(not structkeyexists(application,"init"))#">
> > 
> > ... chew up the xml file here ...
> > 
> >
> > Then when you update the xml file, just load the application's default
> page
> > with &init=true in the query string
> >
> > > You have to restart CF to reset APPLICATION vars (timing out the app
> might
> > > work too).
> >
> > > Personally I like to use REQUEST scope over APPLICATION scope ;-)
> >
> > > Bryan Stevenson B.Comm.
> > > VP & Director of E-Commerce Development
> > > Electric Edge Systems Group Inc.
> > > t. 250.920.8830
> > > e. [EMAIL PROTECTED]
> >
> > > -
> > > Macromedia Associate Partner
> > > www.macromedia.com
> > > -
> > > Vancouver Island ColdFusion Users Group
> > > Founder & Director
> > > www.cfug-vancouverisland.com
> > > - Original Message -
> > > From: "Cutter (CF_Talk)" <[EMAIL PROTECTED]>
> > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > Sent: Monday, November 25, 2002 10:00 AM
> > > Subject: Application variables
> >
> >
> > >> I've been on http://www.benorama.com looking at a CF design pattern.
In
> > >> this tutorial it talks about using your Application.cfm to call
> > >> _init.cfm, which parses through an xml file to create your
application
> > >> variables. I've done this (very closely following the sample app).
I've
> > >> created a page using cfdump to show me the application variables, but
> > >> when I change my xml doc and refresh my page the application
variables
> > >> do not appear to update? Any ideas?
> > >>
> > >> Cutter
> > >>
> > >>
> > >
> >
> >
>
> 
~|
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



RE: Application variables

2002-11-25 Thread S . Isaac Dealey
Storing variables in the application scope allows you to temporarily change
application-wide settings, which can be useful at times, for instance, if
you had an application which required scheduled maintenance to take several
minutes ( or hours or however long ), it's possible you might want to log
all users out or at least just preven them from making updates which might
interfere with the maintenance, in which case, you would want to use
something like this




in your application.cfm template -- then in the template for your scheduled
task to perform maintenance, you would use




... do maintenance here ...




On CF 5 you would want to lock references to your
application.maintenanceperiod variable, however, the viability of this as a
means of isolating the maintenance routine is still good in either CF 5 or
CF MX.

On the other hand, I would tend to avoid placing variables like datasource
names, server addresses ( mail server for instance ) and url's in the
application scope because these variables change rarely and usually not for
short periods of time, so imo placing them in the application scope is an
unnecessary use of persistent memory and it's best to just declare them in
the application.cfm or the like and then update that template when changes
are necessary.

I'm not saying this is "best case" or anything -- just my opinions about it.

s. isaac dealey954-776-0046

new epoch  http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


>   I would agree.  At a conceptual level.  If a variable is
>   being used a
> lot, however, it may make not make sense to store it in a
> local (or
> request) variable to avoid the need for locks.

>   Of course, that was in CF5.  I don't know of best
>   practices for CFMX yet.

> At 01:08 PM 11/25/2002 -0600, you wrote:
>>So, it seems to me that in a purist sense, common values
>>across all Users
>>belong in application variables.
>>
>>-Original Message-
>>From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, November 25, 2002 1:06 PM
>>To: CF-Talk
>>Subject: Re: Application variables
>>
>>
>>   Request variables and Application variables are two
>>   completely different
>>things, so i don't know if they deserve direct comparison.
>>It depends what
>>you want to use them for.
>>
>>   Request variables exist during a single page execution.
>>   They are not persistent across page requests.
>>   You do not need to lock them.
>>   If 100 users hit the same page at once, then 100
>>   instances of each
>>request variable will exist simultaneously.
>>   Request variables are available to all templates in the
>>   request,
>>including custom tags.  Because of this, I like to say
>>that they are global
>>to the request.  Many people use them to avoid passing
>>parameters into
>>custom tags.  I feel that is the only use for them over
>>local variables
>>(I.E. the variables scope ).
>>
>>   Application variables are locked into an application
>>   via the
>>cfapplication tag.
>>   They are persistent across page requests.
>>   You really should lock them.
>>If 100 users hit the same page at once, then only 1
>>copy of each
>>application variable will exist.
>>They are available to all templates in the request,
>>including custom
>>tags.
>>
>>Does that give you enough to go on?
>>
>>
>>At 10:40 AM 11/25/2002 -0800, you wrote:
>> >From: "Andy Ousterhout" <[EMAIL PROTECTED]>
>> >To: "CF-Talk" <[EMAIL PROTECTED]>
>> >Sent: Monday, November 25, 2002 10:31 AM
>> >Subject: RE: Application variables
>> >
>> >
>> > > What's are the Pro's and Con's  of using Request
>> > > Variables over
>> >Application
>> > > Var?
>> > >
>>
>>
>>
>>--
>>Jeffry Houser | mailto:[EMAIL PROTECTED]
>>DotComIt, Putting you on the web
>>AIM: Reboog711  | Phone: 1-203-379-0773
>>--
>>My CFMX Book:
>><http://www.amazon.com/exec/obidos/ASIN/0072225564/instant
>>coldfu-20>
>>My Books: http://www.instantcoldfusion.com
>>My Band: http://www.farcryfly.com
>>
>>
>>
> ~~
> ~~~|
> 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
> This list and all House of Fusion resources hosted by
> CFHosting.com. The place for dependable ColdFusion
> Hosting.


~|
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



Re: Application variables

2002-11-25 Thread S . Isaac Dealey
> Bryan Stevenson wrote:
>> You have to restart CF to reset APPLICATION vars (timing
>> out the app might
>> work too).


> application=strucnew();

I'm not necessarily convinced that would clear the application scope rather
than creating a local variable called application.

structclear(application); might be better.

s. isaac dealey954-776-0046

new epoch  http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Application variables

2002-11-25 Thread Jeffry Houser
  I would agree.  At a conceptual level.  If a variable is being used a 
lot, however, it may make not make sense to store it in a local (or 
request) variable to avoid the need for locks.

  Of course, that was in CF5.  I don't know of best practices for CFMX yet.

At 01:08 PM 11/25/2002 -0600, you wrote:
>So, it seems to me that in a purist sense, common values across all Users
>belong in application variables.
>
>-Original Message-
>From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
>Sent: Monday, November 25, 2002 1:06 PM
>To: CF-Talk
>Subject: Re: Application variables
>
>
>   Request variables and Application variables are two completely different
>things, so i don't know if they deserve direct comparison.  It depends what
>you want to use them for.
>
>   Request variables exist during a single page execution.
>   They are not persistent across page requests.
>   You do not need to lock them.
>   If 100 users hit the same page at once, then 100 instances of each
>request variable will exist simultaneously.
>   Request variables are available to all templates in the request,
>including custom tags.  Because of this, I like to say that they are global
>to the request.  Many people use them to avoid passing parameters into
>custom tags.  I feel that is the only use for them over local variables
>(I.E. the variables scope ).
>
>   Application variables are locked into an application via the
>cfapplication tag.
>   They are persistent across page requests.
>   You really should lock them.
>If 100 users hit the same page at once, then only 1 copy of each
>application variable will exist.
>They are available to all templates in the request, including custom
>tags.
>
>Does that give you enough to go on?
>
>
>At 10:40 AM 11/25/2002 -0800, you wrote:
> >From: "Andy Ousterhout" <[EMAIL PROTECTED]>
> >To: "CF-Talk" <[EMAIL PROTECTED]>
> >Sent: Monday, November 25, 2002 10:31 AM
> >Subject: RE: Application variables
> >
> >
> > > What's are the Pro's and Con's  of using Request Variables over
> >Application
> > > Var?
> > >
>
>
>
>--
>Jeffry Houser | mailto:[EMAIL PROTECTED]
>DotComIt, Putting you on the web
>AIM: Reboog711  | Phone: 1-203-379-0773
>--
>My CFMX Book:
><http://www.amazon.com/exec/obidos/ASIN/0072225564/instantcoldfu-20>
>My Books: http://www.instantcoldfusion.com
>My Band: http://www.farcryfly.com
>
>
>
~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Application variables

2002-11-25 Thread S . Isaac Dealey
Yea, you'd just use something like this in your application.cfm template:



https://www.mydomain.com/securelogin/index.cfm";>

etc...

> Do you have to set them each time, for each page?

> -Original Message-
> From: Bryan Stevenson
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 12:40 PM
> To: CF-Talk
> Subject: Re: Application variables


> Well a big plus is that you don't need to lock REQUEST
> scoped vars.

> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]

> -
> Macromedia Associate Partner
> www.macromedia.com
> -
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> - Original Message -
> From: "Andy Ousterhout" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 10:31 AM
> Subject: RE: Application variables


>> What's are the Pro's and Con's  of using Request
>> Variables over
> Application
>> Var?
>>
>> -Original Message-
>> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, November 25, 2002 12:16 PM
>> To: CF-Talk
>> Subject: Re: Application variables
>>
>>
>> You can overwrite them with  ... though I
>> typically use > request.myapp.myvar = "something"> instead of application
>> variables for
> this
>> sort of thing also. The app could be using  tags
>> instead of
> 
>> tags in which case it would chew through the xml file on
>> each request
>> unecessarily since the param won't overwrite the existing
>> value.
>>
>> Or it could use something like > structkeyexists(application,"init")> to determine when to
>> load the
>> application vars, in which case, it won't reload them
>> when you modify the
>> xml file because application.init already exists. You
>> could use a url
>> variable to force the app to reload the xml file in this
>> situation,
> however,
>> which wouldn't be too tough to accomplish or too hard on
>> the server...
>>
>> > default="#yesnoformat(not
>> structkeyexists(application,"init"))#">
>> 
>> ... chew up the xml file here ...
>> 
>>
>> Then when you update the xml file, just load the
>> application's default
> page
>> with &init=true in the query string
>>
>> > You have to restart CF to reset APPLICATION vars
>> > (timing out the app
> might
>> > work too).
>>
>> > Personally I like to use REQUEST scope over APPLICATION
>> > scope ;-)
>>
>> > Bryan Stevenson B.Comm.
>> > VP & Director of E-Commerce Development
>> > Electric Edge Systems Group Inc.
>> > t. 250.920.8830
>> > e. [EMAIL PROTECTED]
>>
>> > ---
>> > --
>> > Macromedia Associate Partner
>> > www.macromedia.com
>> > ---
>> > --
>> > Vancouver Island ColdFusion Users Group
>> > Founder & Director
>> > www.cfug-vancouverisland.com
>> > - Original Message -
>> > From: "Cutter (CF_Talk)" <[EMAIL PROTECTED]>
>> > To: "CF-Talk" <[EMAIL PROTECTED]>
>> > Sent: Monday, November 25, 2002 10:00 AM
>> > Subject: Application variables
>>
>>
>> >> I've been on http://www.benorama.com looking at a CF
>> >> design pattern. In
>> >> this tutorial it talks about using your
>> >> Application.cfm to call
>> >> _init.cfm, which parses through an xml file to create
>> >> your application
>> >> variables. I've done this (very closely following the
>> >> sample app). I've
>> >> created a page using cfdump to show me the application
>> >> variables, but
>> >> when I change my xml doc and refresh my page the
>> >> application variables
>> >> do not appear to update? Any ideas?
>> >>
>> >> Cutter
>> >>
>> >>
>> >
>>
>>

> ~~
> ~~~|
> 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


s. isaac dealey954-776-0046

new epoch  http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Application variables

2002-11-25 Thread S . Isaac Dealey
And this doesn't suffer from the confusion of race conditions either since
you can't have a race condition caused by a request var.

> Well a big plus is that you don't need to lock REQUEST
> scoped vars.

> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]

> -
> Macromedia Associate Partner
> www.macromedia.com
> -
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> - Original Message -
> From: "Andy Ousterhout" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 10:31 AM
> Subject: RE: Application variables


>> What's are the Pro's and Con's  of using Request
>> Variables over
> Application
>> Var?
>>
>> -Original Message-
>> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, November 25, 2002 12:16 PM
>> To: CF-Talk
>> Subject: Re: Application variables
>>
>>
>> You can overwrite them with  ... though I
>> typically use > request.myapp.myvar = "something"> instead of application
>> variables for
> this
>> sort of thing also. The app could be using  tags
>> instead of
> 
>> tags in which case it would chew through the xml file on
>> each request
>> unecessarily since the param won't overwrite the existing
>> value.
>>
>> Or it could use something like > structkeyexists(application,"init")> to determine when to
>> load the
>> application vars, in which case, it won't reload them
>> when you modify the
>> xml file because application.init already exists. You
>> could use a url
>> variable to force the app to reload the xml file in this
>> situation,
> however,
>> which wouldn't be too tough to accomplish or too hard on
>> the server...
>>
>> > default="#yesnoformat(not
>> structkeyexists(application,"init"))#">
>> 
>> ... chew up the xml file here ...
>> 
>>
>> Then when you update the xml file, just load the
>> application's default
> page
>> with &init=true in the query string
>>
>> > You have to restart CF to reset APPLICATION vars
>> > (timing out the app
> might
>> > work too).
>>
>> > Personally I like to use REQUEST scope over APPLICATION
>> > scope ;-)
>>
>> > Bryan Stevenson B.Comm.
>> > VP & Director of E-Commerce Development
>> > Electric Edge Systems Group Inc.
>> > t. 250.920.8830
>> > e. [EMAIL PROTECTED]


s. isaac dealey954-776-0046

new epoch  http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


~|
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
Get the mailserver that powers this list at http://www.coolfusion.com



Re: Application variables

2002-11-25 Thread Zac Spitzer
Bryan Stevenson wrote:
> You have to restart CF to reset APPLICATION vars (timing out the app might
> work too).


application=strucnew();

z

~|
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



RE: Application variables

2002-11-25 Thread Andy Ousterhout
So, it seems to me that in a purist sense, common values across all Users
belong in application variables.

-Original Message-
From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 1:06 PM
To: CF-Talk
Subject: Re: Application variables


  Request variables and Application variables are two completely different
things, so i don't know if they deserve direct comparison.  It depends what
you want to use them for.

  Request variables exist during a single page execution.
  They are not persistent across page requests.
  You do not need to lock them.
  If 100 users hit the same page at once, then 100 instances of each
request variable will exist simultaneously.
  Request variables are available to all templates in the request,
including custom tags.  Because of this, I like to say that they are global
to the request.  Many people use them to avoid passing parameters into
custom tags.  I feel that is the only use for them over local variables
(I.E. the variables scope ).

  Application variables are locked into an application via the
cfapplication tag.
  They are persistent across page requests.
  You really should lock them.
   If 100 users hit the same page at once, then only 1 copy of each
application variable will exist.
   They are available to all templates in the request, including custom
tags.

   Does that give you enough to go on?


At 10:40 AM 11/25/2002 -0800, you wrote:
>From: "Andy Ousterhout" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Monday, November 25, 2002 10:31 AM
>Subject: RE: Application variables
>
>
> > What's are the Pro's and Con's  of using Request Variables over
>Application
> > Var?
> >



--
Jeffry Houser | mailto:[EMAIL PROTECTED]
DotComIt, Putting you on the web
AIM: Reboog711  | Phone: 1-203-379-0773
--
My CFMX Book:
<http://www.amazon.com/exec/obidos/ASIN/0072225564/instantcoldfu-20>
My Books: http://www.instantcoldfusion.com
My Band: http://www.farcryfly.com


~|
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
Get the mailserver that powers this list at http://www.coolfusion.com



Re: Application variables

2002-11-25 Thread Jeffry Houser
  Request variables and Application variables are two completely different 
things, so i don't know if they deserve direct comparison.  It depends what 
you want to use them for.

  Request variables exist during a single page execution.
  They are not persistent across page requests.
  You do not need to lock them.
  If 100 users hit the same page at once, then 100 instances of each 
request variable will exist simultaneously.
  Request variables are available to all templates in the request, 
including custom tags.  Because of this, I like to say that they are global 
to the request.  Many people use them to avoid passing parameters into 
custom tags.  I feel that is the only use for them over local variables 
(I.E. the variables scope ).

  Application variables are locked into an application via the 
cfapplication tag.
  They are persistent across page requests.
  You really should lock them.
   If 100 users hit the same page at once, then only 1 copy of each 
application variable will exist.
   They are available to all templates in the request, including custom tags.

   Does that give you enough to go on?


At 10:40 AM 11/25/2002 -0800, you wrote:
>From: "Andy Ousterhout" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Monday, November 25, 2002 10:31 AM
>Subject: RE: Application variables
>
>
> > What's are the Pro's and Con's  of using Request Variables over
>Application
> > Var?
> >



--
Jeffry Houser | mailto:[EMAIL PROTECTED]
DotComIt, Putting you on the web
AIM: Reboog711  | Phone: 1-203-379-0773
--
My CFMX Book: 
<http://www.amazon.com/exec/obidos/ASIN/0072225564/instantcoldfu-20>
My Books: http://www.instantcoldfusion.com
My Band: http://www.farcryfly.com 

~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Application variables

2002-11-25 Thread Andy Ousterhout
Do you have to set them each time, for each page?

-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 12:40 PM
To: CF-Talk
Subject: Re: Application variables


Well a big plus is that you don't need to lock REQUEST scoped vars.

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

-
Macromedia Associate Partner
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
- Original Message -
From: "Andy Ousterhout" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 10:31 AM
Subject: RE: Application variables


> What's are the Pro's and Con's  of using Request Variables over
Application
> Var?
>
> -Original Message-
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 12:16 PM
> To: CF-Talk
> Subject: Re: Application variables
>
>
> You can overwrite them with  ... though I typically use  request.myapp.myvar = "something"> instead of application variables for
this
> sort of thing also. The app could be using  tags instead of

> tags in which case it would chew through the xml file on each request
> unecessarily since the param won't overwrite the existing value.
>
> Or it could use something like  structkeyexists(application,"init")> to determine when to load the
> application vars, in which case, it won't reload them when you modify the
> xml file because application.init already exists. You could use a url
> variable to force the app to reload the xml file in this situation,
however,
> which wouldn't be too tough to accomplish or too hard on the server...
>
>  default="#yesnoformat(not structkeyexists(application,"init"))#">
> 
> ... chew up the xml file here ...
> 
>
> Then when you update the xml file, just load the application's default
page
> with &init=true in the query string
>
> > You have to restart CF to reset APPLICATION vars (timing out the app
might
> > work too).
>
> > Personally I like to use REQUEST scope over APPLICATION scope ;-)
>
> > Bryan Stevenson B.Comm.
> > VP & Director of E-Commerce Development
> > Electric Edge Systems Group Inc.
> > t. 250.920.8830
> > e. [EMAIL PROTECTED]
>
> > -
> > Macromedia Associate Partner
> > www.macromedia.com
> > -
> > Vancouver Island ColdFusion Users Group
> > Founder & Director
> > www.cfug-vancouverisland.com
> > - Original Message -
> > From: "Cutter (CF_Talk)" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Monday, November 25, 2002 10:00 AM
> > Subject: Application variables
>
>
> >> I've been on http://www.benorama.com looking at a CF design pattern. In
> >> this tutorial it talks about using your Application.cfm to call
> >> _init.cfm, which parses through an xml file to create your application
> >> variables. I've done this (very closely following the sample app). I've
> >> created a page using cfdump to show me the application variables, but
> >> when I change my xml doc and refresh my page the application variables
> >> do not appear to update? Any ideas?
> >>
> >> Cutter
> >>
> >>
> >
>
>

~|
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



RE: Application variables

2002-11-25 Thread Raymond Camden
Depending on how you use them, in cfmx you don't need to lock
application vars as well.

===
Raymond Camden, ColdFusion Jedi Master for Hire

Email: [EMAIL PROTECTED]
WWW  : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -Original Message-
> From: Bryan Stevenson [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, November 25, 2002 12:40 PM
> To: CF-Talk
> Subject: Re: Application variables
> 
> 
> Well a big plus is that you don't need to lock REQUEST scoped vars.
> 
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]
> 
> -
> Macromedia Associate Partner
> www.macromedia.com
> -
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> - Original Message -
> From: "Andy Ousterhout" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 10:31 AM
> Subject: RE: Application variables
> 
> 
> > What's are the Pro's and Con's  of using Request Variables over
> Application
> > Var?


~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Application variables

2002-11-25 Thread Bryan Stevenson
Well a big plus is that you don't need to lock REQUEST scoped vars.

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

-
Macromedia Associate Partner
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
- Original Message -
From: "Andy Ousterhout" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 10:31 AM
Subject: RE: Application variables


> What's are the Pro's and Con's  of using Request Variables over
Application
> Var?
>
> -Original Message-
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 12:16 PM
> To: CF-Talk
> Subject: Re: Application variables
>
>
> You can overwrite them with  ... though I typically use  request.myapp.myvar = "something"> instead of application variables for
this
> sort of thing also. The app could be using  tags instead of

> tags in which case it would chew through the xml file on each request
> unecessarily since the param won't overwrite the existing value.
>
> Or it could use something like  structkeyexists(application,"init")> to determine when to load the
> application vars, in which case, it won't reload them when you modify the
> xml file because application.init already exists. You could use a url
> variable to force the app to reload the xml file in this situation,
however,
> which wouldn't be too tough to accomplish or too hard on the server...
>
>  default="#yesnoformat(not structkeyexists(application,"init"))#">
> 
> ... chew up the xml file here ...
> 
>
> Then when you update the xml file, just load the application's default
page
> with &init=true in the query string
>
> > You have to restart CF to reset APPLICATION vars (timing out the app
might
> > work too).
>
> > Personally I like to use REQUEST scope over APPLICATION scope ;-)
>
> > Bryan Stevenson B.Comm.
> > VP & Director of E-Commerce Development
> > Electric Edge Systems Group Inc.
> > t. 250.920.8830
> > e. [EMAIL PROTECTED]
>
> > -
> > Macromedia Associate Partner
> > www.macromedia.com
> > -
> > Vancouver Island ColdFusion Users Group
> > Founder & Director
> > www.cfug-vancouverisland.com
> > - Original Message -
> > From: "Cutter (CF_Talk)" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Monday, November 25, 2002 10:00 AM
> > Subject: Application variables
>
>
> >> I've been on http://www.benorama.com looking at a CF design pattern. In
> >> this tutorial it talks about using your Application.cfm to call
> >> _init.cfm, which parses through an xml file to create your application
> >> variables. I've done this (very closely following the sample app). I've
> >> created a page using cfdump to show me the application variables, but
> >> when I change my xml doc and refresh my page the application variables
> >> do not appear to update? Any ideas?
> >>
> >> Cutter
> >>
> >>
> >
>
> 
~|
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
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Application variables

2002-11-25 Thread Andy Ousterhout
What's are the Pro's and Con's  of using Request Variables over Application
Var?

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 12:16 PM
To: CF-Talk
Subject: Re: Application variables


You can overwrite them with  ... though I typically use  instead of application variables for this
sort of thing also. The app could be using  tags instead of 
tags in which case it would chew through the xml file on each request
unecessarily since the param won't overwrite the existing value.

Or it could use something like  to determine when to load the
application vars, in which case, it won't reload them when you modify the
xml file because application.init already exists. You could use a url
variable to force the app to reload the xml file in this situation, however,
which wouldn't be too tough to accomplish or too hard on the server...



... chew up the xml file here ...


Then when you update the xml file, just load the application's default page
with &init=true in the query string

> You have to restart CF to reset APPLICATION vars (timing out the app might
> work too).

> Personally I like to use REQUEST scope over APPLICATION scope ;-)

> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]

> -
> Macromedia Associate Partner
> www.macromedia.com
> -
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> - Original Message -
> From: "Cutter (CF_Talk)" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 10:00 AM
> Subject: Application variables


>> I've been on http://www.benorama.com looking at a CF design pattern. In
>> this tutorial it talks about using your Application.cfm to call
>> _init.cfm, which parses through an xml file to create your application
>> variables. I've done this (very closely following the sample app). I've
>> created a page using cfdump to show me the application variables, but
>> when I change my xml doc and refresh my page the application variables
>> do not appear to update? Any ideas?
>>
>> Cutter
>>
>>
>

~|
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



Re: Application variables

2002-11-25 Thread S . Isaac Dealey
You can overwrite them with  ... though I typically use  instead of application variables for this
sort of thing also. The app could be using  tags instead of 
tags in which case it would chew through the xml file on each request
unecessarily since the param won't overwrite the existing value.

Or it could use something like  to determine when to load the
application vars, in which case, it won't reload them when you modify the
xml file because application.init already exists. You could use a url
variable to force the app to reload the xml file in this situation, however,
which wouldn't be too tough to accomplish or too hard on the server...



... chew up the xml file here ...


Then when you update the xml file, just load the application's default page
with &init=true in the query string

> You have to restart CF to reset APPLICATION vars (timing out the app might
> work too).

> Personally I like to use REQUEST scope over APPLICATION scope ;-)

> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]

> -
> Macromedia Associate Partner
> www.macromedia.com
> -
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> - Original Message -
> From: "Cutter (CF_Talk)" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 10:00 AM
> Subject: Application variables


>> I've been on http://www.benorama.com looking at a CF design pattern. In
>> this tutorial it talks about using your Application.cfm to call
>> _init.cfm, which parses through an xml file to create your application
>> variables. I've done this (very closely following the sample app). I've
>> created a page using cfdump to show me the application variables, but
>> when I change my xml doc and refresh my page the application variables
>> do not appear to update? Any ideas?
>>
>> Cutter
>>
>>
> 
~|
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



Re: Application variables

2002-11-25 Thread Bryan Stevenson
You have to restart CF to reset APPLICATION vars (timing out the app might
work too).

Personally I like to use REQUEST scope over APPLICATION scope ;-)

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

-
Macromedia Associate Partner
www.macromedia.com
-
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
- Original Message -
From: "Cutter (CF_Talk)" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 10:00 AM
Subject: Application variables


> I've been on http://www.benorama.com looking at a CF design pattern. In
> this tutorial it talks about using your Application.cfm to call
> _init.cfm, which parses through an xml file to create your application
> variables. I've done this (very closely following the sample app). I've
> created a page using cfdump to show me the application variables, but
> when I change my xml doc and refresh my page the application variables
> do not appear to update? Any ideas?
>
> Cutter
>
> 
~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Application Variables

2002-05-07 Thread Chris Norloff

That's what we do - set all application variables if one is not set; if it exists then 
we assume all application vars are set. We have the application var timeout set to 1 
day in CF Admin.

We use a session variable to determine if the user is logged in.  That way if the 
server restarts itself (due to unresponsive threads, for instance) then the user must 
log back in, rather than get a variable not found error.

Chris Norloff


-- Original Message --
from: "Jim Curran" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
date: Mon, 6 May 2002 14:23:32 -0400

>Hey all,
>
>I want to use application variables for a site, but one question comes to
>mind.
>
>
>I have all my app variables set in one template.  Upon configuring the
>template, I hit that template to set all variables (makes sense).
>
>Now, while my application is in use, I check (in Application.cfm) to see if
>one of the vars is defined.  If not, I cfinclude the config template.
>
>If (given the slim chance) the app variables time out, is there anyway to
>reset them other than having an CFIF statement check on every page hit?
>
>I know the overhead is really low, but just based on the ideas of the app
>vars, i thought maybe there was a better way.
>
>Let me know if I'm being wy too picky about this.
>
>thanks.
>
>- j
>
>
>
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Application Variables

2002-05-06 Thread Jim Curran

Thanks... I think I'll go that route...

- j

-Original Message-
From: Dave Carabetta [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 4:35 PM
To: CF-Talk
Subject: Re: Application Variables


>Hey all,
>
>I want to use application variables for a site, but one question comes to
>mind.
>
>
>I have all my app variables set in one template.  Upon configuring the
>template, I hit that template to set all variables (makes sense).
>
>Now, while my application is in use, I check (in Application.cfm) to see if
>one of the vars is defined.  If not, I cfinclude the config template.
>
>If (given the slim chance) the app variables time out, is there anyway to
>reset them other than having an CFIF statement check on every page hit?
>
>I know the overhead is really low, but just based on the ideas of the app
>vars, i thought maybe there was a better way.
>
>Let me know if I'm being wy too picky about this.
>

First off, you're being picky. I understand you're desire to cut out any and
all fat from performance. But, as mentioned hundreds of times on this list,
whatever "overhead" might be associated with that IF statement in negligible
because there are other areas that will have much more of an impact on your
app's performance. Look at those things first before you start scrutinizing
an IF statement!

Second, do you really have to use application variables? I personally hate
them because of the whole locking issue. I'd rather spend the quite minimal
overhead of setting a few variables on each page request via an include in
Application.cfm than have to deal with locking. I have an app where I set 25
variables on each page load (page settings, colors, datasources, etc.), and
the overhead is virtually negligible. When I stress tested it under a load
of 100 threads (which I know is arbitrary and varies from system to system),
that template takes a maximum of 10 milliseconds to process. That's a
penalty I'll gladly accept if I don't have to worry about the locking BS.

Just my .02 though. You may have perfectly valid reasons for using
application variables. I just hate them.

Regards,
Dave.



__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Application Variables

2002-05-06 Thread Dave Carabetta

>Hey all,
>
>I want to use application variables for a site, but one question comes to
>mind.
>
>
>I have all my app variables set in one template.  Upon configuring the
>template, I hit that template to set all variables (makes sense).
>
>Now, while my application is in use, I check (in Application.cfm) to see if
>one of the vars is defined.  If not, I cfinclude the config template.
>
>If (given the slim chance) the app variables time out, is there anyway to
>reset them other than having an CFIF statement check on every page hit?
>
>I know the overhead is really low, but just based on the ideas of the app
>vars, i thought maybe there was a better way.
>
>Let me know if I'm being wy too picky about this.
>

First off, you're being picky. I understand you're desire to cut out any and 
all fat from performance. But, as mentioned hundreds of times on this list, 
whatever "overhead" might be associated with that IF statement in negligible 
because there are other areas that will have much more of an impact on your 
app's performance. Look at those things first before you start scrutinizing 
an IF statement!

Second, do you really have to use application variables? I personally hate 
them because of the whole locking issue. I'd rather spend the quite minimal 
overhead of setting a few variables on each page request via an include in 
Application.cfm than have to deal with locking. I have an app where I set 25 
variables on each page load (page settings, colors, datasources, etc.), and 
the overhead is virtually negligible. When I stress tested it under a load 
of 100 threads (which I know is arbitrary and varies from system to system), 
that template takes a maximum of 10 milliseconds to process. That's a 
penalty I'll gladly accept if I don't have to worry about the locking BS.

Just my .02 though. You may have perfectly valid reasons for using 
application variables. I just hate them.

Regards,
Dave.


__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: application variables

2001-11-09 Thread Tim Stadinski

or you can do



application.myVar = "this is a test";
application.myVar2 = "this is also a test";
application.foo = "bar";



If you bench mark these calls, you do find out that naming the lock when
accessing APPLICATION vars is more efficient, rather than using the
scope="application".  If you choose to do this though, make sure you re-use
the same lock name when you access all application references, including
READ locks, otherwise you run into issues.



myvar1 = application.myVar;
myvar2 = application.myVar2;
foobar = application.foo;

   

Cheers,

Timothy Stadinski
Senior Software Engineer
Afternic.com

-Original Message-
From: Brent Goldman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 07, 2001 7:45 PM
To: CF-Talk
Subject: RE: application variables


Hi Nick,

You need to specify the APPLICATION scope in your CFLOCK tag.  You should
put the following CFML around any other CFML that access the application
scope:


...CFML...


-Brent

> -Original Message-
> From: Nick Le Mouton [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 07, 2001 4:33 PM
> To: CF-Talk
> Subject: application variables
>
>
> I have been told that when setting application variables it is good
> programming practice to put a cflock around them
>
> so on some of my pages in my application would i do the following?
>
> 
>   
> 
>
> Thanks
> 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Application Variables

2001-06-30 Thread David Hannum

First, I used a very elementary example.  A better use might be calling a
DSN for an application.  Second, you'd only need to lock application
variables when you're writing to them.  Unlike session variables, that get
written to and overwritten time and again as in a shopping cart, I'd only
allow administrative scripts to write to the application vars, thus
eliminating the need for the read only locks

Dave


- Original Message -
From: Don Vawter <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Saturday, June 30, 2001 11:08 AM
Subject: Re: Application Variables


> David,
>
> But since you have to put locks around application variables wouldn't it
be
> more efficient to use a request scope variable for this.
>
> In your application. cfm:
> cfset request.backgroundcolor=whatever
>
> Then you don't need to lock every time you need to use it.
>
> I find that since the request scope became available I hardly ever use
> application variables.
>
> Don
>
> - Original Message -
> From: "David Hannum" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Saturday, June 30, 2001 8:27 AM
> Subject: Re: Application Variables
>
>
> > Steve,
> >
> > Application vars are great for controlling attributes that occasionally
> > change (or frequently for that matter) that you want to affect the whole
> > application.  Say you wanted to have bgcolor across your entire site
> change
> > according to the time of day.  You can code your application.cfm or a
> > header.cfm script to 
> > based on the time of day.  Then, instead of coding this in the top of
each
> > script,  you can simply call the #Application.BGColor# variable in each
> > script, and it will automatically be what you want it to be for everyone
> > calling your application.
> >
> > Dave
> >
> >
> >
> > - Original Message -
> > From: Steve Reich <[EMAIL PROTECTED]>
> > To: CF-Talk <[EMAIL PROTECTED]>
> > Sent: Friday, June 29, 2001 5:00 PM
> > Subject: Application Variables
> >
> >
> > > Seems basic, but I've never really addressed this. Assuming this code
is
> > in
> > > my application.cfm file, what is the difference in these two
> > >
> > > 
> > >
> > > .and...
> > >
> > > 
> > >
> > > I guess I need a quick lesson on application variables. I know they
are
> > > included in the scope defined in the cfapplication tag, but what are
> pros
> > > and cons?
> > >
> > > I have a small dev box with only 256 RAM. I have CF 4.5 and SQL7
running
> > on
> > > it so as you can imagine, it's quite slow. I'm wondering how much RAM
is
> > > used storing application variables? Could I increase performance
(albeit
> > > more theoretically) by not using application vars?
> > >
> > > If I am looking for server performance over speed, the first one seems
> the
> > > way to go since it's not a persistent variable. I'm only faking it by
> > > putting it in the app.cfm file. Along this line, do I even need
> > application
> > > variables? What's the story?
> > >
> > > Thanks,
> > > Steve
> > >
> > >
> > >
> > >
> >
>
~~
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



Re: Application Variables

2001-06-30 Thread Joseph Thompson

lol.  I see now :)

While the approach for this "BannerMan" tag would work even with your
"categories" you would be using up some RAM.  I would say that each "ad"
would require about 300-500 bytes so 1000 may be close to half a meg...
Pretty substantial ram usage just for an imge rotator :)








- Original Message -
From: "W Luke" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, June 30, 2001 1:12 PM
Subject: Re: Application Variables


>
>
> > "GetAdvert" sounds like it may be a query to collect a "random" ad from
a
> > database?
>
> Yes and no.  If a user runs a search for, say, "furniture," this might
> retreive 15 adverts which would be using a query such as:
>
> 
> SELECT * FROM advert_details
> WHERE body like '%furniture%'
> 
>
> Another user might be browsing the Computer's category:
>
> 
> SELECT * FROM advert_details
> WHERE cat = 156
> 
>
> And so on.  They use the same query name, and results are obtained by
> running a template which always uses 
>
> I like the idea of stuffing them into an Application Var to speed things
up,
> but is it really plausible to put 1000+ Adverts into an App Var?
>
> Will
>
>
> >
> > One approach that worked very well for me was to run the query "once"
and
> > then store the ads in an application scoped array.  This makes
retrieving
> a
> > "new" ad much quicker.
> >
> > You may want to take a look at this "Application" array here.
> >
> > http://cfhub.com/tutorials/BannerMan/customtag/pick.cfm
> >
> > On my
> > > site, a query called getadvert might get a record with an ID of 1987
for
> > > example.  Another user at the site might be running the same query,
but
> > > getting a record of 981
> >
> >
> >
>
~~
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



Re: Application Variables

2001-06-30 Thread W Luke



> "GetAdvert" sounds like it may be a query to collect a "random" ad from a
> database?

Yes and no.  If a user runs a search for, say, "furniture," this might
retreive 15 adverts which would be using a query such as:


SELECT * FROM advert_details
WHERE body like '%furniture%'


Another user might be browsing the Computer's category:


SELECT * FROM advert_details
WHERE cat = 156


And so on.  They use the same query name, and results are obtained by
running a template which always uses 

I like the idea of stuffing them into an Application Var to speed things up,
but is it really plausible to put 1000+ Adverts into an App Var?

Will


>
> One approach that worked very well for me was to run the query "once" and
> then store the ads in an application scoped array.  This makes retrieving
a
> "new" ad much quicker.
>
> You may want to take a look at this "Application" array here.
>
> http://cfhub.com/tutorials/BannerMan/customtag/pick.cfm
>
> On my
> > site, a query called getadvert might get a record with an ID of 1987 for
> > example.  Another user at the site might be running the same query, but
> > getting a record of 981
>
>
>
~~
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



Re: Application Variables

2001-06-30 Thread Joseph Thompson

"GetAdvert" sounds like it may be a query to collect a "random" ad from a
database?

One approach that worked very well for me was to run the query "once" and
then store the ads in an application scoped array.  This makes retrieving a
"new" ad much quicker.

You may want to take a look at this "Application" array here.

http://cfhub.com/tutorials/BannerMan/customtag/pick.cfm

On my
> site, a query called getadvert might get a record with an ID of 1987 for
> example.  Another user at the site might be running the same query, but
> getting a record of 981


~~
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



Re: Application Variables

2001-06-30 Thread Don Vawter

David,

But since you have to put locks around application variables wouldn't it be
more efficient to use a request scope variable for this.

In your application. cfm:
cfset request.backgroundcolor=whatever

Then you don't need to lock every time you need to use it.

I find that since the request scope became available I hardly ever use
application variables.

Don

- Original Message -
From: "David Hannum" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, June 30, 2001 8:27 AM
Subject: Re: Application Variables


> Steve,
>
> Application vars are great for controlling attributes that occasionally
> change (or frequently for that matter) that you want to affect the whole
> application.  Say you wanted to have bgcolor across your entire site
change
> according to the time of day.  You can code your application.cfm or a
> header.cfm script to 
> based on the time of day.  Then, instead of coding this in the top of each
> script,  you can simply call the #Application.BGColor# variable in each
> script, and it will automatically be what you want it to be for everyone
> calling your application.
>
> Dave
>
>
>
> - Original Message -
> From: Steve Reich <[EMAIL PROTECTED]>
> To: CF-Talk <[EMAIL PROTECTED]>
> Sent: Friday, June 29, 2001 5:00 PM
> Subject: Application Variables
>
>
> > Seems basic, but I've never really addressed this. Assuming this code is
> in
> > my application.cfm file, what is the difference in these two
> >
> > 
> >
> > .and...
> >
> > 
> >
> > I guess I need a quick lesson on application variables. I know they are
> > included in the scope defined in the cfapplication tag, but what are
pros
> > and cons?
> >
> > I have a small dev box with only 256 RAM. I have CF 4.5 and SQL7 running
> on
> > it so as you can imagine, it's quite slow. I'm wondering how much RAM is
> > used storing application variables? Could I increase performance (albeit
> > more theoretically) by not using application vars?
> >
> > If I am looking for server performance over speed, the first one seems
the
> > way to go since it's not a persistent variable. I'm only faking it by
> > putting it in the app.cfm file. Along this line, do I even need
> application
> > variables? What's the story?
> >
> > Thanks,
> > Steve
> >
> >
> >
> >
>
~~
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



Re: Application Variables

2001-06-30 Thread David Hannum

Steve,

Application vars are great for controlling attributes that occasionally
change (or frequently for that matter) that you want to affect the whole
application.  Say you wanted to have bgcolor across your entire site change
according to the time of day.  You can code your application.cfm or a
header.cfm script to 
based on the time of day.  Then, instead of coding this in the top of each
script,  you can simply call the #Application.BGColor# variable in each
script, and it will automatically be what you want it to be for everyone
calling your application.

Dave



- Original Message -
From: Steve Reich <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 5:00 PM
Subject: Application Variables


> Seems basic, but I've never really addressed this. Assuming this code is
in
> my application.cfm file, what is the difference in these two
>
> 
>
> .and...
>
> 
>
> I guess I need a quick lesson on application variables. I know they are
> included in the scope defined in the cfapplication tag, but what are pros
> and cons?
>
> I have a small dev box with only 256 RAM. I have CF 4.5 and SQL7 running
on
> it so as you can imagine, it's quite slow. I'm wondering how much RAM is
> used storing application variables? Could I increase performance (albeit
> more theoretically) by not using application vars?
>
> If I am looking for server performance over speed, the first one seems the
> way to go since it's not a persistent variable. I'm only faking it by
> putting it in the app.cfm file. Along this line, do I even need
application
> variables? What's the story?
>
> Thanks,
> Steve
>
>
>
>
~~
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



Re: Application Variables

2001-06-30 Thread W Luke



> You can assign a query recordset into an Application variable, it may be
> less expensive for you to check for an existance of an Application
variable
> as  opposed to running your query every time and again (and for each
user).

This is something I want to implement, but it still confuses me.  On my
site, a query called getadvert might get a record with an ID of 1987 for
example.  Another user at the site might be running the same query, but
getting a record of 981.  Surely if the query is assigned into an App Var,
it's pointless because the query would have to be re-run each time anyway to
update it. (otherwise a user looking for a record ID of 981 might get 1987).

Can you explain perhaps?

Thanks

--
Will
new media discussion for Berkshire -=- http://bnm.lukrative.com
local classifieds -=- http://www.localbounty.com
e: [EMAIL PROTECTED]  icq: 31099745


~~
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



RE: Application Variables

2001-06-29 Thread stas

There are several benefits to Application metrics, unfortunately I don't
know about any metrics. Maybe some of the gurus here can help you in that
department.

Application vars are shared. So as soon as you have more than one user, you
shoud start reaping some performance benefits.

You can set an Application variable on any page of your site if you need to
access a global variable, not just in Application.cfm.

You can assign a query recordset into an Application variable, it may be
less expensive for you to check for an existance of an Application variable
as  opposed to running your query every time and again (and for each user).

As far as your simple example there is probably no measurable benefit.

Also, there's that little matter of convinience of NOT using Application
variables all over the place, as you must  them. The applications
we've designing were never high traffic apps, so I've never ran into a
problem by not using CFLOCK, however, since 4.5 came out, we've turned on
the automatic read locking, and made sure that writes are explicitely
locked.

One final point, RAM is very cheap now. You can pick up a 256MB DIMM for
$50.

-Original Message-
From: Steve Reich [mailto:[EMAIL PROTECTED]]

Seems basic, but I've never really addressed this. Assuming this code is in
my application.cfm file, what is the difference in these two



.and...



I guess I need a quick lesson on application variables. I know they are
included in the scope defined in the cfapplication tag, but what are pros
and cons?

I have a small dev box with only 256 RAM. I have CF 4.5 and SQL7 running on
it so as you can imagine, it's quite slow. I'm wondering how much RAM is
used storing application variables? Could I increase performance (albeit
more theoretically) by not using application vars?

If I am looking for server performance over speed, the first one seems the
way to go since it's not a persistent variable. I'm only faking it by
putting it in the app.cfm file. Along this line, do I even need application
variables? What's the story?

Thanks,
Steve
~~
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



Re: Application Variables

2000-10-30 Thread David Gassner

My mistake:

This works for application variables, but not for server variables.

David

- Original Message -
From: David Gassner <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Monday, October 30, 2000 3:18 PM
Subject: RE: Application Variables


> Since the application and server scopes are stored in structures, you
could
> clear them all with:
>
> 
> 
>
> > -Original Message-
> > From: Peter Alexandrou [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, October 29, 2000 6:20 PM
> > To: CF-Talk
> > Subject: Application Variables
> >
> >
> > Guys,
> >
> > Is there anyway of resetting application variables in CF? i.e. I have an
> > application and would like administrators to be able to log in
> > and select an
> > option that resetsout all application and server variables.
> >
> > Thanks,
> >
> > Peter Alexandrou
> > Technical Leader
> >
> > tapestry communications : www.tapestry.net.au
> > level 4, 32 walker street
> > north sydney NSW 2060 australia
> >
> > phone : +61 2 9929 7400
> > mobile : +61 411 445 111
> > e-mail : [EMAIL PROTECTED]
> >
> > --
> > --
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> > or send a message with 'unsubscribe' in the body to
> > [EMAIL PROTECTED]
> >
>
> --
--
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
>


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Application Variables

2000-10-30 Thread David Gassner

Since the application and server scopes are stored in structures, you could
clear them all with:




> -Original Message-
> From: Peter Alexandrou [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, October 29, 2000 6:20 PM
> To: CF-Talk
> Subject: Application Variables
>
>
> Guys,
>
> Is there anyway of resetting application variables in CF? i.e. I have an
> application and would like administrators to be able to log in
> and select an
> option that resetsout all application and server variables.
>
> Thanks,
>
> Peter Alexandrou
> Technical Leader
>
> tapestry communications : www.tapestry.net.au
> level 4, 32 walker street
> north sydney NSW 2060 australia
>
> phone : +61 2 9929 7400
> mobile : +61 411 445 111
> e-mail : [EMAIL PROTECTED]
>
> --
> --
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> or send a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
>


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: Application Variables

2000-10-29 Thread David Hannum



Dave

- Original Message -
From: Peter Alexandrou <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Sunday, October 29, 2000 9:20 PM
Subject: Application Variables


Guys,

Is there anyway of resetting application variables in CF? i.e. I have an
application and would like administrators to be able to log in and select an
option that resetsout all application and server variables.

Thanks,

Peter Alexandrou
Technical Leader

tapestry communications : www.tapestry.net.au
level 4, 32 walker street
north sydney NSW 2060 australia

phone : +61 2 9929 7400
mobile : +61 411 445 111
e-mail : [EMAIL PROTECTED]



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Application Variables in DB?

2000-09-16 Thread Dave Watts

> Can application variables be stored in a database (by CF, not by me)
> like client variables?  This would be handy for persistence between
> application runs should the server be rebooted.

No, they're only stored in memory. You could write something to store and
initialize application variables using a database, though.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.