Okay, so you’re on the Web 2.0 bandwagon and learning all you can about unobtrusive JavaScript, AJAX and APIs, but you’ve noticed that the more you use these techniques, the larger the JavaScript file seems to get. Before you know it, that cute-little unobtrusive rollover has turned into a giant non-reusable JavaScript monstrosity.
You, my friend, are ready for objects. Don’t worry, it sounds new, but chances are you’ve already used a few. Window.onload, document.write and a number of other common objects are built right into the language and while these little gems of extensibility, manageability, and reusability are great—most people forget that making your own objects are a great way to reap the same benefits in their own web applications. Here are a few resources to get you started on the right path:
sitepoint’s Intro to Javascript OOP- Read this tutorial to start things off right. The examples are well explained and will ease you into the world of JavaScript objects.
WebReference OOP Tutorial - Filled with step-by-step examples for beginners and a great explanation of what objects are all about.
DevX.com Commonly Used Objects - A list of commonly used javascript objects.
Chunkysoup Intro and Example - An introduction based on a practical application. Provides code for creating your own object oriented photo gallery.