Skip to content

Extend Backbone.Model/Collection classes with relation functionality #2

@fbuchinger

Description

@fbuchinger

Your project sounds interesting and I'm eager to give it a try. One question though: why don't you provide your "orm" functionality by extending Backbone's Model/Collection classes instead of "mixing" in these functions via initialize? I'm thinking of something like:

Pokepic.Model = Backbone.Model.extend({
    hasMany: {},
    embedsMany:{},
    _setupRelations: (){
         //all inner relations are setup here
     }
});

The user would then simply use your Pokepic.Model / Pokepic.Collection to specify his tasks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions