Here is an app_globals.cfm template copied right out an existing app of
mine... The names of the vars have been changed to protect the innocent. You
can reverse-engineer this to see how the client vars are handled. Also, in
no way do I imply that this is the "right way" to set up app_globals.cfm, so
don't laff if something looks dumb...


<!---START OF APP_GLOBALS.CFM--->
<cfsetting enablecfoutputonly="Yes">              
<CFIF isdefined("fuseaction")>
        <CF_FORMURL2ATTRIBUTES>
</CFIF>
<cfapplication name="my_app"
               clientmanagement="Yes"
               sessionmanagement="Yes"
               setclientcookies="Yes"
               sessiontimeout="#CreateTimeSpan(0,8,0,0)#">

<CFIF NOT (IsDefined("application.initialized"))>
        <CFIF HTTP_HOST eq "FOO_2">
                <CFSET application.initialized = 1>
                <CFSET application.name="my_app">
                <CFSET application.cvar_dsn="FOO_2_CF_CVARS">           
                <CFSET application.website_url = "http://FOO_2">
                <CFSET application.website_dir = "/my_app">
                <CFSET application.dsn = "TEST_DB">
                <CFSET application.app_title = "My App 2.1 ON FOO_2">   
        <CFELSEIF HTTP_HOST eq "FOO_1">
                <CFSET application.initialized = 1>
                <CFSET application.name="my_app">
                <CFSET application.cvar_dsn="FOO_1_CF_CVARS">           
                <CFSET application.website_url = "http://FOO_1">
                <CFSET application.website_dir = "/my_app">
                <CFSET application.dsn = "LIVE_DB">
                <CFSET application.app_title = "My App 2.1 ON FOO_1">
        <CFELSE>
                <cfinclude template="dsp_err_http_host_fail.cfm">

        </cfif> 
</CFIF>

<CFIF NOT (IsDefined("client.initialized"))>
        <CFSET client.initialized = 1>
        <cfinclude template="act_initialize_user_struct.cfm">
        <cfinclude template="act_initialize_pr_struct.cfm">
        <cfinclude template="act_initialize_li_struct.cfm">
        <cfinclude template="act_initialize_notifier_struct.cfm">       
</CFIF>

<CFPARAM name="cache_time" default="20">
<CFPARAM name="attributes.fuseaction" default="homepage">
<cfsetting enablecfoutputonly="No">

<!--- END OF APP_GLOBALS.CFM --->

Alan McCollough
Web Programmer
Allaire Certified ColdFusion Developer
Alaska Native Medical Center

> -----Original Message-----
> From: Michael Rahmn [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, August 30, 2000 8:02 AM
> To:   [EMAIL PROTECTED]
> Subject:      RE: Scope & Intranet Development
> 
> Can someone expand a bit on how and in what template client vars are
> set and called. Say for managing a var IsLoggedIn. I'm having a hard
> time understanding the resource issue. It seems wrong to query the
> database on every page (app_globals) to make sure they are still
> logged in. Thanks
> 
> PS This list has been a tremendous learning tool -- We've been able to
> get our apps following the fusebox methodology except for the whole
> state managment issue - still been using cookies for that.
> 
> | -----Original Message-----
> | From: McCollough, Alan [mailto:[EMAIL PROTECTED]]
> | Sent: Tuesday, August 29, 2000 1:30 PM
> | To: '[EMAIL PROTECTED]'
> | Subject: RE: Scope & Intranet Development
> |
> |
> | >From a development point, I find db-based client vars
> | infintely easier to
> | work with. Since all the vars are on a SQL server, I can
> | query the server to
> | see the state of all variables at any point in an
> | application's flow. If
> | you've got a 2nd development workstation at your desk, with
> | some sort of SQL
> | query tool, or even a CF page to check status, you can spy
> | out client
> | variables while an application is functioning; not just
> | when it bombs out or
> | is CFABORTed.
> |
> | Also, the occasionally irritating issue of unwanted
> | persistance is cured for
> | good. Want to delete a client variable? Issue a DELETE
> | statement, and you
> | know its gone.
> |
> | Alan McCollough
> | Web Programmer
> | Allaire Certified ColdFusion Developer
> | Alaska Native Medical Center
> |
> | > -----Original Message-----
> | > From:     Ryan Wood [SMTP:[EMAIL PROTECTED]]
> | > Sent:     Tuesday, August 29, 2000 12:26 PM
> | > To:       '[EMAIL PROTECTED]'
> | > Subject:  Scope & Intranet Development
> | >
> | > I am a CF intranet developer and very frequently use the
> | session scope.
> | > Most
> | > of the state management is by a local employee ID. It
> | appears that most
> | > people and examples on this list use the client scope
> | rather than the
> | > session scope. Other than load balancing, is there an
> | advantage to there
> | > any
> | > to the client scope over the session scope when not using
> | CFID & tokens to
> | > track state/user management?
> | >
> | > Are there any other intranet developers who are using fusebox for
> | > corporate
> | > reporting & applications? If so, please email off-list
> | ([EMAIL PROTECTED]).
> | > I'd
> | > be very curious to hear about your implementations.
> | >
> | > Ryan
> | >
> | > __
> | > Ryan Wood
> | > Intranet Web Developer
> | > Corporate Systems-MIS
> | > Datastream Systems, Inc.
> | > 864.422.5260
> | > 800.955-6775 x5260
> | >
> | ------------------------------------------------------------
> | --------------
> | > ----
> | > To Unsubscribe visit
> | >
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebo
> x or
> > send a message to [EMAIL PROTECTED] with
> 'unsubscribe' in
> > the body.
> ----------------------------------------------------------------------
> --------
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebo
> x or send a message to [EMAIL PROTECTED] with
> 'unsubscribe' in the body.
> 
> 
> --------------------------------------------------------------------------
> ----
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to