Releases: EnoF/EnoFJS
CommonJS compatability is undone
With libaries like Browserify it is unnecessary to wrap enofjs inside of commonjs for node compatability.
EnoFJS is now bound on window.enofjs and all modules will be published on this namespace, i.e. enofjs.clazz
The minified files are now renamed: filename.min.js
RequireJS compatability
Reserved keywords
IE8 has problems with reserved keywords being used as attributes. In specific the super
keyword. This is now reintroduced as sup
.
The keywords private
, protected
and public
will not be replaced by a substitute. When these get introduced, this module will be obsolete.
Patch for Backwards compatability
The modules are back on window rather than name spaced on module.
This is specifically necessary for the modules needed in both browser and nodejs.
Release 2.0.0 Nodify
EnoFJS is now more elegantly integrated with node.js.
This is however a major change. The old version would just append the module to the global window
. Now it is refactored to actually append the module on window.module
.
Also the ClassFactory
got renamed to clazz
to represent the module exposure name. The nodejs version will use the commonjs require
to include modules.
Serialization
When sending information over the line in json
format, the Serializable
clazz can help. This Class will help you
in serializing your classes into a json
format.
The class also helps you deserialize a serialized object in json
format.
var SerializableObject = clazz(function SerializableObject(){
this.extend = 'Serializable';
this.constructor = function constructor(serialized){
this.super(serialized);
};
});
Array conversions
Array conversion
New features:
- Arrays can now be converted to an Uint32Array
- Arrays can now read Uint32Arrays (unofficially it should support any type of Typed arrays)
Scope binding
In this release EnoFJS has improved significantly on performance. This was gained by not modifying the scope for each and every function. That means that functions passed on to a function which will modify the scope, will have no reference to the private
, protected
or public
any more.
bindScope
var array = [];
array.map(this.private.foo.bindScope(this));
Fixed a bug regarding extending and overriding non functional members
Fixed a bug regarding extending and overriding non functional members.
In the previous version, when extending and overriding a non function member, the property would get wrapped in a modify scope. This led to in proper assignations.
auto generated isSet
this.private = {
foo: {
is: false
},
bar: {
isSet: true
}
}
will generate
this.public = {
isFoo: function generatedIs(){
return this.private.foo;
},
isBar: function generatedIs(){
return this.private.bar;
},
setBar: function generatedSet(value){
this.private.bar = value;
}
}