Objectifying JavaScript

Javascript is just like any other language - well, sorta. It has the power to make your web applications really earn their keep and perform for the user. It also can be confusing if things start getting pretty complex. Thankfully, there’s something that can help you compartmentalize your code and make it simpler to use more modularly - the object oriented functionality Javascript offers. Don’t know how to get started with it? Well, check out this new article over on Digital Web Magazine for a few tips.
As scripts get larger, functions become more interrelated. Suddenly, you’ve got ten functions on a page, six of them calling each other to accomplish one task, and another four working towards something else entirely. For someone taking a first look at this code, it certainly wouldn’t be immediately clear which were meant to work together and which weren’t. This is where objects come in.
The author, Jonathan Snook, gets down to the basics of objects in Javascript - what they are, how to create them, how to access them, and much more. If you’ve ever done any work with the popular libraries like Prototype or Script.aculo.us, some of this will look familiar. He even gets into design patterns in OOP for Javascript with setting up Singletons and Factory patterns.

Objectifying JavaScript

Javascript is just like any other language - well, sorta. It has the power to make your web applications really earn their keep and perform for the user. It also can be confusing if things start getting pretty complex. Thankfully, there’s something that can help you compartmentalize your code and make it simpler to use more modularly - the object oriented functionality Javascript offers. Don’t know how to get started with it? Well, check out this new article over on Digital Web Magazine for a few tips.

As scripts get larger, functions become more interrelated. Suddenly, you’ve got ten functions on a page, six of them calling each other to accomplish one task, and another four working towards something else entirely. For someone taking a first look at this code, it certainly wouldn’t be immediately clear which were meant to work together and which weren’t. This is where objects come in.

The author, Jonathan Snook, gets down to the basics of objects in Javascript - what they are, how to create them, how to access them, and much more. If you’ve ever done any work with the popular libraries like Prototype or Script.aculo.us, some of this will look familiar. He even gets into design patterns in OOP for Javascript with setting up Singletons and Factory patterns.


September 19th, 2006

Tagged View

Tags Similar

Posts Fresh +

Categories View

Archives View