Johnny's Software Saloon

Weblog where I discuss things that really interest me. Things like Java software development, Ruby, Ruby on Rails, Macintosh software, Cocoa, Eclipse IDE, OOP, content management, XML technologies, CSS and XSLT document styling, artificial intelligence, standard document formats, and cool non-computing technologies.

My Photo
Name:
Location: Germantown, Maryland, United States

I like writing software, listening to music (mostly country and rock but a little of everything), walking around outside, reading (when I have the time), relaxing in front of my TV watching my TiVo, playing with my cat, and riding around in my hybrid gas/electric car.

Friday, April 28, 2006

XForms - Oliver Brown

Oliver Brown wrote a wonderful description of what XForms is - and what it allows us to get rid of - like Javascript, custom AJAX code embedded in the application.

It is definitely away to leapfrog some of the more problematic technologies of today, in order to jump right on the back of some of the most desired features today - and ride off into the same sunset of success that they are pointing to. Without all the hassles!

What is the problem with embedding AJAX libraries in web applications? Initially, not much. If you can stomach having Javscript in your application, initially it is fine.

However, if the browser vendor makes a slight change in the way his DOM, Javascript, renderer, or any one of a number of other things - then you might need to update to a new version of the AJAX libraries you used. Well, what if you are no longer maintaining the application and it is one you sold to a customer 3 years ago?

Who should have to pay for the software maintenance then? You? The customer? The user? The vendor who makes the web browser?

Chances are, there is no clear answer.

With XForms, the XForms interpreter is buillt-into the browser. Period. You don't have DOMs, or for that matter - any code - running in the browser. No applications code, no 3rd party libraries code.

XForms does that by truly separating the information from the presentation. Other technologies give lip service to this lofty goal. XForms actually does it.

In an XForms document, the model - in the forms of data values and constraints - is in a separate section from the presentation part which holds a declarative description of the data-entry fields.


XForms - Oliver Brown:
HTML forms don%u2019t really send information, they send data. There is no real structure to what is sent - all you have is name/value pairs (although depending on the capabilities of the server you can at least send variable length arrays with the foo[] naming convention).
XForms improves on this by separating forms into different parts, primarily models and user interface (well technically what I%u2019m referring to as models is split into abstract models and instances but that%u2019s like talking about classes and objects). The models are just chunks of XML that are sent to the page. The user interface (essentially just input tags like the HTML equivalents) modifies this XML and then sends it back.
The structuring of the data may well be enough to warrant the adoption of XForms, but it%u2019s a little better than that. When I say the XML (or more correctly the model) is modified by the user interface, the modifications are held in memory by the client (probably a browser) and any references to the model should change accordingly. This allows some stuff that would usually require clever AJAX, complete calls to the server or at least just plain JavaScript can be done fairly trivially.


This is a really great description of what XForms is all about.

Technorati tags:

0 Comments:

Post a Comment

<< Home

Related pages & news