By bloid
via studio-cdd.com:8080
Published: Sep 10 2007 / 07:52
Recently I started the quest for a new JavaScript framework. I've been using Prototype along with Scriptaculous and many other libraries I coded for myself for a while, but I'm getting tired of the lack of more advanced plugins like sortable table, data grids or just a calendar.
Comments
jeresig replied ago:
There's a weird mistake in the tests - he uses .hide(0) (which starts an animation) instead of doing .hide() (which just, simply, hides an element). Fixing this would dramatically decrease the amount of time that particular test takes.
kangax replied ago:
Besides what John mentioned, prototype has a convenient, specifically optimized (!!!) invoke method, so instead of:
$$('td').each(function(el){
Event.observe(el, 'click', function(){
alert('Hello world!');
})
});
one could simply do:
$$('td').invoke('observe', 'click', function(){ alert('Hello world!') });
As far as insertion, instead of:
$$('li').each(function(el){
new Insertion.After(el, 'yay') ;
});
one could do:
$$('li').invoke('insert', {after: 'yay'}); // btw, do we still use "b" tag?
I thought my prototype-checklist got enough exposure not to make such mistakes...
I admire author's time and effort but these tests are hardly relevant.
Voted down
Voters For This Link (11)
Voters Against This Link (1)