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 to render().promise() to get a promise.
  • Rename fetch and render overrides to fetchTemplate and renderTemplate respectively.
  • Remove RequireJS shim.
  • Event bubbling has been removed. Pass the parent into the child.
  • Overriding insert or html 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 overriding insert or html 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 (via insertView)
  • 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.

You can’t perform that action at this time.
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.
Press h to open a hovercard with more details.