2015-12-19 01:12:20 -05:00
|
|
|
# GNU ease.js
|
2014-01-16 23:48:41 -05:00
|
|
|
<!--
|
2017-07-25 23:37:59 -04:00
|
|
|
Copyright (C) 2010, 2011, 2013, 2014, 2015, 2017
|
|
|
|
Free Software Foundation, Inc.
|
2014-01-16 23:48:41 -05:00
|
|
|
|
|
|
|
This file is part of GNU ease.js.
|
|
|
|
|
|
|
|
Copying and distribution of this file, with or without modification, are
|
|
|
|
permitted in any medium without royalty provided the copyright notice and
|
|
|
|
this notice are preserved. This file is offered as-is, without warranty
|
|
|
|
of any kind.
|
|
|
|
-->
|
|
|
|
|
2014-01-20 22:53:01 -05:00
|
|
|
GNU ease.js is a classical object-oriented framework for Javascript,
|
|
|
|
intended to eliminate boilerplate code and "ease" the transition into
|
|
|
|
JavaScript from other object-oriented languages.
|
2010-11-15 12:11:11 -05:00
|
|
|
|
|
|
|
Current support includes:
|
|
|
|
|
2011-03-09 13:02:59 -05:00
|
|
|
* Simple and intuitive class definitions
|
2010-11-15 12:11:11 -05:00
|
|
|
* Classical inheritance
|
2016-07-16 00:01:09 -04:00
|
|
|
* Traits as mixins
|
|
|
|
* Access modifiers (public, protected, and private)
|
2010-11-15 12:11:11 -05:00
|
|
|
* Abstract classes and methods
|
2011-01-11 18:30:32 -05:00
|
|
|
* Interfaces
|
2011-09-21 18:24:15 -04:00
|
|
|
* Static and constant members
|
2016-07-16 00:01:09 -04:00
|
|
|
* Transparent error subtyping
|
2011-03-09 13:02:59 -05:00
|
|
|
|
2010-11-11 00:12:59 -05:00
|
|
|
|
2014-01-20 22:53:01 -05:00
|
|
|
## Documentation
|
|
|
|
Comprehensive documentation and examples are available on the [GNU
|
|
|
|
ease.js](https://www.gnu.org/software/easejs) website and in its
|
|
|
|
[manual](https://www.gnu.org/software/easejs/manual).
|
2010-11-11 00:12:59 -05:00
|
|
|
|
2011-06-07 19:55:45 -04:00
|
|
|
|
2014-01-20 22:53:01 -05:00
|
|
|
## Bug Reports / Feature Requests
|
|
|
|
Please direct bug reports and feature requests to bug-easejs@gnu.org or the
|
|
|
|
[project page on Savannah](https://savannah.gnu.org/projects/easejs).
|
2011-06-07 19:55:45 -04:00
|
|
|
|
|
|
|
|
2014-01-20 22:53:01 -05:00
|
|
|
## Why Classical OOP in JavaScript?
|
|
|
|
GNU ease.js was created (historically) for a number of reasons:
|
|
|
|
|
|
|
|
* To "ease" object-oriented developers into JavaScript by providing a
|
|
|
|
familiar environment.
|
2011-09-21 12:01:00 -04:00
|
|
|
* To provide the maintenance and development benefits of classical OOP.
|
2014-01-20 22:53:01 -05:00
|
|
|
* To provide features not included in the language, such as proper
|
|
|
|
encapsulation through private/protected members, interfaces, traits,
|
|
|
|
intuitive inheritance, and other conveniences.
|
2011-09-21 12:01:00 -04:00
|
|
|
* To encapsulate the hacks commonly used to perform the above tasks.
|
|
|
|
|
2013-12-22 09:37:21 -05:00
|
|
|
Many JS purists believe that classical object-oriented programming should be
|
2014-01-20 22:53:01 -05:00
|
|
|
left out of JavaScript and that one should stick strictly to prototypal
|
|
|
|
development. While the two are related (they are both object-oriented), they
|
|
|
|
can be applied to different problem domains in order to achieve results that
|
|
|
|
are more natural or intuitive to developers; GNU ease.js works seamlessly
|
|
|
|
with existing prototypes, allowing the developer to choose whether or not
|
|
|
|
they want to use "classes".
|
|
|
|
|
2013-12-23 00:58:00 -05:00
|
|
|
|
2015-08-23 00:15:48 -04:00
|
|
|
## Building and Installation
|
2017-07-25 23:37:59 -04:00
|
|
|
For information on installing ease.js on your system, see
|
|
|
|
[`INSTALL`](./INSTALL). Alternatively, you may install the software using
|
|
|
|
npm by issuing the following command:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ npm install easejs
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuring
|
|
|
|
If your distribution contains a `configure` file in the project root, you
|
|
|
|
may jump immediately to [`INSTALL`](./INSTALL).
|
|
|
|
|
|
|
|
Otherwise, you likely have the sources as they exist in the project
|
|
|
|
repository, which does not contain the generated `configure' script; you
|
|
|
|
may generate it by issuing the following command:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ autoreconf -fvi
|
|
|
|
```
|
|
|
|
|
|
|
|
Please note that certain files (such as AUTHORS, NEWS, and ChangeLog) are
|
|
|
|
generated as part of the `dist` target and do not exist as part of the
|
|
|
|
repository.
|
|
|
|
|
|
|
|
|
|
|
|
## Hacking
|
|
|
|
For information on hacking and contributing to GNU ease.js, please see
|
|
|
|
[`README.hacking`](./README.hacking).
|
2015-08-23 00:15:48 -04:00
|
|
|
|
|
|
|
|
2013-12-23 00:58:00 -05:00
|
|
|
## License
|
2014-04-09 19:10:20 -04:00
|
|
|
GNU ease.js is free software: you can redistribute it and/or modify it under the
|
2013-12-23 00:58:00 -05:00
|
|
|
terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation, either version 3 of the License, or (at your option) any later
|
|
|
|
version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
**N.B.:** Versions prior to 0.2.0 were released under the LGPLv3+. Upon becoming
|
|
|
|
a GNU project, it was relicensed under the GPLv3+ to help the FSF stand strong
|
|
|
|
in its fight against proprietary JavaScript. For more information, please see
|
2015-12-28 00:06:04 -05:00
|
|
|
the NEWS file (which can be built with `make NEWS`) and
|
|
|
|
https://gnu.org/software/easejs/whyfreejs.html.
|