RE: What is the best variable scope?

2002-06-30 Thread S . Isaac Dealey
]] Sent: Sunday, 30 June 2002 12:52 AM To: CF-Talk Subject: RE: What is the best variable scope? Exactly my point, and as the user is not reading these emails then why make that a point when you and I both know otherwise :-) Because it's important for us to think about the work that we do from

Re: What is the best variable scope?

2002-06-30 Thread David Schmidt
: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] : Sent: Sunday, 30 June 2002 12:52 AM : To: CF-Talk : Subject: RE: What is the best variable scope? : : Exactly my point, and as the user is not reading these : emails then why make that a point when you and I both : know otherwise

Re: What is the best variable scope?

2002-06-30 Thread S . Isaac Dealey
No offense guys, but shouldn't this be a private discussion by now? I don't recall debates as being the purpose of the list. Sorry... Guess I didn't realize anyone else was still following the thread... I'll shut up now... Isaac www.turnkey.to 954-776-0046

Why are we here? was RE: What is the best variable scope?

2002-06-30 Thread Mike Brunt
Schmidt [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 30, 2002 9:16 AM To: CF-Talk Subject: Re: What is the best variable scope? No offense guys, but shouldn't this be a private discussion by now? I don't recall debates as being the purpose of the list. - Original Message - From: S. Isaac

RE: What is the best variable scope?

2002-06-29 Thread Andrew Scott
Exactly my point, and as the user is not reading these emails then why make that a point when you and I both know otherwise :-) -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Saturday, 29 June 2002 8:44 AM To: CF-Talk Subject: RE: What is the best variable

RE: What is the best variable scope?

2002-06-29 Thread S . Isaac Dealey
Exactly my point, and as the user is not reading these emails then why make that a point when you and I both know otherwise :-) Because it's important for us to think about the work that we do from the perspective of our users -- as entertaining as our tech-centric ways of thinking may be,

RE: What is the best variable scope?

2002-06-29 Thread Andrew Scott
Nice wording, but still what does that have to do with the original thread? -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Sunday, 30 June 2002 12:52 AM To: CF-Talk Subject: RE: What is the best variable scope? Exactly my point, and as the user

RE: What is the best variable scope?

2002-06-28 Thread Adrian Lynch
SO anyway, how about those Knicks :OP Ade (Not American :O) -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: 28 June 2002 02:14 To: CF-Talk Subject: RE: What is the best variable scope? Where the hell did you get the idea that I seem to think

RE: What is the best variable scope?

2002-06-27 Thread mark brinkworth
However, many people use the application scope for things that I don't consider good ideas (such as a datasource varaible). Can you elaborate? In the example I specified, a datasource variable. First you have to put it into an application variable, so code similar to this

RE: What is the best variable scope?

2002-06-27 Thread mark brinkworth
] -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 10:26 AM To: CF-Talk Subject: RE: What is the best variable scope? Application scope variables are a shared scope. You should always lock shared scopes (I.E. Session, Application

RE: What is the best variable scope?

2002-06-27 Thread Jeffry Houser
At 06:53 AM 6/27/2002 +, you wrote: However, many people use the application scope for things that I don't consider good ideas (such as a datasource varaible). Can you elaborate? In the example I specified, a datasource variable. First you have to put it into an

RE: What is the best variable scope?

2002-06-27 Thread Jeffry Houser
me know if I can be of assistance. Thank you, John M Stover II [EMAIL PROTECTED] -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 10:26 AM To: CF-Talk Subject: RE: What is the best variable scope? Application

Re: RE: What is the best variable scope?

2002-06-27 Thread Dave Carabetta
Can you give some example code? I just want to make sure I understand you completely. It's not a very hard concept. I create a file called constants.cfm, put it in the same directory as my Application.cfm file, and then cfinclude it in the Application.cfm file, so that it is included on every

RE: What is the best variable scope?

2002-06-27 Thread Andrew Scott
Jeffry, Read what I said, and I stand by that post! -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 10:22 AM To: CF-Talk Subject: RE: What is the best variable scope? At 07:55 AM 6/27/2002 +1000, you wrote: Actually I prefer to look

RE: What is the best variable scope?

2002-06-27 Thread Andrew Scott
sense:-) -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 11:46 AM To: CF-Talk Subject: RE: What is the best variable scope? Ok that goes without saying, but in hindsight this is one application pretending to be many It's not really

RE: What is the best variable scope?

