Sunday, June 8, 2008

JavaScript: Who knew?

It's been around for a long time, and it's had its fair share of abuse. If you're like me, perhaps you can recall when one of the most popular uses of JavaScript was for dynamic looking buttons. Do a little mouse over on the button and the button glows, or changes shape, or some other little effect which really amounted to swapping out an image. It was often being used more obnoxiously than elegantly.

Then came Flash. Everyone loved it. And again, everyone over-abused it. Finally, it became obvious (at least to me...) that people tend to prefer simpler design with occasional purposeful animation. In walks JavaScript (again).

Developers began using JavaScript in much more powerful, interesting, and ultimately elegant ways. One of the biggest ways being accessing and modifying the DOM. By listening to user initiated events (mouse clicks, keyboard entries), a developer can dynamically alter, rearrange, delete or create new document objects, all on the client side. A user can even initiate a server request (via the XMLHttpRequest object) and receive its reply without reloading the entire page.

The power, flexibility and standard implementation of JavaScript make it a powerful tool in building web-based applications. It would be a mistake to ignore it. I'm certainly getting my hands dirty with it (honestly, more by chance than anything else) and I've been loving the experience. A book that I've really found a great tool in helping me get the most out of the experience is called The Art & Science of JavaScript. I'd recommend it to anyone in the business or habit of building web-based applications.

No comments: