Back to Top

Monday, January 15, 2007

On javascript libraries

I did a little project for school which included the dojo.gfx library. Here are share some of the conclusions I arrived at. But first a disclaimer: INAJD (I'm Not A Javascript Developer). I dabble with it but I'm not a professional. Now back to our topic:

Javascript libraries are huge. After including the dojo toolkit, the page took more than twice as long to load locally. Now I'm not saying that they are worthless, because there is some very, very good code in them (like dojo.gfx, which is incredible), but with todays browser performance they are not the way to go. Again: the main problem is todays browser perform very poorly when importing javascript files and while the library management part of dojo for example is very nice, it also results in the page loading slower (some times much slower). The dojo guys are of course aware of this and from what I understand they included the most common packages in the main dojo file to eliminate some of this burden, but that is still a workaround. What I would like to see is a package system which would resolve dependencies offline and would generate a (compressed) javascript file which includes all the needed functions in one place.

As I found out the javascript libraries debate has been going on for some time on the blogs, so here are the links to some articles (most of them don't discuss the issue from the point of performance, but from the point of view of the (beginner) developers and if it benefits them):

The New Amateurs - by ppk at quirksmode. BTW, this guy really knows what he's talking about when it comes to javascript! If you are looking for methods of doing something in Javascript, you should definitely first check out his site.

The New Amateurs - part 2 - the sequel.

Again JavaScript libraries

fog of libraries

Too many libraries, not enough librarians

Your own personal library

Reducing the pain of adopting a JavaScript library

Dear JavaScript Library Developers... - a post I very much agree with. I didn't have any previous experience with Dojokit and when I went to the documentation site I was greeted by the following choices: Dojo Book, API Reference (not completed yet), Dojo Manual (obsolete) and Old Documentation Site. That's three out of four documentation sources were marked explicitly or implicitly as not really usable. Fortunately the warnings turned be untrue (at least until now) and everything described there worked just fine, but it was a little frightening. And by the way: the API documentation doesn't work with Opera 9, which is a shame since it has the best support for SVG and because of this it was the browser of my choice for this project.

The dark side of JavaScript libraries and Why good JavaScript libraries fail


Post a Comment

You can use some HTML tags, such as <b>, <i>, <a>. Comments are moderated, so there will be a delay until the comment appears. However if you comment, I follow.