Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Backbone.Class #2413

Closed
wants to merge 1 commit into from
Closed

Add Backbone.Class #2413

wants to merge 1 commit into from

Conversation

rlayte
Copy link

@rlayte rlayte commented Mar 21, 2013

This sets up the extend method and mixes in Events so it can be used to create simple objects that don't need the extra functionality in Model, View, etc.

I've made Model, View, Collection, Router, and History subclasses of this base object to collect this logic in one place. It also seems like this should be easier to follow for people who are already familiar with Backbone's inheritance pattern.

…ew, Collection, Router and History can extend from.
@rlayte
Copy link
Author

rlayte commented Mar 21, 2013

So I just saw #276. Probably should have searched before submitting this. I'm assuming thoughts haven't changed regarding adding a base class, but I still think something like this would add value without deviating from the core pupose of Backbone.

@@ -933,7 +972,7 @@
this.trigger.apply(this, arguments);
}

});
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semicolon

@jashkenas
Copy link
Owner

So I just saw #276. Probably should have searched before submitting this.
I'm assuming thoughts haven't changed regarding adding a base class.

Yes, and yes ;)

@jashkenas jashkenas closed this Mar 21, 2013
@philfreo
Copy link
Contributor

Any thoughts on this being accepted as a simple refactor (if Backbone.Class wasn't exposed publicly) - seems cleaner and is -3 loc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants