-
Notifications
You must be signed in to change notification settings - Fork 172
From 0.8 to 0.9
Tim Branyen edited this page Mar 30, 2015
·
11 revisions
This is a significant update compared to 0.8. Lots of changes have been made to ensure a stable and consistent API. High level changes are AMD support, batch rendering, and API reshaping.
- All properties passed to the View constructor are now copied to the View, this may be harmful if you were directly passing a model:
new View(myModel)
instead of:new View({ model: myModel })
-
view.render()
now returns the View, change torender().promise()
to get a promise. - Rename
fetch
andrender
overrides tofetchTemplate
andrenderTemplate
respectively. - Remove RequireJS shim.
- Event bubbling has been removed. Pass the parent into the child.
- Overriding
insert
orhtml
on a parent view now affects how it inserts or sets child views. In 0.8, this override would be defined on the child itself. If you are overridinginsert
orhtml
on a child view, move it to the parent view. For clarity: - If
insert
is overridden, it will be called when subViews are inserted within that View (viainsertView
) - If
html
is overridden, it will be called:- When applying a template.
- When setting subViews (via
setView
)
We will continue to upgrade and make changes along side the edge version of Backbone. There is a very large structural change that is coming soon (removal of View#options
). We are working on refactoring LayoutManager to work with this change.
Getting started
Usage
- Overview
- Configuration
- Basics
- Example usage
- Nested views
- Template rendering
- LayoutManager in Node.js
API reference
Migration guides
Legacy
How to contribute