
JS.Class is a library designed to facilitate object-oriented development in JavaScript. It implements Ruby’s core object, module and class system and some of its metaprogramming facilities, giving you a powerful base to build well-structured OO programs.
var Event = new JS.Class({
include: JS.Observable,
fire: function(data) {
this.notifyObservers('fire', data);
}
});
JS.Class is designed to make JavaScript behave like Ruby in terms of its OOP structures. It provides Classes and modules with Ruby-compatible inheritance, Subclassing and mixins, Singleton methods and eigenclasses, Method binding, Ports of various standard Ruby modules, including Enumerable, Hash, Set, Observable, Comparable, Forwardable.
The library looks pretty interesting, the documentation is good and there are a lot of cool modules. I have to try it.
What do you think about it? Write down your thoughts and experience with it.
Read more