On Fri, Feb 18, 2011 at 11:36 AM, Rick Faircloth <r...@whitestonemedia.com> wrote: > When a user visits www.xyz.com, onApplicationStart() runs a > query that retrieves, among other variables, the absolute path > to those images. Realize, the application that I'm referencing > is a "global site manager" (single codebase) for managing > site content on multiple sites (each with a separate codebase, > as these are custom sites). The end user sites are completely > different. I'm using the "global site manager", at this point, > to simply provide a single app to supply CRUD functionality > to the users for their site content. Even the databases for > these sites have little in common. I just decided that instead > of building CRUD functionality over-and-over for each site manager, > I'd build "one site manager to rule them all." :o)
That doesn't really sounds like you're running multiple different sites off one unified codebase - you're providing a library that is intended to be reused across multiple, separate applications :) > The userImages path gets set when the application is first run > by onApplicationStart() and a query, qGetApplicationVariables, is run > that retrieves info such as the userImages path, or, in this case, > qGetApplicationVariables.userImagesPathAbsolute. Then, the query > value for the userImages path is cfset to application.userImagesPathAbsolute > for use throughout the site. I have a site object containing all the site-specific settings. When a request comes in, the domain in the URL is mapped to a site object, and that is used throughout the request for any site-specific info. Site objects are cached for efficiency, of course. This allows me to clearly separate code / data that is common across all sites from that which varies. > If I have the same application name, wouldn't the userImages path > variable be overwritten when another user visits another site using > the same site manager codebase and onApplicationStart() is run again? onApplicationStart() is run once for the entire system in my model. I don't use bare application variables anywhere (because I use a framework that has all the services injected as needed, or uses a bean factory accessible within the framework). -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342447 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm