Last weeks I have been working on a pilot project that involves a Web2.0-ish e-commerce site that offers insurances. It offers an (Ajax) cost calculation module that allows a user to fine-tune the insurance and subsequently purchase it online. First release was launched last week and works reasonably well.
I used two brand new libraries/solutions based on Prototype. First one was Fabtabulous, a single class solution for managing several tabs using hidden and visible DIV’s and a menu, or in my case, progress bar. The solution is entirely unobtrusive, so no ‘onclicks’ in your HTML. It also is an instructive showcase of Prototype programming. I am still waiting for a version that will make it back-button enabled, or should I try to create this myself ? Here is a start.
This framework, again, is a showcase of Prototype’s power, and follows the ‘convention over configuration’ principle underlying Rails. Downside of it’s genericity is the performance: it only validates the visible fields in your form, which is great for me since I use it in combination with Fabtabulous. For this it does an upward treewalk on every form-field to determine visibility, which considerably slowed things down. Here I made a hack, broke the genericity, and injected some a-priori knowledge of the form it was going to work on to speed things up.
Writing this post I found out that all above mentioned libraries have been updated since my last check and that a compressed version of Prototype has become available, so back to work ! Check out the numerous Prototype posts on Ajaxian.