Mar 6, 2009 at 12:28 PM
Isn't xforms supposed to be interpreted by the browser? I gave a quick look at the code, and I noticed that what is rendered is simple HTML. Am I missing something?
Mar 6, 2009 at 11:07 PM

MVC XForms doesn't output XForms; it is based on the XForms spec and renders semantic HTML and jQuery (by default) that provides XForm-like functionality. You wouldn't need a framework to output pure XForms with MVC. Think of it as XForms with XML replaced by CLR objects and a UI designed to be lightweight, standards compliant, extensible and built to work with current browser constraints (it is unfortunate that browser support for XForms is limited to plugins).

The project came about specifically to fit a need of simplifying complex form development within the new Microsoft MVC framework. It is based on XForms because it really hits the nail on the head in terms of defining, in the most technology and platform agnostic way, the semantics of data entry (forms). The problem with a most UI frameworks (including the built in MVC helpers) is that they mix the semantics of the form (ie business rules and logic) with the presentation (ie html and script). XForms inherently avoids this by being technology and platform agnostic. The benefits of using MVC XForms are

  • More maintainable view code
  • Automatic deserialization of complex nested object graphs
  • Separation of UI semantics with implementation - possible to override default HTML rendering (theoretically with any technology, eg silverlight)
  • Consistent UI framework
  • Semantic, standards compliant code

The project is still in its early stages. Most of what has been implemented is to do with the UI controls aspect of XForms. There is a lot of work to do on the model side of things. XForms really comes into its own with its schema validation, event model, bindings and constraints and at the moment MVC XForms only scratches the surface of these things. I've been meaning to expand the implementation in these areas but have been held back by my current workload, waiting for MVC RC and being lazy (mostly being lazy). If anyone has any ideas about how these other aspects of the XForms spec might be implemented, give me a shout.