-------------------------------------------------------------------------------- Strangecodebase branch 2.0 dev -------------------------------------------------------------------------------- Codebase self contained. runs without reference to external files or info. - can be located in /usr/local/php/lib/php for server-wide access - does not include any files outside codebase - does not write to files outside codebase - does not try to determine it's location or site parameters. this will minimize it's failure to glean this info. - will still run if info missing: db creds, log dir, session info. - can be located in /usr/local/lib/php if necessary, so accessible by all sites. remove interdependencies: - App() is the only dependency for other classes. It includes Utilities.inc.php silently. - admin_id vs. user_id - libs requiring external files, such as html templates and email templates, make classes self-contained. App object: - object belongs to a realm, keeping messages and session data within specific site/app. - uses the singleton pattern so only one instance of App exists for each app. - app object can be accessed globally without reference to object name by calling methods statically, e.g. App:logMsg() - seperate application and codebase parameters from site configuration variables. Use $app->getParam('var') or App::getParam('var') to get app params and for site configurations do whatever you want I'm using $cfg['node']['features'] format for configurations Application configuration vars - defaults part of the app class - do not need to be set in any specific order One application will always have distinct: - Configurations: - log dir - log config - debugging - charset - maybe sessions - Objects: - auth object - security roster - Environment: - even seperate codebase installs if necessary - include path - site/doc/web root - lang - $dbh database handler DB object: - Self contained class for DB functions. db::query is the only necessary function. Maintains connections and state independent of App. Things with modified interfaces: - App - Auth_SQL - DB - DBSessionHandler.inc.php - RecordLock - RecordVersion - SessionCache.inc.php Full test suite for all codebase libraries. Run from the command line: "codebase/tests/run_tests.sh;" Classes that access database tables have a function initDB() that will setup the basic schema necessary to run. This includes Auth_SQL, RecordVersion, RecordLock, and DBSessionHandler. -------------------------------------------------------------------------------- Strangecodebase branch 1.0 release -------------------------------------------------------------------------------- This is the primary stable release used before we started using Subversion. It was maintained erratically by one erratic person. No revision info documented, sorry.