Article

XForms meets Ajax: Can they get along?

Rich Seeley, News Writer

When the W3C released a second edition of XForms this month as a recommendation for "new generation of Web forms," the question that begged to be asked was where does this fit into the Web development world where Ajax is the hot technology?

The W3C touts the benefits of XForms as minimizing back-and-forth with the server and reducing the need for scripting. That might sound like a challenge to Ajax.

    Requires Free Membership to View

I see a better world where Ajax is XForms-enabled.
Ron Schmelzer
Senior AnalystZapThink LLC

But is XForms still relevant in view of the rapid adoption of Ajax? Are they competing technologies?

The answers from experts in the field came back mostly positive. XForms is still relevant in a world gone mad for Ajax and they are more complementary than competing technologies.

"These two are very different technologies," explains Ron Schmelzer, senior analyst with ZapThink LLC. "Ajax is focused on the presentation and interaction with users across an asychronous set of interactions. XForms is focused solely on the issue of representing data collection and exchange between clients and servers."

And according to the analyst they can and hopefully will work together.

"For sure, people are leveraging Ajax to do XForms-like things," he said, "but I see a better world where Ajax is XForms-enabled. Since, Ajax is not a standard, but rather a collection of different UI operations. XForms, on the other hand, is a standard. It represents how form-based information is represented, collected and exchanged. For developers to use XForms as the standard and Ajax as the implementation / representation makes a lot more sense than either one replacing the other."

XForms fits "nicely" into Web developers toolkits, agrees Allan Beaufour, a member of the W3C XForms working group and XForms consultant to FundaciÓn CTIC, a Spanish organization promoting technology. He said the second edition of XForms improves on the previous one. When the first edition was released there were not many implementations, but there are now and as developers began to work with it there was the inevitable need for fixes and those fixes have been made, he said.

For more information

Check out our Ajax Learning Guide

Learn more about XPath

"So for developers working or starting to work with XForms, the world is now a nicer place," he said. To see how it works, he points to sample applications of it from the Mozilla XForms Project.

While maintaining that XForms "can solve the same things as Ajax can without the need for scripting," the one question Beaufour says is hard to answer is which one is easier for developers to learn and implement. He jokingly asks: "Is C# easier than Java?"

Then he offers his assessment of the relative technical difficulties: "It depends on the world you are coming from. If you are a 'standard Web developer' you already know HTML and JS, so Ajax is not a big step. For XForms you need to learn some other W3C standards like XPath and a bit of schema. But coming from the outside I actually think that XForms should be easier. You do not need to be a programmer. Everything is declarative."


Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.