It has been a while since the last Scorpio release and a news update is in order. Work is progressing on the next major version (currently 0.3) which will feature some major updates to several core components as well as new components. What sort of updates?
ereg() has been removed completely from all Scorpio libs. It is still present in some of the third party libraries, but Scorpio is well on the way to full PHP 5.3 E_STRICT standards.
There have been some files moved around and a little additional order brought to the utility classes.
A number of bugs have been worked out and the API docs improved and clarified. Additionally, methods that were previously missing docblocks have been updated.
The mvc controller system has been reworked slightly and now all controllers require the constructor take an instance of mvcRequest. This removes one of the last uses of mvcRequest::getInstance() - which was the ultimate goal. Other changes include moving all the xajax controls out of base into a dedicated xajax controller. This is inline with plans to remove xajax from Scorpio in a future release.
Several of the base website controllers have been rebuilt and moved into the core library to make it easier to use them and there is now a dedicated mvcErrorController for handling errors generated inside the mvc system. This error system allows for error views to be fully templated via the template engine. Additional template engines are now supported to. Twig, Savant3 and PHPTal are now all supported in the mvcViewEngine and Smarty 3 can be used as a drop-in replacement with a minor change to systemSmartyBase to call parent::__construct() instead of parent::Smarty(). Smarty 3 will not be upgraded until it has reached a stable release.
The mvcAutoload system has been reworked a little to try and decouple it further from the distributor and the request, however this it is still tightly coupled and the logic may end up being moved into the distributor. At any rate, mvcAutoload now requires initialising before it can be used. This is setup automatically by the distributor.
HTTP headers can now be set for the views. Previously these had to be hard-coded, but now they can be added to an internal array and output with the render calls. Class constants have been pre-defined for several of the more common headers.
The primary distributor has been refactored a little and a dedicated mvcDistributor class created based on what was previously in websites/base/index.php. This is now the main, reference implementation.
An additional plugin event has been added for onShutdown() so plugin calls can be triggered as the distributor finishes the request.
Several updates have been made to the main system class so that it can correctly set the path when running under the Cygwin DLL on Windows. This fixes several issues were log files end up being placed in a cygwin/c/....../thing.log within the logs folder, while not a major issue it could be annoying when trying to tail logs.
The output generated for unhandled exceptions and user triggered errors has been improved to give clearer information and better traces. Part of these improvements are the truncation of the paths to be just the path within the framework base. The base path is then listed after the error. This makes the output considerably neater.
Traces are now better handled and are re-organised to place the function or class->method before the file and function traces are now in the reverse order, so originate from the function that called the triggered error (much like exceptions).
Work has been done to reduce the number of required libraries in the main system.inc page and now far more of the framework can be autoloaded. The systemAutoload library can almost be used standalone.
Previously many includes were needed by the Scorpio bootstrap (system.inc -> system::init() call). This has now been reduced to just two files.
Posted by: Dave Redfern (Writer), in News on 04 Nov 2009 @ 04:17
Tags: development update,
Contents:
This
work is licenced under a
Creative Commons Licence.