There are three big changes in the 0.7.x codebase that I want to highlight and solicit opinion on.

  1. Exceptions. I've revised our handling of server and client errors
     so that we throw exceptions up the stack rather than trying to do
     output way down at the bottom of the stack. I've only changed
     stuff at the crudest level, but this is how we'll be handling
     errors for future versions of the code. (Hooray! Welcome to PHP
     5!) common_user_error() and common_server_error() will soon go
     away... I hope.
  2. Events. I've add a simple framework based on the MediaWiki hooks
     system to let third-party code handle system events. Client code
     uses Event::addHandler($name, $callable) to add a handler for a
     named event. Core code uses Event::handle($name, array($arg1,
     $arg2, $arg3) to handle an event. Handlers can either enhance or
     completely replace core code. Handlers throw exceptions if they
     have errors. Current named events can be found in EVENTS.txt; this
     documentation probably needs a more permanent home.
  3. Plugins. I've added a simple plugin class to automatically
     register event handlers. Plugins can subclass "Plugin" and then
     can handle events simply by having an onEventName($arg1, $arg2,
     $arg3) method. There's now a plugins directory with a sample
     plugin for Google Analytics.

This is still only partially baked (unreleased code, just in the dev branch) so there's time to make modifications. I of course find the whole thing incredibly elegant and well-designed, but YMMV.

-Evan


_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to