]]
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
: 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
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
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
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
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,
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
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
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
]
-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
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
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
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
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
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
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
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
[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
-
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
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
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
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
, 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
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
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
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
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
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
-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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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,
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
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
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
66 matches
Mail list logo