noBackend/noBackend-app-invoice — pull request #8 by gr2m (2013-05-30 18:09:47+00:00)
Title: replace event based implementation of backends with Dreamcode

In the spirit of noBackend, where we suggest that frontend developers use Dreamcode for functionalities their apps require and focus on what's unique to their apps instead, I'd like to implement our example app in exact the same way.

That means that instead of

```js
App.on('invoice:save', handleInvoiceSave);

var handleInvoiceSave = function(invoice) {
invoices.setContent(invoice.id, invoice).then(function () {
console.log('saved to remotestorage!');
}, function (err) {
console.log('failed to save to remotestorage ', err, invoice);
});
};
```

we'd now do

```js
// overwrite dreamcode with the real thing.
store.save = function(object) {
invoices.setContent(invoice.id, invoice).then(function () {
console.log('saved to remotestorage!');
}, function (err) {
console.log('failed to save to remotestorage ', err, invoice);
});
}
```

This pull request fixes #7