Joose (framework)

Source: Wikipedia, the free encyclopedia.
Joose
Developer(s)Malte Ubl
Stable release
2.1 / August 2, 2009 (2009-08-02)
Written in
New BSD License
Websitehttps://code.google.com/p/joose-js/

Joose is an

.

The Joose meta-object system is multi-paradigm. It supports

Mootools
and PureMVC.

Joose was heavily inspired by Moose, the object system for Perl 5 which was itself inspired by the Perl 6 object system, but unlike Perl and Moose, Joose doesn't support multiple inheritance.

Example

Two classes written in Joose:

Class("Point", {
    has: {
        x: {is: "rw"},
        y: {is: "rw"}
    },
    methods: {
        clear: function () {
            this.setX(0);
            this.setY(0);
        }
    }
});

Class("Point3D", {
    isa: Point,
    has: {
        z: {is: "rw"}
    },
    after: {
        clear: function () {
            this.setZ(0);
        }
    }
});

Point3D is a subclass of Point. It has another attribute defined and additional code to run after running the superclass clear() method. The "rw" means the attribute is readable and writable with a pair of get/set accessors generated automatically.

References

External links