Can’t wait for my inheritance!

09 Sep

I am busy trying to figure out the best way to do reliable class inheritance in JavaScript without importing a third party library OR extending the prototype of a core JavaScript class (e.g. function).  Amongst a great variety of blog posts, forum answers, and random articles, I am finding Douglas Crockford’s Prototypal Inheritance in JavaScript and Classical Inheritance in JavaScript the most useful in terms of edification thus far.

Other interesting resources

Quick practical examples:

Overriding instanceOf to make it work for derived types:

Poor man’s “reflection” on “classes”:

Microsoft’s take on the subject (related to their ASP.NET AJAX libraries):

Continuing the hunt….

Comments Off on Can’t wait for my inheritance!

Posted by on 2009-09-09 in Inheritance, JavaScript


Comments are closed.

%d bloggers like this: