Re: [Fwd: Re: [lepido-dev] Auto Generating forms from XSD] |
Max, I forwarded your message to lepido-dev, where the discussion happens.
So, to the core... We have a thing which transforms XSD plus some extra information (everything you can't express in a schema without using xs:annotation, we call it "business logic") to a full form definition/binding. A template is written seperately with a few extra helpers (i.e. you don't have to write down repeaters and such, only layouts per element). Since we wanted a XML-centric xml editor in cforms, we reference the widgets with xpaths. I also wrote a flowscript
function to navigate the widget tree in an xpath-like fashion (a bit hard since widget id's are autogenerated from xpaths), so event handlers are also within the xml context.
However, there are many things which can be improved (as always). Right now, its a bunch of big monster XSLs, but I would like it to become another way to define cforms, i.e. implement it in java as another builder heirarchy, or at least a proper transformer/generator to output cforms xml, which would make things much easier.
And it doesn't cater at all to CRUD. CRUD is storage dependent, though... so it's not really in the scope of cforms.
It would be cool though to dynamically generate flowscript(crud) and forms from mysql tables, possibly even beans? (for JDO), and get a bit of the edge back from ruby on rails ;) should be rather easy with a custom "scaffold" generator, to put it into RoR terms.
Would be nice to make it "right" though... I'm such a perfectionist... ;)
Ross