marilyn icon indicating copy to clipboard operation
marilyn copied to clipboard

Feature: Configure Default Event Names

Open alanjames1987 opened this issue 10 years ago • 2 comments

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.

alanjames1987 avatar May 30 '14 10:05 alanjames1987

The backend Socket.IO would have to be configured correctly to use these types of events.

alanjames1987 avatar Aug 05 '14 11:08 alanjames1987

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.

alanjames1987 avatar Aug 12 '14 19:08 alanjames1987