You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
That would be a possibility. At first I didn't want to change backbone directly for this project.
The problem with your solution is when the overridden initialize do not call the super initializer (as it is not done by the language). Also initialize is called by the backbone.model constructor which would require changes to backbone directly.
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:The user would then simply use your
Pokepic.Model
/Pokepic.Collection
to specify his tasks.The text was updated successfully, but these errors were encountered: