An AJAX Iteration
I'm currently unwinding after only just managing to see all the cards1 move from the "this iteration" column2 to the "done" column3 on our XP storyboard. While the estimates had us coming in at the same spot as earlier iterations, it ended up being quite a bit tighter than the earlier ones had been.
There are a few reasons why, but the biggest cause would be the fact that we were moving from the comfortable world of Java actions into world of some heavy ajax ui. I spent some time working with libraries and researching how to do things like JSON in Java, and AJAX popups. It was a fun and stretching iteration, with plenty of prettiness to show for the work.
I learnt a lot including:
AJAX with Prototype is great. Prototype provides all the methods you want in the library. I would consistently find the methods I would want in the library such as $('id') (to find an element with an id), and the serialize methods for forms are really nice. Kudos to the prototype team for a great library.
Scriptaculous provides nice effects that build on prototype. The Autocompleter is worth the price of admission.
The popup library by Stuart Rackham works really nicely. He doesn't have access to Safari so hasn't tested it there, but now I have, and while not all the features work, it is possible to produce nice popups that work in Safari with this library. He has built this on top of Scriptaculous and prototype and he has done a great job.
JSON for passing around data is cool. The whole eval on the client thing is a bit scary, but (almost as I expect now) at least prototype provides a nice evalJSON method to help alleviate a little my security paranoia. Of the millions of JSON libraries available, the standard java one works ok. (what's not to like about a library with a license that includes the text "The Software shall be used for Good, not Evil." Mightier JSON libraries exist that do all kinds of magic, but the simple approach is working to start us off.
The biggest missing piece in my JavaScript Development is the fact that it isn't TDD. There seem to be bits and pieces out there, but nothing that is jumping out and saying "use me I just work.". The main reasons I am wanting to do Test Driven Javascript are for quality and pleasure. Doug spent some time researching options for acceptance testing of E2 front to back (including the javascript), which will definately help out the quality, but it still would be great to have a viable TDD option.
I never would have expected to say this, but it has been fun doing the JavaScript and AJAX in the past iteration. It really is much better than in the past, and I can see it only getting better.
1 - The card contains a unit of work↩
2 - The list of cards we are planning on getting done in the iteration, but haven't started working on yet↩
September 22nd, 2007 at 12:55 am
For testing, have you tried unittest.js from Scriptaculous?
September 23rd, 2007 at 8:55 am
Thanks for the pointer Ed. I saw it but haven’t yet had a poke around. I’ll take a good look shortly.