Tagged with javascriptobjects
Javascript method context
In languages like C# and Java you never really need to give a thought to the this operator. In javascript things are a little more complicated due to functions being first class objects.Published in Javascript, Web development on Sunday, November 29th, 2009
Javascript object prototype
The javascript object prototype is javascript’s way of sharing implementation across similar objects, much like the way classes are used to do this in many other languages. Although constructor functions look a lot like classes, javascript does not have a class based object system like C# or Java. Instead it has a prototype based object [...]Published in Javascript on Sunday, January 18th, 2009
VBUG London javascript objects presentation
Slides and samples for a talk I did for VBUG in London in 2008 about how objects works in javascript.Published in My presentations on Wednesday, November 12th, 2008
Constructor functions
The object literal syntax is great for setting up one off objects but sometimes you’ll want to mass produce objects that all have the same properties and methods. It would be a pain to have to set up each object individually so instead you can use a constructor function to do it for you. There’s [...]Published in Javascript, Web development on Sunday, September 14th, 2008
Object oriented javascript slides and samples
In 2008 I did a talk at a .NET user group in Oxford about the nuts and bolts of how objects actually work in javascript. Here are the presentation slides and code samples.Published in Javascript, My presentations, Web development on Sunday, August 31st, 2008
Javascript anonymous functions
Anonymous functions are functions that are dynamically declared at runtime. They’re called anonymous functions because they aren’t given a name in the same way as normal functions. Anonymous functions are declared using the function operator. You can use the function operator to create a new function wherever it’s valid to put an expression. For example [...]Published in Javascript on Saturday, August 23rd, 2008
Functions are first class objects in javascript
Functions in javascript are first class objects. This means that javascript functions are just a special type of object that can do all the things that regular objects can do. Really, just like any other variable Here are a few of the important objects things that you can do with a function in javascript. A [...]Published in Javascript on Tuesday, August 19th, 2008
Building simple objects
Javascript objects are basically just hash tables, a group of related properties and functions that can be accessed by a key. Properties are dynamically added at runtime. Methods are just properties that happen to be functions. Building a simple object The simplest way to build objects in Javascript is by declaring a new variable of [...]Published in Javascript on Sunday, August 17th, 2008
How javascript objects work
This is a series of articles about how to use the javascript language features to write object oriented type code. It's designed for people who are already sold on the idea of bundling functionality up into objects and want to know the javascript way of doing things.Published in Javascript on Sunday, August 17th, 2008






