A good developer has no problem to switch from one programming language to another. The choice to focus on a particular language, framework or development environment, is dictated more by the availability of time and the type of work that takes place. However, an important factor that may influence the choice of "frameworks" such is the sympathy and affection that can mature over time.
Specifically, I wanted to analyze some - certainly not all - JavaScript frameworks available today, because even "advised" to take a look especially at jQuery .
The creators of mootools (one of the most popular JavaScript frameworks) have made available a tool to run a speed test and validity of five well-known JavaScript frameworks: Slickspeed . This test, the outcome is not discounted at all, it is important to operate as client-side Javascript frameworks, that are executed by your browser. It is precisely for this reason that some find Safari faster than Internet Explorer or Google Chrome faster than Firefox . However, this often depends on the type of page you are viewing. Indeed, it may well happen that a particular site is really more "fast" when viewed in Safari, but this does not mean that "all sites" will be faster with Safari! Obviously this is true for any other browser.
The benchmark
In the test I made with Slickspeed I compared the browsers available on my machine (Windows Vista 64bit Utilmate - Intel Core 2 Quad 2.4GHz with 8Gb RAM).
Unfortunately, the tests are not able to run with Internet Explorer 7, as the car crashed, even going out of scale with the results! Once again, congratulations Microsoft.
I crercato to maintain the same status of the PC during the test run, opening the browser and not individually by sending no other processes running.
Note: If you feel like you also run one or more of these tests, you can comment this post in case of "curious" and several results.

Google Chrome is really fast results, with a value of 68 (average) in the test with jQuery . The slower, however, was Flock , despite coming from the same "mother" Mozilla. This poor performance of Flock is really curious as its cutting social networks, because it is precisely the Social Network Web 2.0 to take advantage of many JavaScript frameworks available, so as to provide an experience of truly innovative navigation and interaction.
Surprisingly beats FireFox and Opera also has a nice little ', achieving even a 74 in the performance of Dojo ! FireFox and Safari, on balance, are similar, with Safari faster in tests with Mootools and jQuery.
Which framework to choose?
If you do not mind you testing the speed of execution and do not worry about the normal size in Kbytes of the same framework, the answer might be "what you like" or, if you like, "what you know better or is more harmonious with your style of programming. "
Ultimately, these frameworks will look a bit 'all (see for example the use of $), despite some important and substantial differences that can jump in the eyes of an expert or really pushed the use of a particular library. In principle, in fact, everything that can be done with jQuery, for example, you can do very well with mootools or prototype! If jQuery has a very compact syntax, as all methods always return the jQuery object basis, thus creating endless rows of oggetto.metodo().metodo().metodo()... is said that this is all costs a strength, especially for those who will have to debug!
Libraries like prototype.js sin, perhaps in the absence of effects, even simple, forcing the developer to implement as a spinoff scriptaculous.js , heavy and far from the library first choice.
An example
This last reason, for example, led me to replace the coupled prototype / scriptaculous with jQuery to create interactive panels / Animated undolog.com here in the sidebar. In fact, even using Google API to import libraries, it is wasteful to load all the library and scriptaculous for a slideDown slideUp. For information and an example, here is the Javascript code as it was coupled with the prototype / scriptaculous:
1 2 3 4 5 6 7 8 9 10 11 12 13 | / / Prototype / scriptaculous ) . each ( $ $ ('H2.dropdown'). Each ( element ) { function (element) { = "pointer" ; element. style. cursor = "pointer"; 'click' , element. observe ('click', event ) { function (event) { this . next ( ) . style . display == "" ) new Effect. BlindUp ( this . next ( ) , { duration : .5 } ) ; if (this. next (). style. display == "") new Effect. BlindUp (this. next (), {duration: .5}); Effect. BlindDown ( this . next ( ) , { duration : .3 } ) ; Effect else new. BlindDown (this. next (), {duration: .3}); event ) ; Event. Stop (event); } ) } ); |
and it is now with jQuery:
1 2 3 4 5 6 7 8 9 10 | / / JQuery ) . each ( $ ('H2.dropdown'). Each ( i ) { function (s) { ) . css ( 'cursor' , 'pointer' ) . click ( $ (This). Css ('cursor', 'pointer'). Click ( function () { $ ( this ) . next ( ) . is ( ':hidden' ) ) $ ( this ) . next ( ) . slideDown ( ) ; else $ ( this ) . next ( ) . slideUp ( ) ; if ($ (this). next (). is (': hidden')) $ (this). next (). slideDown (); else $ (this). next (). slideUp (); } ); } ); |
All in all, a closer look, I do not think there is a lot of difference! But as I said before ... the question is "also" of personal taste.










Hello,
the last example with jQuery do not understand why you had to do each. At the end of the var i do not use it either.
You could simply do:
@ Luke: you are absolutely right! My mistake copy and paste! Undo ...
The correct code is:
2
3
4
5
function () {
$ ( this ) . next ( ) . is ( ':hidden' ) ) $ ( this ) . next ( ) . slideDown ( ) ; else $ ( this ) . next ( ) . slideUp ( ) ; if ($ (this). next (). is (': hidden')) $ (this). next (). slideDown (); else $ (this). next (). slideUp ();
}
);
[...] Writing a plugin with a few lines of code. Take for example the proposed code in jQuery against everyone: a benchmark with 5 browser was (after the correction reported by Luca): PLAIN TEXT [...]
Missing, however, the comparison with pure JavaScript!
Cm ². "A good developer" does not need jquery or similar!
Greetings
@ Computer: The tool presented comapara not "pure JavaScript" libraries written in Javascript, but "pure." Then a "good developer" can not be measured by its ability to ignore the good that has already been written, but the ability to leverage the tools already available each time choosing the best it can to solve a specific problem to solve in the shortest possible time and with the best possible solution. For some projects may not be necessary to use external libraries. In others it is preferable to use jQuery instead of Prototype, and so on ...
Do not use libraries, frameworks or code written by others is a choice that, in my opinion, has more flaws than advantages. However it remains a personal choice.
Finally, in view of consistency, everything is already written. Then I rewrite JavaScript and then the operating system ... etc ... etc ...