XML-based data processing is getting more and more popular in the modern SOA (buzz) based IT world. So the question arises, how XML based data can be written from 'simple' internet-users, who don't like to write XML syntax by hand. If they could use standalone application, they would choose from XMLSpy, Oxygen, Eclipse XML-Editor (Design-Tab) etc., but even then the interface is to complicated. But what alternatives can we provide them for the web? I see the following options:
- Generate domain models out of the XSD and use domain-driven application development frameworks and their automatic generated customizable Web-Interface: Grails (free), hybris (commercial), ...
- PRO: you can add logical attributes to the domain-modells using customized java methods
- CON: if the XSD changes, you have to recreate your domain-modell, which might not match with the old java-classes and instances, which are useally saved in a relational DB using Hibernate or EJB.
- Use JCR (Jackrabbit) and generate NodeTypes out of the XSD, which hopefully delivers you a rich UI
- PRO: JCR has nice features like versioning of nodes etc, and is hierarchical and path-based, so even better than a XML-DB
- CON: There is not XSD2NodeType-Generator, and even there is one, why using another declarative layer than XSD? And: There is no JCR-Browser which is easy to integrate in own webapps.
- Use OpenCMS which has something like a XSD2Form-Generator
- PRO: they already have a kind of XSD2Form-Generator, so they inventend it already
- CON: the XSD has to be customized in a proprietary way, a standard XSD cannnot be used
- XSL-Transformation of a XSD into a HTML-Form
- PRO: seems like a good option, 'just' write a XSL-stylsheet
- CON: a stylesheet can generate a document, but not a dynamic (ajax-based) form based application.
- Generate XForms out of XSD and use server side XForm-Processing (Chiba)
- PRO: XSD -> XForm -> HtmlForm sounds great
- CON: XForm does not have AJAX-Intelligence, which is needed for big XML-Forms. Update: It seems that http://www.chibaxforms.org has build in ajax-features, but I havent tested it.
- A commercial solution which focus on generating User-Interfaces out of a XSD, like http://www.jaxforms.com/
- PRO: Supported Solution
- CON: Cost
- A simple webapp or even a single JSP, that gets the path to the XSD, displays an intelligent XSDbased HTML-Form with fancy Java-Script (handle all AJAX-Events), and post the resulting XML to some other URL.
- PRO: a JSP (with some libs) is so easy to integrate in an existing java web app. Something like: xsd2form.jsp?xsd=myxsd.xsd&action=postxmlresult.jsp would do
- CON: I have to do that work, or is it done somewhere?
Starting with the last option, I think about the best way of starting:
- transfering the eclipse mechanism in the design-tab to the web. Looking for the right class to start with ...
Refs:
Kommentare (3)
25. Apr 2008
Anonym sagt:
Tom, Nice summary. I have one remark though regarding the following state...Tom,
Nice summary. I have one remark though regarding the following statement:
Chiba, from http://www.chibaxforms.org/ uses ajax intelligence, and is certainly nod dead, nor is xforms itself. Large parts of the recent 1.1 spec are implemented in chiba which take a way some of the earlier limitations of xforms. If I were you, I'd certainly give it a try at http://www.chibaxforms.org/demo.html
Regards,
Ronald
07. May 2008
Anonym sagt:
Hi, Did you manage to create your JSP transformation page ? I currently face th...Hi, Did you manage to create your JSP transformation page ? I currently face the same problem
08. May 2008
Tom sagt:
I started to operate on the schema, but then I gave up, and generated the form o...I started to operate on the schema, but then I gave up, and generated the form out of predefined XPath-Expression which directly operates on the XML-Document.
So I can read and write the XML-Nodes using XPath and the JSP just generate simple HTML-inputfields with the XPath-Expression as value, something like:
and at the beginning of the JSP I get all parameter-names whith a beginning "/" and set the value on the corresponding XML-Node.
For me that works at the moment, but as the former comment is reporting, I should give probably chibaxforms another try.
Kommentar hinzufügen