Thursday, March 8th, 2007

Future Proofing JavaScript Libraries

Category: Browsers, JavaScript

John Resig has been talking about future proofing JavaScript libraries.

He discusses the issue of each browser introducing more bugs (a fix to some is a bug to others!) and shows how Mozilla is trying to help out:

At Mozilla, we’ve looked at this issue and Mike Shaver came up with an excellent solution: Simply include the test suites of popular JavaScript libraries inside the Mozilla code base.

Doing this will provide, at least two, huge benefits:

  1. Library developers will be able to know about unavoidable regressions and adjust their code before the release even occurs.
  2. Mozilla developers will be able to have a massively-expanded test suite that will help to catch any unintended bugs. In addition to making sure that less, general, bugs will be introduced into the system, library authors and users will be content knowing that their code is already working in the next version of Firefox, without having to do any extra work.

What progress has already been made? Mochikit‘s test suite (Mochitest) is already a part of Mozilla’s official test suite (it’s used to test UI-specific features). I’ve already touched base with Alex Russell, of Dojo, and I’ll be working to integrate their test suite once Dojo 0.9 hits. Perhaps unsurprisingly, I’ll be working to integrate jQuery’s test suite into the core, too. Additionally, I’m also starting to contact other popular library developers attempting to get, at least, a static copy of their test suite in place.

Note: This initiative isn’t limited to straight JavaScript libraries. If you have a large, testable, JavaScript-heavy, Open Source project let me know and I’ll be sure to start moving things forward. For example, some form of testing for Zimbra will probably come into play.

What would you like too see? Shame we didn’t future proof $ and friends a long time ago.

Posted by Dion Almaer at 6:02 am

4 rating from 42 votes


Comments feed TrackBack URI

Things are starting to get moving!
How about updating with new version of the library? Have to wait for new version of FF?
Generally speaking thumbs up for such ideas!

Comment by ajaxus — March 8, 2007

I agree! This sounds moer tinker-open than openajax-open

Comment by Peter Svensson — March 8, 2007

John Resig and the mozilla folks are a blessing to the dev community, and such a committed, positive and helpful attitude is rare enough to be highlighted.

Comment by Alexandre Plennevaux — March 8, 2007

Please don’t forget to consider Mootools as well!

Comment by Cassio — March 9, 2007

Leave a comment

You must be logged in to post a comment.