XForms/Benefits
From Wikibooks, the open-content textbooks collection
< XForms
[edit] Why XForms?
There are many benefits to using XForms over traditional HTML forms. Some of the most frequently mentioned benefits are:
- Movement from procedural to advanced declarative styles
- Consistency with other W3C standards such as CSS, XML Schema and XPath
- Movement away from hard to maintain, difficult to debug and potentially insecure JavaScript
- Fewer "round trips" of pages being transferred from web server to web browser. This means that fewer web servers are needed in your DMZ and smaller bandwidth is needed between the client and the servers
- Clean and consistent use of MVC architectures
- Forms are easier to create, debug and maintain
- Forms can accommodate multiple languages and multiple currencies
- Forms have clear Separation of Concerns, meaning all your forms can share a common style sheet, model, bindings and presentation.
- Advanced user interface controls such as the XForms/Range control
- Extensibility of XForms (see XForms/Custom Controls)
[edit] Disadvantages of XForms
Just to be fair, we should also mention the disadvantages. Most of these problems are related to the newness of XForms and will be mitigated over time:
- Early versions of some extensions (such as the FireFox 0.7 extension) do not have a full implementation of all the XForms tags (notably repeat-nodeset)
- Lack of built-in support by Microsoft's IE required the addition of a plug-in or a JavaScript library such as FormFaces
- Using a JavaScript system such as FormFaces requires an initial 85K download that can be slow, especially over slower dial-up lines
- Many traditional HTML/JavaScript forms developers are not familiar with XML standards
- CSS is required for forms to look presentable
- Advanced CSS-3 features are lacking in Microsoft IE
- Few complete working examples exist (a problem which we are trying to correct with this book)
- Few GUI forms builder tools exist (with the exception of IBM's and few other tools)
You will note that most of the disadvantages of XForms are short-term or involve getting people familiar with specific technologies. There are few fundamental architectural disadvantages with XForms.