The debate rages on between those who prefer the simplicity of HTML forms combined with scripting and those who dream of a day when everything in a web application can be written with tags. I’m talking of course about the WHATWG‘s Web Forms 2.0 and W3C‘s XForms standards. A great example of this debate can be found in posts about Ruby on Rails versus XForms by Adriaan de Jonge and Kurt Cagle. But is this debate really necessary?
I thought both Adriaan’s and Kurt’s posts were very well thought out, but I side more with Mr. Cagle. However, it surprised me that while he indicated a combination of Rails and XForms would be nice, he didn’t really say why. To me, putting XForms on Rails makes perfect sense and should be something that the Rails team focus on in future versions of Rails. Why? Both use an MVC architecture. This means that a Rails programmer is already building everything that is needed for XForms to work, like it or not.
Instead of relying on javascript frameworks and AJAX to perform the validations, calculations, and some other, common tasks, we could let Rails build the XForms-based forms for us and use AJAX to add some of the more uncommon elements like drag-n-drop, highlighting, etc. Again, all the pieces are already being built in the models and controllers, simply wrapping this up and creating the XForms form should be a rather simple task, and it has great potential to reduce the amount of coding and testing time.
At any rate, I’m quite interested in seeing this come about, and I plan on starting to work on just such an implementation over the next year or so. We’ll see how that works out.
2 Comments
I couldn’t understand some parts of this article on Rails | Panes of Glass, but I guess I just need to check some more resources regarding this, because it sounds interesting.
I recently came across several good articles covering the topic:
However, I’ve lately been having a change of heart about XForms. I’ll be blogging on that this week once I get back to my journal with all my notes. I’ll be interested to know your thoughts.