- Make
jasmine-sinon
a dev dependency in Bower config - Add comments about Bower and exports to AMD and CommonJS
- Added to Bower. Install with
bower install --save simple.js
- Switched tests from Buster.js to Karma and Jasmine
- Added support for CommonJS and AMD
- Deprecated
view.DOM
, useview.$
instead. Think of it as a scoped jQuery selector.
-
Return the jQuery XMLHttpRequest (
jqXHR
) object frommodel.save
andmodel.fetch
. ThejqXHR
implements the Promise interface, so you can write the following instead of relying on events or callbacks:this.model.save().then(function(data, textStatus, jqXHR) { console.log('success!'); });
-
Enable models to have default values specified in a
defaults
hash, e.g.:var Model = Simple.Model.extend({ defaults: { name: "Kim Joar" } });
-
Removed global variable
-
Get rid of
Object.create
dependency. -
Removed dependency to EventEmitter. There are no breaking changes to the event API.
-
Expose
Simple.Events
to make it easier to use the event library outside of Simple.js itself, e.g. for global event handling. Now events can be added to any object:var obj = {}; $.extend(obj, Simple.Events)
-
URLs can now be defined using a function, not only as a variable, e.g.
var MyModel = Simple.Model.extend({ url: function() { return "/url"; } });
-
Add local events to
Simple.View
, which means that you can now bind, unbind and trigger events on a view instance:var view = new Simple.View(); view.on("test", function() { console.log("triggered!") }); view.trigger("test"); // triggered! view.off("test");
- Initial release