[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jfw] Refactored Session Package

Though we'd previously deprecated the package, I'm starting to think that there's some value in keeping our own Session package in place.  So, I've proposed a refactoring of the package at https://github.com/joomla-framework/session/pull/12.

- Interfaces for all top level objects
- Storage objects split into a Storage and Handler object (Symfony-esque)
- Handler objects implement native SessionHandlerInterface (bumps package to PHP 5.4 minimum)
- Moved much of the data storage logic into the StorageInterface implementations, ship a NativeStorage object with base functionality

So there's a lot of session code floating around in PHP.  Looking around the PHP ecosystem, Symfony probably has an API that's the closest to what we've been working with, but comes with the baggage of the entire HTTP Foundation component.  Aura has a package that some I've talked to are high on, but its native API is a major shift from what we're familiar with.  Other packages are built toward specific frameworks or carries a high dependency load.  Our package in its refactored form is slimmed down a fair bit (right now there are 400 lines of production code with a couple of classes left to re-implement) and is only dependent on our event package for extra features.  IMO, it isn't a bad option and keeps native compatibility for session management in our API in lieu of a common session interface in PHP.

Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.