Hi everyone,
It's been a while, but I've finally been able to push out a new release. I still consider this release to be alpha level, but nevertheless, it should be a lot more stable than the 0.1.x series. Please let me know if there are any issues. We'll try to move to a faster release cycle with more iterative releases in the future.
Please note that this release breaks the public API in a number of significant ways, hopefully for the better. Read on to find out more:
[Changed] Controller actions now receive different arguments, it used to be just the event object, now it's `model, target, event`, instead.
[Changed] View and model are no longer automatically assigned to the controller.
[Changed] Collection.prototype.select has been renamed to Collection.prototype.filter in accordance with the ECMAScript standard
[Changed] Collection methods now return Collections where appropriate, instead of returning Arrays (e.g. map)
[Changed] When reaching into collection to specify nested dependencies, use a colon `:` as the separator. E.g. `dependsOn: "todos:done"`.
[Changed] Changed some of the arguments to various events fired to be more consistent.
[Changed] Properties.format has been removed, instead Properties.get takes an additional parameter, which when `true` uses the given formatter.
[Removed] Global formatters. Use globally defined functions instead.
[Added] The special method `loaded` is called on the controller after the view has been rendered.
[Added] Controllers can be functions, in which case they are treated as constructors and initialized with the model (and possibly parent controller)
[Added] Two way bindings via the new `binding:change=something` syntax in the view. See the README for more details.
[Added] `unless` instruction as an inverse of `if` (and a crutch to work around the absence of `else`)
[Added] Collections are now compatible with CoffeeScript array comprehensions and iterations (`for foo in bar`)
[Added] Pretty much all array methods from the ECMAScript spec have been added to Collection, with polyfills for IE where appropriate (except for the second parameter to indexOf, cause it's stupid)
[Added] Other methods on Collection.prototype: toArray, first, last, includes, clone, toJSON
[Added] `Serenade` is now a decorator which can be used to create dynamic models.
[Added] Properties can have defaults
[Added] Properties can be redefined
[Added] Properties are automatically added when an unknown property is set
[Added] Build on Travis CI
[Fixed] Identity map now works as expected, thanks to the release of a new CoffeeScript version.
[Fixed] Collections no longer need to track their members, which prevents memory leaks
[Fixed] Collection length is zero when empty
[Fixed] Helper nodes no longer cause errors when part of collections
[Fixed] sortBy now works with serenade models in IE
[Fixed] Raise an error when there is more than one root node in a view
[Fixed] No longer necessary to depend on both collections and reaching into it
[Fixed] If statements can be immediate children of collections
[Fixed] Completely rewrote dependency system, should fix infinite loop edge cases and other weirdness
[Fixed] Collection.prototype.delete works as expected when the item to be deleted is not in the collection
[Fixed] When `save` is called on a document with localStorage, it is always persisted.
---
Many thanks to all contributors who made this release possible!
/Jonas