Offline
Online
Viewers
I'm Live!
Watch Now

Month: May 2007

JavaScript Singleton Pattern

Singletons are quite effective when it comes to needing only a single instance of a class or object instanciated, regardless of when or who creates it. Let’s start by creating a basic class that we will later turn into a singleton: [codesyntax lang=”javascript”] function ValueObject(){ var value = 100; this.getValue = function(){ return value; } […]

Read More
Understanding JavaScript Execution Scope

By utilizing the var keyword as a literal, pseudo structures or pseudo namespaces can be created. Pseudo Structures: All members and methods within a pseudo structure are public. The psuedo structures are non-instantiable. To access a member of a pseudo structure, use the structureName.member or structureName.functionName() syntax. [codesyntax lang=”javascript”] var structureName = { member1: “value”, […]

Read More

Affiliates