JavaScript Saga Part 1 :The jQuery Divide


I use to wonder initially why a wise man like Douglas Crockford took so much pain to develop something like YUI while something as elegant as jQuery was around.

JQuery was so simple to learn, to use and looked just so beautiful. While YUI seemed extremely difficult. Even the experienced developers would agree that the learning curve of YUI is very steep.

I learned my lesson the hard way. I started developing a fairly complex web application for a startup of which I am a part. After the first milestone our features had grown exponentially. So with that I had several jQuery plugins added to the each page. Besides the framework I had tipsy, jQuery UI, ScrollTo and 8 other plugins. The code was 77KB.

More that the footprint of the code what worried me was the sheer unorganized nature of the code. I tried hard to get it in the best shape but it never really happened. It was difficult for me to understand just exactly what was wrong.

When the milestone 2 of the application was on anvil I decided that I should call goodbye to jQuery.  I put up more efforts in learning JavaScript as a language. JavaScript is a very curious language. The kind of features this language has are not present in any other programming languages that the web developers might be familiar with.

JavaScript is a functional programming language but never really used like one.

JavaScript is object oriented but does not have Classes, it is a prototypal OO and not Classical OO but everyone seems to be using it like a Classical OO.

JavaScript supports a property called ‘Closure’. Which means the variables of a parent method are available to child method even after the parent method has returned. This property is like double edged sword.

After watching Crockford’s sagacious talks on JavaScript and going through his tiny books called “JavaScript: The Good parts” I started appreciating JavaScript as a language and realized the kind of damage jQuery has done to my learning of JavaScript.

I started learning YUI3 I and suddenly found it as the natural way of JavaScript programming. It was scalable and the milestone 2 of my application had a negligible 30k footprint despite adding a large number of feature.

If we look at the trends in various programming languages JavaScript seems to be one of the fastest growing programming language. It is the only language browser understands and will continue to do so for many years. As more and more applications move on the web as a platform JavaScript’s importance is only going to grow.

Rebbecca Murphey’s “jQuery Divide” is making rounds of the internet and indeed it is very informative.

Investing time in JavaScript will be life saver for web developers in coming years IMO.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s