Home | Technology

JavaScript Libraries

Alex Christie

1 April 2008

JavaScript has recently become the
world’s most popular
programming language
. And so, with more and more people using it, the
question of which is the best JavaScript Library is now more important than
ever. So here, without further ado, are some of my (almost certainly biased) opinions.

JavaScript

JavaScript is
most commonly
used as a client-side scripting language for browsers – bringing web pages to life
with online delights such as animated menus and sliding text – and it can certainly be a frustrating
beast to use.

This is because each different browser
(e.g.: FireFox, Opera and of course the infamous Internet Explorer),
and in some cases even different versions of the same browser, parses the language
differently, so code that works in one browser will not necessarily work in another.
Which in turn means that without outside help you end up having
to pretty much write your code several times over – once for each browser.

Enter JavaScript libraries!

JavaScript libraries

JavaScript libraries
cater for this by providing a new set of functions and controls which take care
of the different implementations for you, providing a useful abstraction layer
and meaning you only have to write your code once.

There are many different libraries
out there and each works in a different way and provides a different set of
functions. Very few of the libraries extend or collaborate with any of the
others, so as a JavaScript developer you have to choose which one you like
best, which can be a daunting prospect considering the number of different options.

Recommendations

I am now going to give my opinions on which are the best.
These will not be entirely fair. I haven’t looked into each library in depth,
and a lot of my opinions will be based on something I heard once somewhere, so
they shouldn’t be taken as gospel. That said I have been fiddling around with
different JavaScript libraries for a while now and JavaScript for a lot longer
so my opinion may still be worth something.

Libraries that didn’t quite make the grade

Yahoo Interface
Library’s
is well written but the namespacing and separate files are cumbersome,
and in any case it’s been superseded by Ext 2.0. Ext 2.0 is extensive
and fast but huge to download and not so good for facilitating development, and
so only really suitable for intranets or people with very fast internet
connections. Dojo is quite well spoken of, but once again it seems quite
cumbersome to implement its many different packages.

Prototype is very popular, but
I read somewhere (although haven’t checked myself yet) that it doesn’t follow
good DOM principles
and I really am one for principles, so that was out the window.

Rico seems outdated by many accounts,
and MochiKit seems fine but not quite as good as my
favourites. The other libraries just haven’t been mentioned enough to really
catch my attention.

So, on to my favourites.

My favourite libraries

jQuery
is the library I recommend for the casual JavaScript user or any JavaScript
beginners:

It seems to be very quickly gathering momentum. There are
now a huge amount of sites using
it, most notably Google
Code
. It has a huge development community
and many contributed modules and it is well
documented and easy to use. It also tries its best to be usable with other
libraries
.

MooTools is my recommendation for the more advanced JavaScripter (I would say if you are at the point of actually creating objects in JavaScript
you fall into this category).
It’s very small and light but covers all the bases to build applications from
that I can think if. And does that pretty solidly. Its Class class is extremely useful, and I have found everything it does to be impressively robust
and well thought out. It has very strong programming principles, which are clear in the way the library is designed to encourage good programming practice.

Despite singling out these two libraries as the best I do
have suggestions and criticisms of both, which I will cover in my next article
(coming soon): Criticisms of jQuery and MooTools.

LEAVE A COMMENT

HOME | WHAT WE DO | CULTURE | THINKING | BLOG | REQUEST A CASEBOOK

IGNITING DIGITAL BRANDS | SEO | SOCIAL | MOBILE | JOBS | TALK TO US

CELEBRATING 19 YEARS IN DIGTAL
© TAMAR 2014