RE: Scope Woes & Virtual Directories

2006-01-25 Thread Burns, John D
James-

Very good idea. I didn't think of that one but that would work very well
if we're understanding his needs correctly.

John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
 

-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 24, 2006 11:52 PM
To: CF-Talk
Subject: Re: Scope Woes & Virtual Directories

Create a common app name for all your shared application scope
variables. In each site's Application.cfm file, use a CFAPPLICATION tag
to get the variables from this scope and put them in the request scope.
Then use a second CFAPPLICATION tag to swap the application to the
unique one for that site. When you need to write to the common
application scope, swap back again with a new CFAPPLICTION tag, etc etc.
It will be far quicker that the DB calls.

On 1/24/06, jonese <[EMAIL PROTECTED]> wrote:
> Howard: Nice idea but the SQL cost is more than we want to deal with.
>
> John: Our applications have to have unique names so that we don't have

> application scoped vars over written (thinks like DSN, file paths etc 
> are stored in the application scope).
>
> Any other ideas or thoughts??

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



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230408
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: Scope Woes & Virtual Directories

2006-01-25 Thread Burns, John D
Can you set the variables that need to be shared in a scope that can be
shared? Like the server scope? The only other option would be to handle
your sessions manually in my mind. Have a table where you generate
unique session keys and assign those to the user via a cookie or url
variable. Keep track of last accessed time and that sort of thing. Then
you can save whatever variables you want into another table and
reference by the session key and variable name. It's more DB intensive
but it gives the flexibility you want as long as db datatypes can handle
the data you're wanting to shared. You can also let CF manage your
sessions, but store the vars you want to share in a table with the
session key and variable name so you can query it out from any app. 


John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
 

