Discussions

News: OPS 3.0 brings Ajax-based XForms to mainstream browsers

  1. Orbeon PresentationServer is an open source development platform for building form-based applications. OPS 3.0 makes it easy to build web forms by bringing standard W3C XForms to mainstream browsers thanks to user-friendly Ajax technology. It deploys to any Servlet container.

    To check out the online examples, visit:

      http://www.orbeon.com/software/get-excited

    More information is available on the Orbeon web site:

      http://www.orbeon.com/

    While a W3C standard for about two years, XForms has so far not managed to become widespread. There are probably several reasons for this, including the lack of native support in web browsers. However, with the XForms efforts in Firefox coming along nicely, and new open source Ajax-based XForms implementations able to provide XForms support to mainstream browsers, we think that the time for XForms has come.

    With its declarative approach and features that cover many of the needs for dynamic user interfaces implemented today with bare-metal Ajax, XForms provides a serious alternative to both traditional heavy-weight development in Java and lightweight scripting alternatives such as PHP, Ruby, and Python.

    Threaded Messages (11)

  2. I like xform[ Go to top ]

    I like xform idea very much.
    The idea of defining the user interface at high level with XML is cool.

    Some questions about your product:
    Is it possible with orbeon to produce different type of UI from the same xform definitions (for example, swing, ajax, plain html, etc)?

    Is it easy integrate your xform implementation in my own application or framework?

    Thanks
  3. I like xform[ Go to top ]

    Javier,

    Currently OPS only generates (X)HTML, but the architecture is in fact quite open, and while we are not thinking about supporting Swing at this point, we are thinking about plain (non-Ajax) HTML support, which of course would mean that the UI would not be as responsive as it is with the current Ajax support. But as a fallback mechanism, it would certainly be good enough.

    OPS deploys as a WAR, and you can integrate with your own app in multiple ways: generating XForms from JSP or Servlet output capture, to a Servlet forwarding a request to the OPS Servlet, etc. We are also thinking about an out-of-the-box proxy mode, but that's for the future.+

    It is of course also possible to use OPS functionalities directly: they make it easy to either serve static XHTML + XForms files, or dynamically generated with XSLT. Note that an XForms page can also integrate with an existing application through the mechanism of XML submission, which just requires that your own app (Java, PHP, anything) be able to serve an XML document which XForms then integrates into its execution model.
  4. I have a set of interlinked XML Schemas defining the set of acceptable XML documents. I can use a standard XML editor (XmlSpy) create edit and validate XML documents from those Schema, including indicating which elements are required/optional at every position in the XML document.

    What is a suitable strategy for using those XML Schema with OPS to create valid documents?

    Thanks
  5. Tom,

    XForms supports validation of XForms instances (i.e. the XML documents that serve as XForms' data model) with XML schema. That's a first step. Now to actually edit the XForms instance with XForms, you need to create XForms controls (input fields, repetitions, etc.). XForms does not have built-in facilities to generate controls dynamically. However, many have been looking at generating them based on a schema definition, and in theory, this is quite possible, although you probalby need annotations to tell how to represent certain types of data.

    So the answer is that if you write your controls manually, certainly. If you write a tool to automate the generation of the controls, certainly as well.

    The bottom line is that in these two cases, XForms can be used as an editor for XML documents.

    XML Schema validation will check in the end that the document is valid before submitting it.
  6. Thanks for an informative reply, which confirmed my ignorant assumptions. Since I'm autogenerating the XML Schema, it would probably be simplest for me to autogenerate the XForm at the same time.
  7. without wanting to contradict what has been said here, i would like to add the one nasty piece of information that made me disregard this very approach when i looked into it:

    if your schema defines an element that can occur multiple times, say

    <complexType name="LuckyNumbers">
      <sequence>
        <element name="number" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
      </sequence>
    </complexType>

    Then you would expect to be able to edit a "LuckyNumbers" XML document via XForms by adding/removing/editing the "number" elements. And in principle XForms allows you to do that, and OPS provides beautiful UI elements to view the table of "number"s and add/remove lines from that table.

    *However*, the nasty detail is that XForms can only add an element to such a collection by *cloning* an existing element (a template). I.e. when the "LuckyNumbers" XML document is loaded into the XForms player it must already contain *at least one* "number" otherwise you won't be able to add any. In addition, when the edited XML document is validated by the XForms player against the XML-schema, the template element is validated as well (after all, it's part of the "number"s collection), and unless it contains a valid number that validation will fail.

    The obvious solution is to create/remove a template element to each and every collection of elements before/as the XML document is loaded into the XForms player, and then somehow remove them again before the XML document is validated by the player. But somehow this spoiled the beauty of the approach for me...

      cheers,
      gerald

    http://www.gerald-loeffler.net
  8. Gerald,

    You will be happy to know that this is the case with XForms 1.0, but in XForms 1.1 (draft) you can copy templates from anywhere. You can therefore have a series of templates (even in other instances) and copy them as you wish, and have much more flexibility with repetitions. We use this extension with the DMV Forms example, and this approach solves not only the question of empty repeats but also that of validation.

    You have to realize that XForms is final in its version 1.0, but that the Working Group is working on the upcoming versions, in particular XForms 1.1 which will address feedback from implementors and users of 1.0.

    -Erik
  9. Schema -> XForm[ Go to top ]

    Just a note here. A similar product is Chiba (http://chiba.sourceforge.net/). To provide what you are asking for it comes with a tool and API for creating XForms from XML Schemas. I'd look at it, if only for ideas.

    Though, I'd go for a XSLT transformation with some annotations as mentioned here :)
  10. OPS 3.0 Performance?[ Go to top ]

    The last time I used it (I think OPS 3.0 beta 2) it was very slow and used very much memory. For every request (to one of their demos, don't know which one) I made the CPU was spinning at 100% for several seconds (for 1 concurrent user). There were plans at that time to rewrite a major portion on code, but that experience made me think that maybe that xml-based approach just is not suitable to applications where you cannot cache the output of some pipelines and might possibly have quite a few concurrent users. I then took a look on apache cocoon, but in the end I ended up using Spring (because the xml based approach was not sellable to my management, but that is another story...)

    How is the OPS 3.0 performance today (Average processing time and memory footprint per concurrent user of one of the more complex demos)?
  11. OPS 3.0 Performance?[ Go to top ]

    Michael,

    We do not have numbers ready for you as we are not sure there is a typical use case which is typical or representative. BTW do other open source platforms provide such numbers? If so I would be interested in hearing about how they go about providing them.

    In our opinion the best thing to do is to download OPS and do your own performance testing based on a prototype you think is representative of your own use cases. Forms can be of various complexity: they can have few controls and very large XML instances; they can have many controls but not that big XML instances. They can do complex validation or not. Etc.

    We did rewrite natively a good portion of the new XForms engine before 3.0, and performance has become much better. Certainly, it doesn't take seconds to produce one page!

    We also provide out of the box two options for state handling: client-side and server-side (session), both helped with a cache. The benefits and drawbacks of these two options are described in the OPS doc:

    http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-state-handling

    Finally, version 3.0 is the first stable version is the new XForms engine, and we anticipate many improvements in the future, features or performance wise.

    And since OPS is open source, we invite anybody interested by the technology to join the community and help us make XForms a reality on the web. Use the source, Luke!
  12. developing tools[ Go to top ]

    we are going to move on to OPS,but we are wondering which eclipse's plugin is better.

    Orbeon Studio
    XML FORM GENERATOR
    ....



    We are lost, and would appreciate you very much if you can tell us some information about developing tools for XFORM-BASED APPLICATIONS

    thanks.

    MARK