Activate your free membership today | Log-in

Thursday, March 8th, 2007

Future Proofing JavaScript Libraries

Category: Browsers, JavaScript

<p>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.

Related Content:

Posted by Dion Almaer at 6:02 am
6 Comments

++++-
4.1 rating from 37 votes

6 Comments »

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

I have to agree with Alexandre’s comment: Mozilla has done so much to help out developers over the years. They are truly one of the only companies that seems to see the world from a developer’s point-of-view. This obviously doesn’t mean that their browsers aren’t user friendly – in fact, one could make the argument that the developer-based approach actually creates a better experience for users in the end. I’ve come across this a bit late, but I’m curious: is there any news on the addition of other javascript libraries? In particular, I’d like to see Dean Edwards’s Base2.DOM library added, since it’s explicitly focused on standards (not to mention extremely well designed). It seems to me that if Mozilla really wants to promote standards-based design they would want to make sure to include it.

Comment by buy mp3 player — July 19, 2007

JavaScript libraries, in general, attempt to pave over browser bugs and interfaces. This is indeed a great idea because although there are lots of ways how to deal with bugs, JavaScript development object detection will get you so far. Browsers will always introduce bugs and it’s really great that developers have already prepared for this.

Comment by Portrait painting — August 6, 2007

Leave a comment

You must be logged in to post a comment.