ZNOW

ZNOW

a class-based object oriented framework

Although JavaScript supports object-oriented programming, it is in prototype-based form. ZNOW is a framework allows programmers to write JavaScript in class-based object oriented style. Use prototype or class-based style is the option of the programmer, and not be restricted by the language itself anymore.

Characteristics

Elegant

Elegant is the first priority of ZNOW. ZNOW makes good use of the JavaScript reserved words and tried many different combinations of syntax. Those efforts are to make programmers write codes easier, more convenient and make the codes more readable.

Easy

ZNOW borrows many ideas from Java and the current famous approach which JS-programmers to deal with the encapsulation issues. Programmers should find the syntax of ZNOW familiar and easy to use.

Fast

Though ZNOW provides comprehensive encapsulation, it does not drop the performance a lot. There are some programs with a number of class and they performs very fast. You wont recognise the performance has been affected.

Portable

ZNOW is small and powerful. It is easy to be included in web-apps or installed in nodejs.

Comprehensive

ZNOW supports a comprehensive subset of class-based object oriented programming.

Encapsulation

Different kinds of encapsulation, public, protected and private, are all supported in ZNOW. And they are class-encapsulated which most oo programming languages follow, not object-encapsulated.

Inheritance

One class can extends one class or implements an interface. An interface can extends one or more interfaces.

Others

ZNOW also supports some common and useful oo-related features, such as static, const, super...

Uniqueness

To make coding JavaScript easier and save lines of code, ZNOW adds two excellent features.

Event Listener

JS-programmers should be familiar with this. It is a better implementation of observer pattern. Besides attributes and methods, event is another kind of property in ZNOW classes.

Read-only

There are many cases that an attribute should be readable but not writeable outside. An additional getter function may be added to solve in such cases. And ZNOW requires just a declaration.

Reserved Words

Some words are reserved by ZNOW, which should not be over-written.

Class | Interface | ABSTRACT | CONST | READ | EVENT

Contribution

ZNOW needs you sponsor and contribution to buy a server, improve the framework and solve bugs. ZNOW is published under the MIT licence. You are very welcomed to improve it and share with us.