2010-05-09

New Principles and Classes interface

First post since November 2009... not to say nothing has been happening during this time!

Although the majority of my activities of late have focused on work within our initial Proto-Techante in offering lectures on how to make websites and helping with the IT aspect of another local initiative of a more general ecological nature, I have also recently started re-writing the Principles and Classes database from 2008 to use a more a more streamlined interface as well as much cleaner code!

The new interface features a neat, professional looking interface for viewing the Principles, Classes and Tags entered into the database. The primary motivation for rewriting it was to provide a usable wiki data exporter, to be used with the Mediawiki External Data plugin. The new database uses the existing MySQL backend, but exports the data to a generic XML format and then uses a system of plugins to convert this into the output formats, where the choice of plugin depends solely on the filename extension specified in the URL.

This allows not only a much easier separation between data retrieval and output formatting in code, hence greately simplifying the addition of extra export formats, but also makes it easy to integrate the database into external viewers on the internet. In this case, the system integrates neatly with our wiki, allowing us to enter the standards into the database and then very easily present them to an audience in the appropriate context, without any additional work other than adding a simple string like "{{PCS|2-20100426-120332}}".

I have also added a recursive exporter that provides more data, appropriately nested, intended for the case where the complete text is needed on one page, such as for example when one is to print out the data entered and submit it to a government institution as may be required by law. Although this interface is hypothetically exploitable because it is recursive, this should not be possible durring normal use and would be hard to do without writing special software specifically to exploit this fault. Even then PHP has mechanisms to prevent damage. Thus I am leaving this fault unhandeled. I also plan to write a few additional plugins to allow export to other viewers, as needed, such as RSS (which is viewable as a live feed in other websites).

On a side note, I am also continuing work on the Senzor package to include an AJAX-based graph renderer, naturally intended to overcome the page-refresh requirement and the high CPU usage associated with re-rendering the graph from XML each time.