-Original Message-
From: jonese [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 24, 2006 2:55 PM
To: CF-Talk
Subject: Re: Scope Woes & Virtual Directories

Howard: Nice idea but the SQL cost is more than we want to deal with.

John: Our applications have to have unique names so that we don't have
application scoped vars over written (thinks like DSN, file paths etc
are stored in the application scope).

Any other ideas or thoughts??

I wish CF would just see this directory as a sub directory of each of my
sites.

Eric Jones

On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> You don't need unique application names.  Lets say you have one site 
> and at the top of it you have  then you 
> set some application variables somewhere in there.  Then, you have 
> another site on the same server, you can put  name="myApp"> in that site and it will have access to the variables 
> that are set in the first site.  However, keep in mind, you want to be

> careful about multiple sites setting and getting variables to make 
> sure that you're not relying on a variable that may not have been set.

> Especially when the server is rebooted or something like that.  Many 
> people have the misconception that the  tag has to go 
> in the Application.cfm but that's not true. It can go at the top of 
> each individual page and you could leave out the Application.cfm 
> altogether. The Application.cfm just makes it easier because it gets
called everytime.
>
>
> John Burns
> Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | 
> Web Developer
>
>
> -Original Message-----
> From: jonese [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 24, 2006 10:59 AM
> To: CF-Talk
> Subject: Re: Scope Woes & Virtual Directories
>
> right but how can we do this and still maintain the fact that these 
> files are shared among 50 other sites, with 50 unique application
names?
>
> On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> > It depends on the scope you're using. If you're talking application 
> > and session variables, you need  to define that these

> > pages are part of the application, thus allowing it to access the 
> > scoped variables.
> >
> >
> > John Burns
> > Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. |

> > Web Developer
> >
> >
> > -Original Message-
> > From: jonese [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 24, 2006 9:59 AM
> > To: CF-Talk
> > Subject: Scope Woes & Virtual Directories
> >
> > Ok here's the scenario.
> >
> > We have 50 sites on a server using our CMS.
> > Each of these sites has an IIS virtual Directory called global.
> > global is a mapped directory in CF Admin.
> >
> > The problem we are having is when a person referances 
> > http://theresite.com/global/ticket/index.cfm the code doesn't have 
> > access to many of the scoped variables.
> >
> > Any ideas how we can get global to see all the scoped variables?
> >
> > jonese
> >
> >
> >
> >
>
>
>
> 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230407
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: Scope Woes & Virtual Directories

2006-01-24 Thread James Holmes
Create a common app name for all your shared application scope
variables. In each site's Application.cfm file, use a CFAPPLICATION
tag to get the variables from this scope and put them in the request
scope. Then use a second CFAPPLICATION tag to swap the application to
the unique one for that site. When you need to write to the common
application scope, swap back again with a new CFAPPLICTION tag, etc
etc. It will be far quicker that the DB calls.

On 1/24/06, jonese <[EMAIL PROTECTED]> wrote:
> Howard: Nice idea but the SQL cost is more than we want to deal with.
>
> John: Our applications have to have unique names so that we don't have
> application scoped vars over written (thinks like DSN, file paths etc
> are stored in the application scope).
>
> Any other ideas or thoughts??

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

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230397
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: Scope Woes & Virtual Directories

2006-01-24 Thread Howard Fore
Another thing I've done when I needed to pass session info into a system
that didn't share sessions (CF into PHP, or Perl into CF) is to create a
script on either side that receives the variable data as URL parameters,
then creates the session accordingly. You direct every site-to-site link
through this script. One parameter is the eventual final URL and all the
others are variables to stuff into the new session. The downside here is
that URL parameters are inherently insecure.

On 1/24/06, jonese <[EMAIL PROTECTED]> wrote:
>
> Howard: Nice idea but the SQL cost is more than we want to deal with.
>
> John: Our applications have to have unique names so that we don't have
> application scoped vars over written (thinks like DSN, file paths etc
> are stored in the application scope).
>
> Any other ideas or thoughts??
>
> I wish CF would just see this directory as a sub directory of each of
> my sites.
>
> Eric Jones
>
> On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> > You don't need unique application names.  Lets say you have one site and
> > at the top of it you have  then you set some
> > application variables somewhere in there.  Then, you have another site
> > on the same server, you can put  in that
> > site and it will have access to the variables that are set in the first
> > site.  However, keep in mind, you want to be careful about multiple
> > sites setting and getting variables to make sure that you're not relying
> > on a variable that may not have been set. Especially when the server is
> > rebooted or something like that.  Many people have the misconception
> > that the  tag has to go in the Application.cfm but that's
> > not true. It can go at the top of each individual page and you could
> > leave out the Application.cfm altogether. The Application.cfm just makes
> > it easier because it gets called everytime.
> >
> >
> > John Burns
> > Certified Advanced ColdFusion MX Developer
> > Wyle Laboratories, Inc. | Web Developer
> >
> >
> > -Original Message-
> > From: jonese [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 24, 2006 10:59 AM
> > To: CF-Talk
> > Subject: Re: Scope Woes & Virtual Directories
> >
> > right but how can we do this and still maintain the fact that these
> > files are shared among 50 other sites, with 50 unique application names?
> >
> > On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> > > It depends on the scope you're using. If you're talking application
> > > and session variables, you need  to define that these
> > > pages are part of the application, thus allowing it to access the
> > > scoped variables.
> > >
> > >
> > > John Burns
> > > Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. |
> > > Web Developer
> > >
> > >
> > > -Original Message-
> > > From: jonese [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 24, 2006 9:59 AM
> > > To: CF-Talk
> > > Subject: Scope Woes & Virtual Directories
> > >
> > > Ok here's the scenario.
> > >
> > > We have 50 sites on a server using our CMS.
> > > Each of these sites has an IIS virtual Directory called global.
> > > global is a mapped directory in CF Admin.
> > >
> > > The problem we are having is when a person referances
> > > http://theresite.com/global/ticket/index.cfm the code doesn't have
> > > access to many of the scoped variables.
> > >
> > > Any ideas how we can get global to see all the scoped variables?
> > >
> > > jonese
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230366
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: Scope Woes & Virtual Directories

2006-01-24 Thread jonese
Howard: Nice idea but the SQL cost is more than we want to deal with.

John: Our applications have to have unique names so that we don't have
application scoped vars over written (thinks like DSN, file paths etc
are stored in the application scope).

Any other ideas or thoughts??

I wish CF would just see this directory as a sub directory of each of
my sites.

Eric Jones

On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> You don't need unique application names.  Lets say you have one site and
> at the top of it you have  then you set some
> application variables somewhere in there.  Then, you have another site
> on the same server, you can put  in that
> site and it will have access to the variables that are set in the first
> site.  However, keep in mind, you want to be careful about multiple
> sites setting and getting variables to make sure that you're not relying
> on a variable that may not have been set. Especially when the server is
> rebooted or something like that.  Many people have the misconception
> that the  tag has to go in the Application.cfm but that's
> not true. It can go at the top of each individual page and you could
> leave out the Application.cfm altogether. The Application.cfm just makes
> it easier because it gets called everytime.
>
>
> John Burns
> Certified Advanced ColdFusion MX Developer
> Wyle Laboratories, Inc. | Web Developer
>
>
> -Original Message-
> From: jonese [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 24, 2006 10:59 AM
> To: CF-Talk
> Subject: Re: Scope Woes & Virtual Directories
>
> right but how can we do this and still maintain the fact that these
> files are shared among 50 other sites, with 50 unique application names?
>
> On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> > It depends on the scope you're using. If you're talking application
> > and session variables, you need  to define that these
> > pages are part of the application, thus allowing it to access the
> > scoped variables.
> >
> >
> > John Burns
> > Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. |
> > Web Developer
> >
> >
> > -Original Message-
> > From: jonese [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 24, 2006 9:59 AM
> > To: CF-Talk
> > Subject: Scope Woes & Virtual Directories
> >
> > Ok here's the scenario.
> >
> > We have 50 sites on a server using our CMS.
> > Each of these sites has an IIS virtual Directory called global.
> > global is a mapped directory in CF Admin.
> >
> > The problem we are having is when a person referances
> > http://theresite.com/global/ticket/index.cfm the code doesn't have
> > access to many of the scoped variables.
> >
> > Any ideas how we can get global to see all the scoped variables?
> >
> > jonese
> >
> >
> >
> >
>
>
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230363
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: Scope Woes & Virtual Directories

2006-01-24 Thread Burns, John D
You don't need unique application names.  Lets say you have one site and
at the top of it you have  then you set some
application variables somewhere in there.  Then, you have another site
on the same server, you can put  in that
site and it will have access to the variables that are set in the first
site.  However, keep in mind, you want to be careful about multiple
sites setting and getting variables to make sure that you're not relying
on a variable that may not have been set. Especially when the server is
rebooted or something like that.  Many people have the misconception
that the  tag has to go in the Application.cfm but that's
not true. It can go at the top of each individual page and you could
leave out the Application.cfm altogether. The Application.cfm just makes
it easier because it gets called everytime. 


John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
 

-Original Message-
From: jonese [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 24, 2006 10:59 AM
To: CF-Talk
Subject: Re: Scope Woes & Virtual Directories

right but how can we do this and still maintain the fact that these
files are shared among 50 other sites, with 50 unique application names?

On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> It depends on the scope you're using. If you're talking application 
> and session variables, you need  to define that these 
> pages are part of the application, thus allowing it to access the 
> scoped variables.
>
>
> John Burns
> Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | 
> Web Developer
>
>
> -Original Message-
> From: jonese [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 24, 2006 9:59 AM
> To: CF-Talk
> Subject: Scope Woes & Virtual Directories
>
> Ok here's the scenario.
>
> We have 50 sites on a server using our CMS.
> Each of these sites has an IIS virtual Directory called global.
> global is a mapped directory in CF Admin.
>
> The problem we are having is when a person referances 
> http://theresite.com/global/ticket/index.cfm the code doesn't have 
> access to many of the scoped variables.
>
> Any ideas how we can get global to see all the scoped variables?
>
> jonese
>
>
>
> 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230329
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: Scope Woes & Virtual Directories

2006-01-24 Thread Howard Fore
On 1/24/06, jonese <[EMAIL PROTECTED]> wrote:

> right but how can we do this and still maintain the fact that these
> files are shared among 50 other sites, with 50 unique application
> names?


I dimly remember some Java trickery you can do (in MX of course) to grab
variables from the server for a given application. However, that path is
likely fraught with peril.

My first inclination would be to create a central repository for shared
variable values. Much like the way CF can save client scopes to a database.
Create a database table that stores the session, using some user value that
is unique across applications as the primary key (could be session, I can't
remember if they are unique to the server or to an app). Create a custom tag
that reads and writes an arbitrarily named struct ("sharedVariables" for
instance) to this table. Put this custom tag in Application.cfm and
OnRequestEnd.cfm so the shared variables struct is refreshed and saved for
each request. When you need to read or write a variable that should be
shared, you use the "sharedVariables" struct as the scope.

Pros: no additional work when you add a 51st application.

Cons: read and write to the database for each user request, requires a user
unique key.

--
Howard Fore, [EMAIL PROTECTED]


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230319
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: Scope Woes & Virtual Directories

2006-01-24 Thread jonese
right but how can we do this and still maintain the fact that these
files are shared among 50 other sites, with 50 unique application
names?

On 1/24/06, Burns, John D <[EMAIL PROTECTED]> wrote:
> It depends on the scope you're using. If you're talking application and
> session variables, you need  to define that these pages
> are part of the application, thus allowing it to access the scoped
> variables.
>
>
> John Burns
> Certified Advanced ColdFusion MX Developer
> Wyle Laboratories, Inc. | Web Developer
>
>
> -Original Message-
> From: jonese [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 24, 2006 9:59 AM
> To: CF-Talk
> Subject: Scope Woes & Virtual Directories
>
> Ok here's the scenario.
>
> We have 50 sites on a server using our CMS.
> Each of these sites has an IIS virtual Directory called global.
> global is a mapped directory in CF Admin.
>
> The problem we are having is when a person referances
> http://theresite.com/global/ticket/index.cfm the code doesn't have
> access to many of the scoped variables.
>
> Any ideas how we can get global to see all the scoped variables?
>
> jonese
>
>
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230316
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: Scope Woes & Virtual Directories

2006-01-24 Thread Burns, John D
It depends on the scope you're using. If you're talking application and
session variables, you need  to define that these pages
are part of the application, thus allowing it to access the scoped
variables. 


John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
 

-Original Message-
From: jonese [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 24, 2006 9:59 AM
To: CF-Talk
Subject: Scope Woes & Virtual Directories

Ok here's the scenario.

We have 50 sites on a server using our CMS.
Each of these sites has an IIS virtual Directory called global.
global is a mapped directory in CF Admin.

The problem we are having is when a person referances
http://theresite.com/global/ticket/index.cfm the code doesn't have
access to many of the scoped variables.

Any ideas how we can get global to see all the scoped variables?

jonese



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