Introduction

Why Object Oriented Programming ?

Extensions and Design Patterns

abstract Create abstract classes that cannot be instantiated without extending.

Create abstract classes that cannot be instantiated without extending. extend Use inheritance, make child classes extend base classes.

Use inheritance, make child classes extend base classes. getset Generate getters and setters for private members of your class.

Generate getters and setters for private members of your class. implement Create Interfaces that define methods that need to be defined, in order to implement them.

Create Interfaces that define methods that need to be defined, in order to implement them. members Add members to the instances of your class. It's a shortcut for SomeClass.members(...).

Add members to the instances of your class. It's a shortcut for SomeClass.members(...). module Save your class into a Module. If required, all the namespace is created before saving the class.

Save your class into a Module. If required, all the namespace is created before saving the class. properties Generate properties to control the access to private members of your class.

Generate properties to control the access to private members of your class. singleton Create Singleton classes that can only be instantiated once.

Create Singleton classes that can only be instantiated once. statics Add static methods or data to your class. It's a shortcut for SomeClass.statics(...).

How to use ?

Links

jsClass is an extensible Javascript Base Class that enables you to do clean Object Oriented Programming (OOP) with Javascript.OOP is one of the multiple approaches you can take to structure your code.It doesn't fit any situation, it's proven to be an outstanding approach to handle large/complex applications.It will help you keep your code clear, extensible, decoupled and maintainable.For further information on OOP, just check some of the links on this article.jsClass accepts extensions, that is, custom modifications that you can attach to classes.Some are tightly related to Design Patterns These are general reusable solutions to commonly occurring problems.Each extension is very well documented on the code, specifying the different ways yo use them. Also, check the demo to see each in action.This is the list of built-in extensions:The best way is to see it in action. Check the demo (link below) to see different uses of jsClass and its extensions.