2002-06-27 Thread Andrew Scott
bring a servers performance to a critical level. Might not sound like it is a big deal, but can be when the time comes:-) -Original Message- From: Bud [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 12:36 PM To: CF-Talk Subject: Re: What is the best variable scope? On 6/26/02

RE: What is the best variable scope?

2002-06-27 Thread Andrew Scott
application. -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 11:23 PM To: CF-Talk Subject: RE: What is the best variable scope? Do you have examples and / or numbers? At 06:50 AM 6/27/2002 +, you wrote: While I agree in principle

RE: What is the best variable scope?

2002-06-27 Thread Brad Roberts
[mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 9:57 AM To: CF-Talk Subject: RE: What is the best variable scope? Here is something to ponder:-) Although it might not be an issue to some of you, but look at it this way. If the website is going to be a high traffic website

RE: What is the best variable scope?

2002-06-27 Thread Mark A. Kruger - CFG
- and the benefits outwiegh it considerably. -mk -Original Message- From: Brad Roberts [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 9:47 AM To: CF-Talk Subject: RE: What is the best variable scope? I'm no expert on how CF handles files, but when it comes to cfincludes, doesn't CF

RE: What is the best variable scope?

2002-06-27 Thread S . Isaac Dealey
All I am saying is that the application is sharing all the code, hence it is one application that pretends to many websites. As far as I am concerned I will always treat it as one app, and not 2 if there are 2 sites. Hope that makes sense:-) I tend to think of sites in the terms that

RE: What is the best variable scope?

2002-06-27 Thread Andrew Scott
June 2002 8:49 AM To: CF-Talk Subject: RE: What is the best variable scope? All I am saying is that the application is sharing all the code, hence it is one application that pretends to many websites. As far as I am concerned I will always treat it as one app, and not 2 if there are 2 sites

RE: What is the best variable scope?

2002-06-27 Thread S . Isaac Dealey
You can defend the idea of you application as one or not, that is your choice. The issue is not whether or not you applications is one site or not, and you have taken this past the original discussion. Actually I was getting back to the original point, which had nothing to do with my

RE: What is the best variable scope?

2002-06-27 Thread Andrew Scott
, you'll loose this. -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Friday, 28 June 2002 10:17 AM To: CF-Talk Subject: RE: What is the best variable scope? Actually I was getting back to the original point, which had nothing to do with my application (which

RE: What is the best variable scope?

2002-06-27 Thread S . Isaac Dealey
Where the hell did you get the idea that I seem to think that the application scope is across websites? I didn't -- I was quoting _your_ answer to someone else entirely... You responded to their message with You seem to think application is across websites, this is not true. ... and I was

RE: What is the best variable scope?

2002-06-26 Thread Tony Schreiber
However, many people use the application scope for things that I don't consider good ideas (such as a datasource varaible). Can you elaborate? Tony Schreiber, Senior Partner Man and Machine, Limited mailto:[EMAIL PROTECTED] http://www.technocraft.com

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
At 03:18 AM 6/26/2002 -0400, you wrote: However, many people use the application scope for things that I don't consider good ideas (such as a datasource varaible). Can you elaborate? In the example I specified, a datasource variable. First you have to put it into an application

RE: What is the best variable scope?

2002-06-26 Thread Shawn Regan
Why do you need to lock it? Shawn Regan -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 6:24 AM To: CF-Talk Subject: RE: What is the best variable scope? At 03:18 AM 6/26/2002 -0400, you wrote: However, many people use

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
Application scope variables are a shared scope. You should always lock shared scopes (I.E. Session, Application, and Server) variables. In version of ColdFusion 5 or less, this will prevent memory corruption and server crashes. In ColdFusion MX, Macromedia fixed the problems with memory

RE: What is the best variable scope?

2002-06-26 Thread Andrew Scott
-Talk Subject: RE: What is the best variable scope? However, many people use the application scope for things that I don't consider good ideas (such as a datasource varaible). Can you elaborate? Tony Schreiber, Senior Partner Man and Machine, Limited mailto:[EMAIL PROTECTED

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
See my other post. ;) At 07:18 AM 6/26/2002 -0700, you wrote: Why do you need to lock it? Shawn Regan -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 6:24 AM To: CF-Talk Subject: RE: What is the best variable scope? At 03:18 AM 6/26

RE: What is the best variable scope?

