Sunday, October 26, 2008

Extending Object's prototype or making Joose more robust

While working on Joose's unit testing system we created a new test mode that disturbes the environment by doing evil and not so evil things that Joose might encounter in real world situations and then run the test suite.
We discovered that we get some failing tests when Object.prototype gets extended. This is a known bad practice but you'll still find it in the wild. This is now fixed in the latest SVN version of Joose.
We currently test the following scenarios:
  • extending Object.prototype
  • extending Array.prototype
  • extending Function.prototype
  • running with jQuery loaded
  • running with Prototype.js loaded
  • running with Mootools loaded
  • running with Dojo loaded
  • running with YUI loaded
If you have ideas for more things that might be a problem for Joose, please speak up! (Doing thinks like Function.prototype.apply = function () {} is not a valid entry :)

Currently Joose is not compatible with Prototype.js and Mootools. This could be fixed. If anybody really cares about these JS libraries, please scream and we'll fix it. (Of course, patches very welcome. Fix strategy described here)

Update: Joose now runs with Prototype and Mootools. Get the latest SVN if you want to play with it.
Post a Comment