case
6Sep/100

JavaScript Object-Oriented Programming (OOP) – jClass

I just finished working on a JavaScript 'framework' that will allow you to write highly object-oriented code in your browser.
Using jClass you can easily define namespaces, create and extend class, define and implement interfaces, define public/private/static methods, override and overload them, have getters and setters, and so on.

The syntax for writing code using jClass looks something like this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include("some.other.files");
 
namespace("my.namespace")
({
    MyClass : jClass.extends(BaseClass).implements(SomeInterf, SomeOtherInterf)
    ({
        constructor : function(){
         ....
        },
        private : {
          ....
        },
        public : {
          ....
        },
        static : {
          ....
        }
    }),
    OtherClass : jClass({
       ......
    })
})

I'm also working on some useful libraries that you can use with jClass.
Usage examples, documentation and downloads are all available on Google Code right HERE