Archive for February, 2010

Implementing Interfaces in JavaScript

Sunday, February 14th, 2010

In Object-Oriented languages an interface defines a set of methods which a Class must include in order to implement the interface (otherwise, if the Class is missing the required methods, the code will fail and the interface will throw an error).

Interfaces are useful for making sure developers use the correct implementation of an API.

In JavaScript there are no true ‘classic’ Object-Oriented features, but through clever usage of the language you can emulate an Interface for use with a JavaScript API.

(more…)

Regular Expression Basics

Sunday, February 7th, 2010

Regular Expressions are a powerful utility within the JavaScript language. Essentially it allows you to search and manipulate strings of text with both simple and complex patterns.

(more…)