HTML_QuickForm_Controller_Page_Generator - sketch

From: Date: Mon, 24 Nov 2003 23:29:46 +0000
Subject: HTML_QuickForm_Controller_Page_Generator - sketch
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9118@lists.php.net to get a copy of this message
hi i wrote some script which does the following: 1) parse xml file/stream 2) (optional) validates xml against dtd (or later schema - when PEAR::XML_Schema available some day) 3) create a quickform object based upon xml definition 4) plugs valid QuickForm_Controlle_Page object into QuickForm_Controller object. and of course it gets renderer and displayed back to the client, but thats beyond the scope of this and already done. the approach works fine with me and my coworkers are happy to be able to define there own forms in an xml-editor or another more comfortable and productive environment than an ide or notepad. furthermore they can define there forms in 4000*10^20 languages, because the xml of course can contain up to an unlimited amount of <label lang="EN_us">-tags for localization. does anyone think it would make sense to set up a pear class which produces qf-objects when being fed with a standartized (dtd or schema defined) xml-file/stream? you could e.g. have any xml-file, transform it to the given format via any language your like (xmltransformer,xslt,..) generate a valid QuickForm_Controller_Page via (let's cal it) "HTML_QuickForm_Controller_Page_Generator" and plug it into your QuickForm_Controller object. i wonder if this makes sense for a general approach to build QuickForm_Controller_Page objects from external sources? of course caching and stuff could be done later for those who worry about the speed of xml parsers. some might argue that you tranfer the complexity of phpcode to a complex xml file, but i am more than sure that its easier for non-technican to edit xml than phpcode and beside that there are a uncountable amount of funky xml-editors/tools around. somehow these thoughts remind me a bit of apache's vast cocoon server, but any thoughts on this subject are very welcome. bye matthias ps: b nice, alexey ;)

« previous php.pear.general (#9118) next »