I know backbone is somewhat depending on underscore and jquery. Is there difference between the two lines below?
app.notifications = _.extend({}, Backbone.Events);
AND
app.notifications = Backbone.Events.extend({});
If they are NOT the same, how different?
Backbone.Events.extend does not exist,
so I will refer to Backbone.Model instead.
_.extend(target, mixin1, mixin2)is going to copy properties into the target objectBackbone.Model.extend is going to
subclassBackbone.Model basically make a constructor (function) whose prototype has your provided properties. This will allow you to make instances of your new classwhile
_.extendwould failIn short Backbone.Model.extend creates a new constructor (function), while _.extend modifies an existing object;