[extremely edited - I originally had a very detailed post here about a javascript library I just released. I realized that that amount of detail deserves a more static page than a blog entry, so I moved the details out of this post (to a page created through the blog software because I’m lazy
)]
Javascript is a very loosely-typed and dynamic language. Variables can be of any type, function parameters can be of any type, and properties of objects can be added and removed at runtime. This can be very useful in many situations, but it can also create some pretty nasty messes that are a nightmare to maintain. Sometimes more rigid structuring is needed.
There are several techniques and libraries available for creating object-oriented Javascript that support inheritance, but they usually involve some difficult-to-read syntax and fail to provide other object-oriented features like abstract methods and interfaces. My goal is to create a Javascript library that provides many of these features and eases the pain of developing complex javascript solutions. My first step towards that goal is the initial release of The $class Library (as of this posting, I’ve actually made one change since the initial version in response to the first comment).
The $class Library will be improving as I receive feedback. Check it out and tell me how it could be better (I already know the file could be smaller; I’ll work on that soon).