advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
It seems as if XML-based languages for descibing forms and UI elements are proliferating. XUL, XAML, and XForms are three of these. What do you think of the future of these technologies? Wave of the future, or temporary sideline? Given that so much ink has been written advocating the separation of form and function (model/view/controller), does moving the UI description to XML constitute a better and cleaner separation than past attempts at addressing the problem? Do you think XForms will become the standard, or are XUL and XAML too far ahead in implementation? Let us know in the xml.general or design.ui discussion groups.
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3.8/5 | Rate this item | 8 users have rated this item.
The Secret Life of XForms (cont'd)
The State of the Art
XForms can seem inordinately large and complicated at first blush, but much of the complexity can be attributed to integrating the model into the equation. Unlike scripted XHTML forms, once you've done the initial work to build an XForms document, adding new controls is surprisingly easy. Therefore, most working XForms (with many controls and components) will be easier to maintain than the equivalent scripted code applications.
advertisement


What's more, because XForms is 100% XML based, you can use XSLT to generate an XForms document from one or more source XML files, perhaps with some schema filtering thrown in to determine which components best match the elements described by the schema.

The XForms specification itself is in Candidate Recommendation status. It may hold there until the XPath 2.0 specification is completed, because there are some compelling reasons to bind these two standards together, including external function definitions and inline regular expression support in XPath.

Implementation-wise, XForms support is perhaps not yet where it needs to be, though that's changing. IBM has begun work on the specification with its XForms Processing Center. In addition to supporting the XForms 1.0 standard, IBM's XPC also incorporates a ListView type control extension and a way to invoke Web services to send and retrieve content. This latter point is especially important because it makes it possible to build very robust client/server applications solely through an XForms interface.

The Novell XForms Technology Preview provides a stand-alone XForms viewer, designed to work with "pure" XForms (i.e., those that aren't embedded within HTML) though support for the latter is coming. The Novell implementation does include extensive CSS support, however, so the lack of an HTML substrate is not necessarily a major limitation.

Perhaps the most full-featured XForms viewer to date is the x-port XForms viewer. It provides both pure XML and embedded HTML support (with associated CSS in both cases), and runs as a plug-in within IE6. One drawback is that you must include both the <object> reference for the player and a processing instruction in the body of the XForm to use X-Port, though that may change after the specification becomes more mature.

As XForms evolves, it will likely move into two different realms. The Scalable Vector Graphics working group of the W3C is exploring ways to incorporate XForms into SVG 1.2, providing at least basic support for several critical components, which you can then override with custom graphics.

The next likely venue for XForms is in the wireless/mobile phone market. It's much easier to build XForms interpreters than to support a full-bore scripting language. XForms could quickly replace the cumbersome and awkward WAP/WML standard. Given the obvious synergy between XForms and VoiceXML, it is also likely that the next version of VoiceXML will be rebuilt along XForms lines, though maintaining a modicum of backwards compatibility.

XCiting XForms
XForms represents both a very old and very new way of programming, a model that can be crafted by hand or generated through transformations with equal ease. As computer architectures tend to move toward dynamic user interfaces, XForms provides a powerful vehicle to create increasingly robust "applications" without huge amounts of fragile scripted code. As a W3C standard, such applications have the implicit advantage of being platform and software language independent.

If your company deals with complex form information, wants to keep costs down, and needs a solution that can be easily maintained and updated, you could do a lot worse than explore XForms.

Previous Page: Binding it Together  


Kurt Cagle is a software developer and author specializing in XML technologies. He is the editor of the Metaphorical Web newsletter, an e-zine focusing on XML, Web technologies, and the state of the industry. You can reach him .
Page 1: IntroductionPage 4: Binding it Together
Page 2: XForms Is About Applications, Not Just FormsPage 5: The State of the Art
Page 3: Building a Model 
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About