source: branches/2.0singleton/docs/revision_history.txt @ 135

Last change on this file since 135 was 135, checked in by scdev, 18 years ago

Q - Finished integrating singleton methods into existing code. Renamed SessionCache? to Cache, and renamed methods in Cache and Prefs

File size: 3.4 KB
RevLine 
[1]1--------------------------------------------------------------------------------
[7]2Strangecode codebase 2.0
[1]3--------------------------------------------------------------------------------
4
5Codebase self contained. runs without reference to external files or info.
6    - can be located in /usr/local/php/lib/php for server-wide access
7    - does not include any files outside codebase
8    - does not write to files outside codebase
9    - does not try to determine it's location or site parameters. this will minimize it's failure to glean this info.
10    - will still run if info missing: db creds, log dir, session info.
11    - can be located in /usr/local/lib/php if necessary, so accessible by all sites.
[42]12
[1]13remove interdependencies:
14    - App() is the only dependency for other classes. It includes Utilities.inc.php silently.
[7]15    - Update libs requiring external files, such as html templates and email templates, classes now self-contained.
[42]16
[7]17Things with modified interfaces:
18    - App
19    - Auth_SQL
20    - DB
21    - DBSessionHandler
22    - RecordLock
23    - RecordVersion
[135]24    - Cache
[21]25    - Upload
[1]26
27One application will always have distinct:
28    - Configurations:
29        - log dir
30        - log config
31        - debugging
32        - charset
[7]33        - session data
[1]34    - Objects:
[7]35        - auth
36        - db
[1]37    - Environment:
[7]38        - seperate codebase installs if necessary for each app
39        - unique include path
[1]40        - site/doc/web root
41        - lang
42    - $dbh database handler
[42]43
[7]44App object:
45    - object belongs to a realm, keeping messages and session data within specific site/app.
46    - uses the singleton pattern so only one instance of App exists for each app.
47    - app object can be accessed globally without reference to object name by calling methods statically, e.g. App:logMsg()
[42]48    - seperate application and codebase parameters from site configuration variables.
[135]49      Use $app->getParam('var') or $app->getParam('var') to get app params.
[7]50      F or site configurations do whatever you want (I'm using $cfg['node']['features'] format for configurations)
[42]51
[7]52App configuration parameters
53    - defaults part of the app class
54    - do not need to be set in any specific order
55    - missing vars are dynamically accounted for.
[21]56
57Auth_SQL object:
58    - 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.
59
[1]60DB object:
[135]61    - Self contained class for DB functions. $db->query is the only necessary function. Maintains connections and state independent of App.
[1]62
63Full test suite for all codebase libraries. Run from the command line: "codebase/tests/run_tests.sh;"
64
65Classes 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.
66
[7]67And much much more still to document...
68
69
70
[1]71--------------------------------------------------------------------------------
[7]72Strangecode codebase 1.0.0 release
[1]73--------------------------------------------------------------------------------
74
75This is the primary stable release used before we started using Subversion. It was maintained erratically by one erratic person. No revision info documented, sorry.
76
77
Note: See TracBrowser for help on using the repository browser.