2002-06-26 Thread Andrew Scott
Regan [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 12:18 AM To: CF-Talk Subject: RE: What is the best variable scope? Why do you need to lock it? Shawn Regan __ Structure your ColdFusion code with Fusebox. Get

RE: What is the best variable scope?

2002-06-26 Thread Stover, John
Stover II [EMAIL PROTECTED] -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 10:26 AM To: CF-Talk Subject: RE: What is the best variable scope? Application scope variables are a shared scope. You should always lock shared scopes (I.E

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
is the best variable scope? Application scope variables are a shared scope. You should always lock shared scopes (I.E. Session, Application, and Server) variables. In version of ColdFusion 5 or less, this will prevent memory corruption and server crashes. In ColdFusion MX, Macromedia fixed

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
application scope variables, for example to determine how many people are actually logged into a membership system as a good example. -Original Message- From: Shawn Regan [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 12:18 AM To: CF-Talk Subject: RE: What is the best variable scope

RE: What is the best variable scope?

2002-06-26 Thread Dave Carabetta
First you have to put it into an application variable, so code similar to this goes into the Application.cfm : cflock cfif isDefined(Application.dsn) cfset application.dsn = mydatasource /cfif /cflock Now you have to lock all your query statements every time you

RE: What is the best variable scope?

2002-06-26 Thread Neil Clark - =TMM=
AFAIK you have to lock application variables. (plus others!) -Original Message- From: Shawn Regan [mailto:[EMAIL PROTECTED]] Sent: 26 June 2002 16:33 To: CF-Talk Subject: RE: What is the best variable scope? I usually only use the application scope for set variables

RE: What is the best variable scope?

2002-06-26 Thread Neil Clark - =TMM=
Subject: RE: What is the best variable scope? I usually only use the application scope for set variables that do not change. So there are only being read, Maybe I will look at locking those too, since two people could read the same variable at the same time. But I don't see any problems

Re: RE: What is the best variable scope?

2002-06-26 Thread ksuh
Then the question becomes, why even bother scoping the dsName to application. Why not just set variables.dsName in application.cfm? - Original Message - From: Dave Carabetta [EMAIL PROTECTED] Date: Wednesday, June 26, 2002 10:17 am Subject: RE: What is the best variable scope

RE: What is the best variable scope?

2002-06-26 Thread Andy Ewings
is the best variable scope? AFAIK you have to lock application variables. (plus others!) -Original Message- From: Shawn Regan [mailto:[EMAIL PROTECTED]] Sent: 26 June 2002 16:33 To: CF-Talk Subject: RE: What is the best variable scope? I usually only use the application scope

RE: What is the best variable scope?

2002-06-26 Thread Andy Ewings
Sorry, that should have said Application.DSN - not Application's -Original Message- From: Andy Ewings Sent: 26 June 2002 17:24 To: '[EMAIL PROTECTED]' Subject: RE: What is the best variable scope? they do - but what happens if your CF server is serving more than one website, each

RE: What is the best variable scope?

2002-06-26 Thread Adrian Lynch
I don't think that would matter, wouldn't they be unique to each Application. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: 26 June 2002 17:25 To: CF-Talk Subject: RE: What is the best variable scope? Sorry, that should have said Application.DSN

RE: What is the best variable scope?

2002-06-26 Thread Alex Hubner
. Thanks all! Alex -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 26 de junho de 2002 11:36 To: CF-Talk Subject: RE: What is the best variable scope? Shared variables such as application and session should be locked, however the lock really only needs

RE: What is the best variable scope?

2002-06-26 Thread Andy Ewings
but they persist across requests - hence the need for locking -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: 26 June 2002 17:31 To: CF-Talk Subject: RE: What is the best variable scope? I don't think that would matter, wouldn't they be unique to each Application

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
At 12:17 PM 6/26/2002 -0400, you wrote: First you have to put it into an application variable, so code similar to this goes into the Application.cfm : cflock cfif isDefined(Application.dsn) cfset application.dsn = mydatasource /cfif /cflock Now you have

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
To: CF-Talk Subject: RE: What is the best variable scope? AFAIK you have to lock application variables. (plus others!) -Original Message- From: Shawn Regan [mailto:[EMAIL PROTECTED]] Sent: 26 June 2002 16:33 To: CF-Talk Subject: RE: What is the best variable scope? I

RE: What is the best variable scope?

2002-06-26 Thread Bud
While we're on the subject of variables, is there an inherent difference between the attributes scope and the variables scope? Other than the fact that attributes are created automatically when passing a value through a custom tag reference, is there a difference? Does it mater if I use

Re: RE: What is the best variable scope?

2002-06-26 Thread Dave Carabetta
Then the question becomes, why even bother scoping the dsName to application. Why not just set variables.dsName in application.cfm? That's exactly what I do. I have a constants file that I include in my Application.cfm file and then just reference them. The overhead of creating them on each

RE: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
Theoretically, the attributes scope is only available in custom tags. However, if in the application.cfm you create a variable like this: cfset attributes.myvar = myvalue I am not sure how ColdFusion reacts. I suspect you are creating a structure in the variables scope with the name

Re: RE: What is the best variable scope?

2002-06-26 Thread Thane Sherrington
At 01:22 PM 6/26/02 -0400, Dave Carabetta wrote: That's exactly what I do. I have a constants file that I include in my Application.cfm file and then just reference them. The overhead of creating them on each request (and yes, I have stress tested this!) is so minimal that it's worth it to me. I

Re: What is the best variable scope?

2002-06-26 Thread Seth Petry-Johnson
Theoretically, the attributes scope is only available in custom tags. However, if in the application.cfm you create a variable like this: cfset attributes.myvar = myvalue I am not sure how ColdFusion reacts. I haven't worked with anything later than CF 4.51 yet, but in both 4.0 and

Re: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
At 04:11 PM 6/26/2002 -0400, you wrote: Theoretically, the attributes scope is only available in custom tags. However, if in the application.cfm you create a variable like this: cfset attributes.myvar = myvalue I am not sure how ColdFusion reacts. I haven't worked with anything

RE: What is the best variable scope?

2002-06-26 Thread Andrew Scott
But not all users!! -Original Message- From: Stover, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 12:39 AM To: CF-Talk Subject: RE: What is the best variable scope? Jeffry, You may want to try using the REQUEST variable scope, as it is available to all referenced pages

RE: What is the best variable scope?

2002-06-26 Thread Andrew Scott
Actually I prefer to look at the request scope as a global variable to the user, where as application is global to the application. -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 1:04 AM To: CF-Talk Subject: RE: What is the best variable

RE: What is the best variable scope?

2002-06-26 Thread Andrew Scott
You seem to think application is across websites, this is not true. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 2:24 AM To: CF-Talk Subject: RE: What is the best variable scope? they do - but what happens if your CF server is serving

RE: What is the best variable scope?

2002-06-26 Thread S . Isaac Dealey
You seem to think application is across websites, this is not true. It is not necessarily true, but it can be... My CMS allows multiple websites with different domain names to be hosted in the same root directory -- all using a single application.cfm with a single cfapplication tag and the

RE: What is the best variable scope?

2002-06-26 Thread Andrew Scott
2002 8:53 AM To: CF-Talk Subject: RE: What is the best variable scope? You seem to think application is across websites, this is not true. It is not necessarily true, but it can be... My CMS allows multiple websites with different domain names to be hosted in the same root directory -- all using

Re: What is the best variable scope?

2002-06-26 Thread Dave Carabetta
It is a documented best practice, and many will attest to the experience. If you copy the variable to the local scope (as you suggest) you do not have to lock the local variable. However, why are you storing the variable in the application scope if you are going to copy it into the

Re: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
At 08:10 PM 6/26/2002 -0400, you wrote: It is a documented best practice, and many will attest to the experience. If you copy the variable to the local scope (as you suggest) you do not have to lock the local variable. However, why are you storing the variable in the application

RE: What is the best variable scope?

2002-06-26 Thread S . Isaac Dealey
Ok that goes without saying, but in hindsight this is one application pretending to be many It's not really pretending... It is actually doing the job -- the structure of the application helps to prevent namespace conflicts by isolating most of the data elements across different websites by

Re: What is the best variable scope?

2002-06-26 Thread Dave Carabetta
My understanding of your words was that storing the datasource in an application variable is good because you can copy it into the local scope and avoid locking. That is a resolution of the problem, but does not address the issue of using an application variable to store the datasource.

Re: What is the best variable scope?

2002-06-26 Thread Jeffry Houser
At 10:08 PM 6/26/2002 -0400, you wrote: My understanding of your words was that storing the datasource in an application variable is good because you can copy it into the local scope and avoid locking. That is a resolution of the problem, but does not address the issue of using an

Re: What is the best variable scope?

2002-06-26 Thread Bud
On 6/26/02, Dave Carabetta penned: Without belaboring this thread, pre-MX, I don't advocate using shared-scope varaibles such as the application scope for these sorts of variables. Period. Exactly. I never did see any reason to store a datasource name, or anything that you have to actually

Re: What is the best variable scope?

2002-06-25 Thread Douglas Brown
I prefer doing like so cfset request.site = structNew() cfset request.site.dsn = myDsn cfset request.site.title = My title blah blah blah Douglas Brown Email: [EMAIL PROTECTED] - Original Message - From: Alex Hubner [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday,

RE: What is the best variable scope?

2002-06-25 Thread Chris Lofback
I prefer to use Request scope if the variable does not need to persist across requests. Request scope can be accessed from any template, even custom tags (which I believe was it's original purpose), and no locking is required since it's not a shared scope. I set several Request scope

RE: What is the best variable scope?

2002-06-25 Thread Ken Beard
i concur, the request scope is best for variables like dsn that will not change from page to page. ken beard tampa,fl -Original Message- From: Douglas Brown [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 4:34 PM To: CF-Talk Subject: Re: What is the best variable scope? I

RE: What is the best variable scope?

2002-06-25 Thread Jeffry Houser
At 04:31 PM 6/25/2002 -0400, you wrote: Dear friends, Sorry for this stupid question but I really didn't find a consensus on that. What is the best variable scope to be used on applications (not using Fusebox or any other methodology) that need to be present on every template. There is no