Entries Tagged ‘Series: Creating JavaScript Classes’:

Creating JavaScript Classes, Part 5: The Class Function (with screencast)

View Screencast | Download code
In the previous posts of this series, I looked at using JavaScript to create class hierarchies that would include property and method inheritance, and method overrides. Today, I’ve created a single JavaScript function that will automate this process for me. This is very similar in functionality to the YUI, [...]

Tags:

Comments (7)

Creating JavaScript Classes, Part 4: Method Overrides (with screencast)

View Screencast | Download code
This post is basically a summary of the screencast, which contains more details and explanations.
I’ve shown how to create inheritance in JavaScript, both for properties and methods. Now, I’m going to talk about method overrides. That is, I want to be able to replace a method of an ancestor [...]

Tags:

Comments (2)

Creating JavaScript Classes, Part 3: Method Inheritance (with screencast)

View Screencast | Download code
For a complete explanation of the following code, watch the screencast. In the previous post, I looked at how JavaScript can access properties of ancestor classes in descendant classes. In this post, I am going to look at how to do the same with JavaScript functions. To keep things [...]

Tags:

Comments (2)

Creating JavaScript Classes, Part 2: Property Inheritance (with screencast)

View Screencast | Download code
The JavaScript programming language does support extending classes through the use of constructors and prototypes. As you’ll see in the next series of posts, it is more complicated to implement than using a simple “extends” keyword or similar construct like other programming languages. This is especially true if we [...]

Tags:

Comments (2)

Creating JavaScript Classes, Part 1: Constructors (with screencast)

View Screencast | Download code
JavaScript does not support classes. At least, not in the traditional sense. It does support basic class features, such as inheritance and method overrides. However, it does all of this though functions and function prototypes, making the implementation of class features is a bit more complicated.
JavaScript works well [...]

Tags:

Comments (4)