> -----Original Message----- > From: House of Fusion [mailto:[EMAIL PROTECTED] > Sent: Friday, July 27, 2007 7:31 AM > To: CF-Community > Subject: One Code base - Multiple sites > > I know someone was talking about this not long ago, was wondering if > they > found a solution. > > Goal: One code base (one full set of application code) > Multiple sites using the same code base
CFCs are very useful for this. You keep them all in a central location and instantiate differently them for each application. The CFC libraries I use are here: http://www.depressedpress.com/Content/Development/ColdFusion/DPLibraries/Ind ex.cfm A good example of what you're talking about is the security library. The security system is instantiated as a single CFC which can be stored in either server or application scope. It accepts, as input, another CFC instance which defines the datasource to use. These data CFCs ("Persistence Info" CFCs) point to "Broker" CFCs which handle all low-level data interaction - they can point to databases, files, LDAP, whatever. So the same codebase could support multiple running instances of the applications all using different datasources. Right now there's still lots of code in the individual apps - but that's mostly interface code (which changes a lot between apps). I'm pleased with this but there are definitely more options. Most frameworks - especially MVC-based frameworks like MACH II lend themselves to this pretty well - you can share the models and controllers almost effortlessly and just create custom views for each app for example. Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:239146 Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
