JavaScript Objects

Parent Previous Next

JavaScript Objects

There are many useful features in JavaScript (QtScript) which are worth scratching just below the surface to find.

This first link is to a good summary of many aspects. It is a framework build up, step by step, for browser bound JavaScript, but it is done in a very useful introductory fashion showing concepts universal to JavaScript implementation any where.

Let's Make a Framework: Free eBook

By Alex Young | 02 Dec 2010

"I’ve collected and edited the Let’s Make a Framework articles into a book that suitable for e-readers.

Consider this a Christmas present!"

The other following links are very good explanations of the features they focus on.

Learning Javascript with Object Graphs

By Tim Caswell

One of the secrets to being a super effective JavaScript developer is to truly understand the semantics of the language. This article will explain the basic elemental parts of JavaScript using easy to follow diagrams.

Learning Javascript with Object Graphs (Part II)

By Tim Caswell

The first article using graphs to describe JavaScript semantics was so popular that I've decided to try the technique with some more advanced ideas. In this article I'll explain three common techniques for creating objects. They are constructor with prototype, pure prototypal, and object factory.

My goal is that this will help people understand the strengths and weaknesses of each technique and understand what's really going on.

Learning Javascript with Object Graphs (Part III)

By Tim Caswell

Part I of this series explained basic object graphs and visually described references, closures, and basic inheritance in JavaScript. Part II compared different styles for doing object-oriented programming in JavaScript. Now in Part III we'll get creative and look as Ruby's object model and compare it to how JavaScript works. Also I'll show how to implement some Ruby style classes. JavaScript is a very flexible language and can support about any object model you want with enough understanding and creativity.

Creating Objects

By Mark "Tarquin" Wilton-Jones

Any function in JavaScript can be used to create custom object classes, simply by calling it using the keyword new. When called in this way, the special variable this inside the function references the new object that is being constructed (it normally refers to the 'current' object, which is usually window, except inside methods). The function should not return a value.

My Favorite JavaScript Design Pattern

James Edwards

"I thought it might be interesting to look at a JavaScript design pattern that I use a great deal. I settled on it gradually, over a period of time, absorbing and adapting influences from various sources, until reaching a pattern that offers the flexibility I need.

Let me show you an overview, and then look at how it comes together ..."

JavaScript Module Pattern: In-Depth

Ben Cherry

"The module pattern is a common JavaScript coding pattern. It's generally well understood, but there are a number of advanced uses that have not gotten a lot of attention. In this article, I'll review the basics and cover some truly remarkable advanced topics, including one which I think is original.

We'll start out with a simple overview of the module pattern, which has been well-known since Eric Miraglia (of YUI) firstblogged about it three years ago. If you're already familiar with the module pattern, feel free to skip ahead to 'Advanced Patterns' ..."

Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents