On Fri, Feb 18, 2011 at 6:14 AM, Eric Cobb <cft...@ecartech.com> wrote: > One thing you may want to take into consideration, if you plan on having > many sites run through this codebase, is NOT giving each site a unique > application name.
I always take the approach of a single application name - for the reasons Eric presents - and I also typically have one DSN and all sites are in a single multi-tenant schema (and I'll be explaining all this in my Multi-Tenant Architecture talk at cf.Objective() BTW). Re: ?reinit=1 situations - what do you normally need to do that for? Refreshing the cache for a particular site? Design that into your admin system. Refreshing code after pushing a new file? As Eric points out, you need to reinit *every* application in that situation so you'd end up restarting the entire server. With MSOC, you need to consider your DB schema as part of your code too - that "OC" part means "One Schema" too. "OC" really means "One Application" otherwise you're going to be running multiple identical copies of your code and wasting memory. Steve asked "wouldn't it make sense to push it into the server scope?" - that can interfere with running any other applications on the server - and you probably want an admin application running alongside your multiple user applications. Now, you may share code between the admin and the user applications but it will be lower level components, if any, and you typically only have one admin application so you're at most running two copies of your code. You've also got startup issues to think about - if you have multiple applications and need to initialize server scope, there's no safe hook to do that (until we got CF9's onServerStart() / Server.cfc). Some things to think about... If you're at cf.Objective() and want to hear more on this topic, attend my talk and catch me in the bar afterward! If you're not yet registered for cf.Objective()... It'll be a great conference: five tracks this year, lots of awesome topics from great speakers, all packed into three days in a relatively central location (Minneapolis). You've missed the early bird now but it's still great value at under $1k! In addition to my Multi-Tenant Architecture talk, I'm giving an Introduction to Functional Programming session which addresses things like careful management of shared data and why side-effect-free code is easier to test and easier to get right in the first place (amongst many other functional techniques, some of which you can apply directly to CFML and some of which will at least make you think differently about solving problems). -- 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 Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:342436 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm