No more use of static calls, but using SGL2_Registry for central object storage! This makes it possible to replace and/or subclasses core library classes without updating existing code. For example if you want to improve translation support, you can just replace the instance under SGL2_Registry::get('translation') with the new version, and all modules accessing it will use it. Same goes for things like db, session or cache.

So to accomplish this, we have to:

- Remove static calls on SGL2 library classes (exception: Registry)
- Make SGL2_Session an abstract base class
- Make SGL2_Translation an abstract base class

A word about SGL2_Registry:

- A nice feature would be to allow auto-downgrade access. I would support “sub-entries” by using a “.”. So example: SGL2_Registry::get(‘db.session’); => no entry for db.session, strip of session, get instance for ‘db’;

A word about SGL2_Config:

- To make it possible to replace the configuration instance, I would like to change calls like “SGL2_Config::get(site.name’) to SGL2_Registry::get(‘config’)->site->name; Config class should not be used statically!

A word about Exception-Handling:

- Add an SGL2_Exception base class(es), so you can catch SGL2 related exceptions
- Make error messages use vprintf, so you can translate message if you like

A word about SGL2_Session class:

- Implement session save handlers sub classes (file, db, memcache)
- Remove user setup from session setup
- Make regenerate_id only be called every xy seconds (xy=config value)
- Use regenerate_id parameter to remove old session file

A word about SGL2_Url class:

- Remove dependency on Horde_Routes, but use SGL2_Router interface
- Remove any backward compatibility hacks

A word about SGL2_Translation class:

- Add sub class “SGL2_Translation_Array” instead of drivers

A word about language handling:

- Remove language from route
- Preprocess language before route parsing
- Language options “session, url, subdomain)
- Option: No language in url/subdomain for default language
- Auto-discover language as possible on first request

A word about database:

- Use PEAR’s MDB2 as database driver
- No more support for data objects
- SGL_DB should be removed
- SGL_DB::getPagedData() has to be refactored into multiple classes (data set, pager)
- Add SGL2_Pager to work correctly with routing