Nick Mudge Ignition Software Consulting & Development

When I first started building websites I learned Javascript and the DOM and that's what I programmed with for client-side browser functionality.

When AJAX began to be more broadly known I wrapped my own functions around the XMLHttpRequest object and programmed AJAX functionality. When I began reading more in depth about Javascript, such as reading Douglas Crockford's articles and watching his videos, I became more interested in Javascript and wanted to programming in it more.

This is about the time that various Javascript libraries began to become popular and I began to feel some pressure about using them. These new libraries conflicted with my interest in Javascript because I wanted to write in pure Javascript because I liked it. Javascript is so powerful and flexible that it seemed that these libraries could mutate the DOM and Javascript into something different. They became their own distinct things made up from the DOM and Javascript. To illustrate this, the MooTutorial (tutorial for the MooTools library) says this: "With MooTools in your environment, you still write Javascript when it comes to basic syntax, but to a great extent you are NOT writing Javascript anymore; you're writing MooTools."

But overall I think the Javascript libraries are a good thing and make sense. There are troubling DOM browser incompatibilities, and the DOM doesn't make it easy to do many things. The libraries bring Javascript and the DOM together into higher cross-browser abstractions to make things easier to do, less verbose and more elegant. These days if I'm going to be doing much Javascript programming I'm going to use a Javascript library.

Aren't these libraries in a way acting like a higher-level language based on a lower-level platform specific assembly? So I guess that's why to use a Javascript library these days. Who would write a full blown user app in assembly?

Edit: Of course the difference between real assembly and Javascript is that Javascript is interpreted up into abstractions which are then used and interpreted. A high-level language is often compiled down into an assembly (or intermediate) language which is then assembled into machine code.

Comments

Shantanu Kumar
1 June 2009

We sure need something for JavaScript like Apache Commons for Java. Almost every JavaScript framework reinvents the cross-browser DOM manipulation wheel, which can be avoided if we have low-granularity frameworks to be leveraged. This will help the existing frameworks to split into smaller ones that fit together, which is good for web page loading performance.
Name: (required)
Email: (required)
Website:
What has four legs, rhymes with bat and says, "Meow?" (One word answer.)
Spam Filter: