[124] | 1 | --------------------------------------------------------------------- |
---|
| 2 | Strangecode codebase 2.1 |
---|
| 3 | --------------------------------------------------------------------- |
---|
| 4 | |
---|
| 5 | css/utilities.inc.php and css/codebase.inc.php now have sc- prepended to all selectors. This regex will convert an existing site to the new sc- format: |
---|
| 6 | s/class="([\w-]+ )*(tiny|small|medium|large|full|twolines|short|tall|fullscreen|nowrap|clearboth|center|right|padright|padleft|padleft|help|monospaced|pkg)( [\w-]+)*"/class="$1sc-$2$3"/gi |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | --------------------------------------------------------------------- |
---|
[7] | 11 | Strangecode codebase 2.0 |
---|
[124] | 12 | --------------------------------------------------------------------- |
---|
[1] | 13 | |
---|
| 14 | Codebase self contained. runs without reference to external files or info. |
---|
| 15 | - can be located in /usr/local/php/lib/php for server-wide access |
---|
| 16 | - does not include any files outside codebase |
---|
| 17 | - does not write to files outside codebase |
---|
| 18 | - does not try to determine it's location or site parameters. this will minimize it's failure to glean this info. |
---|
| 19 | - will still run if info missing: db creds, log dir, session info. |
---|
| 20 | - can be located in /usr/local/lib/php if necessary, so accessible by all sites. |
---|
[42] | 21 | |
---|
[1] | 22 | remove interdependencies: |
---|
[235] | 23 | - App() is the primary dependency for other classes. It includes Utilities.inc.php silently. |
---|
| 24 | - Updated classes requiring external files, such as html templates and email templates, classes now self-contained. |
---|
[42] | 25 | |
---|
[7] | 26 | Things with modified interfaces: |
---|
| 27 | - App |
---|
| 28 | - Auth_SQL |
---|
| 29 | - DB |
---|
| 30 | - DBSessionHandler |
---|
[137] | 31 | - Lock |
---|
| 32 | - Version |
---|
[136] | 33 | - Cache |
---|
[21] | 34 | - Upload |
---|
[1] | 35 | |
---|
| 36 | One application will always have distinct: |
---|
| 37 | - Configurations: |
---|
| 38 | - log dir |
---|
| 39 | - log config |
---|
| 40 | - debugging |
---|
| 41 | - charset |
---|
[7] | 42 | - session data |
---|
[1] | 43 | - Objects: |
---|
[7] | 44 | - auth |
---|
| 45 | - db |
---|
[1] | 46 | - Environment: |
---|
[7] | 47 | - seperate codebase installs if necessary for each app |
---|
| 48 | - unique include path |
---|
[1] | 49 | - site/doc/web root |
---|
| 50 | - lang |
---|
| 51 | - $dbh database handler |
---|
[42] | 52 | |
---|
[7] | 53 | App object: |
---|
| 54 | - object belongs to a realm, keeping messages and session data within specific site/app. |
---|
| 55 | - uses the singleton pattern so only one instance of App exists for each app. |
---|
| 56 | - app object can be accessed globally without reference to object name by calling methods statically, e.g. App:logMsg() |
---|
[42] | 57 | - seperate application and codebase parameters from site configuration variables. |
---|
[136] | 58 | Use $app->getParam('var') or $app->getParam('var') to get app params. |
---|
[7] | 59 | F or site configurations do whatever you want (I'm using $cfg['node']['features'] format for configurations) |
---|
[42] | 60 | |
---|
[7] | 61 | App configuration parameters |
---|
| 62 | - defaults part of the app class |
---|
| 63 | - do not need to be set in any specific order |
---|
| 64 | - missing vars are dynamically accounted for. |
---|
[21] | 65 | |
---|
| 66 | Auth_SQL object: |
---|
| 67 | - Modified to set the auth-type within the object. We needed to use one object name ($auth) for all instances so we can use template that use this variable name commonly. login.php, lock.php, versions.php, password.php -- all in the codebase services will be used globally on multiple sites and need this variable name set. |
---|
| 68 | |
---|
[1] | 69 | DB object: |
---|
[136] | 70 | - Self contained class for DB functions. $db->query is the only necessary function. Maintains connections and state independent of App. |
---|
[1] | 71 | |
---|
| 72 | Full test suite for all codebase libraries. Run from the command line: "codebase/tests/run_tests.sh;" |
---|
| 73 | |
---|
[137] | 74 | Classes that access database tables have a function initDB() that will setup the basic schema necessary to run. This includes Auth_SQL, Version, Lock, and DBSessionHandler. |
---|
[1] | 75 | |
---|
[7] | 76 | And much much more still to document... |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | |
---|
[124] | 80 | --------------------------------------------------------------------- |
---|
[7] | 81 | Strangecode codebase 1.0.0 release |
---|
[124] | 82 | --------------------------------------------------------------------- |
---|
[1] | 83 | |
---|
| 84 | 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. |
---|
| 85 | |
---|
| 86 | |
---|