If you have what sounds like framework code, put it in a separate framework directory and create a CF mapping to access it. Before you do so, think carefully of versioning issues. Let¹s say you have a framework ³MyDataAccess² - what happens when you want to make a non-trivial change to it? If you have a bunch of sites using it, you¹ll probably want to create a new version, and then port and test the sites one at a time.
There are a few ways of doing this. In CF8, one is per app mappings so in one app MyDA points to c:\Data\Framework\MyDataAccess10 and in the next in points to c:\Data\Framework\MyDataAccess11. Another is to set the LibraryPathName as a variable so you might have a mapping to c:\Data\Framework called BaseFramework and then include stuff ³#BaseFramework#\#LibraryPathName#\whatever.cfm/cfc². That works wherever you can use variables, but does NOT work if you want to extend from files in the framework directory as the extends attribute of CFC¹s doesn¹t support variable paths. Another alternative is to make sure your framework path string is unique and run a search and replace across each project as part of porting it. A final approach is to use relative mappings and have the projects within a given version of the frameworks directory which has the added benefit of being able to run multiple copies of the same site against different framework versions. Best Wishes, Peter On 8/28/07 7:21 PM, "Mark Ireland" <[EMAIL PROTECTED]> wrote: > What is the best way to share components between apps. I mean apps that are on > the same server? I am thinking of basic data access stuff that all the apps > share. > > Should they all be under one umbrella app, with a mapping outside the webroot? > > Thanks > > > Explore the seven wonders of the world Learn more! > <http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE> > You are subscribed to cfcdev. To unsubscribe, please follow the instructions > at http://www.cfczone.org/listserv.cfm > > CFCDev is supported by: > Katapult Media, Inc. > We are cool code geeks looking for fun projects to rock! > www.katapultmedia.com > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
