Backbone.js & Require.js – A @CodeAtBaM Lunch and Learn – How does BOW use Backbone.js?



Backbone.js & Require.js – A @CodeAtBaM Lunch and Learn – How does BOW use Backbone.js?

0 0


backbone-require-pres

A presentation about backbone.js and require.js for the Lunch & Learn

On Github nsbingham / backbone-require-pres

Backbone.js & Require.js

A @CodeAtBaM Lunch and Learn

Created by Nathan Bingham / @nsbingham

What I am not trying to do today?

Say that Backbone is the end all be all Advocate the use of Backbone is any projects Cover the entire history of MVC and JavaScript frameworks

What is Backbone.js trying to solve?

Provide some very basic structure to your JavaScript application through separating data, code and presentation and by getting your data out of the DOM.

Who else is trying to solve this problem?

Yet another tool...When to use?

Backbone.js shines best in large, SPAs (single-page applications)

* Actually uses Backbone.js

How does BOW use Backbone.js?

Backbone.js is primarly used in two sections of the site:

Touch Gallery - http://www.beautyoftheweb.com/touchgallery Developers - http://www.beautyoftheweb.com/developers

Touch Gallery

  • All HTML is preloaded in the page.
  • Backbone handles the entire page as a view. This allows it to manage the URLs (with hashes) and trigger JavaScript animations.
  • It provides some structure, but is arguable as to whether is really needed.

Developers

This is likely a relic of some past functionality or just an attempt to keep with the same pattern. Backbone.js simply starts the slider.