marilyn
marilyn copied to clipboard
Feature: Configure Default Event Names
An option should exist when creating a model to add default CRUD event names, similar to how CanJS can configure default CRUD urls.
Marilyn.model('someModel', function(){
this.crud({
'create' : 'somModel_create',
'read' : 'somModel_read',
'readOne' : 'somModel_read_by',
'update' : 'somModel_update',
'delete' : 'somModel_delete',
});
});
These events can then be used by Marilyn
to automatically sync data back and forth to the server.
The backend Socket.IO would have to be configured correctly to use these types of events.
Backbone, Ember, and Angular models use a REST/ActiveResource type interface to perform these actions. There should be an REST/ActiveResource type interface for Socket.IO that this would follow.