From: James E. F. <jf...@ac...> - 2002-08-04 22:47:39
|
A few days ago I was chatting with the IT Lab guys (greggmc, zorncj) about ways to make phpesp more flexible. As you may have noticed, people frequently request the ability to make forked (aka branching or conditional) surveys, where the response to one question chooses what additional questions are seen. In order to implement this feature, the database schema would have to be changed to hold more metadata. There have already been a few DB changes, but I would like to find some solution to keep this from continuing. Setting up the database seems to be one of the biggest problems for users (besides windows support). I propose that the survey storage model be changed to XML. With XML, future metadata changes can be easily accomplished by replacing the old DTD with a new one, a simple 'cvs up' could do this (rather than fiddling with mysql). My idea for this is to store surveys on the filesystem in XML, and when they are activated (or tested) the XML will be "compiled" (using xsl?) to php. This way the xml doesn't have to be transformed on each hit. Also by using XML internally, import/export of surveys will be trivial. I wrote up a DTD and some sample XML/XSL files a while ago[1]; they aren't complete but might give you an idea of where I was headed. I also would like to pear-ize as much of phpesp as possible. This means modularizing functionality, and switching to OO-style code. However, we can make use of the growing collection of existing Pear modules (like the Auth module, and the XML modules). Even if this change doesn't happen soon, I'd like developers to skim the Pear coding standards[2] and start trying to follow them for all new code. [1] http://phpesp.sf.net/xml/ [2] http://pear.php.net/manual/en/standards.php I'll be around on IRC if anyone would like to chat about this, or post your thoughts on the list. Thanks, -James |