• What?
  • Who?
  • Contact Jonathan Jeter
  • Privacy Policy

Jonathan Jeter

Director of Application Development

  • Jonathan Jeter on Google+
  • Jonathan Jeter on Facebook
  • Follow Jonathan Jeter on Twitter
  • Jonathan Jeter on LinkedIn
  • Jonathan Jeter's rss feed
Home Web Development JavaScript Backbone: 3 Ways

Backbone: 3 Ways

February 2, 2013 By Jonathan Jeter Leave a Comment

by Pamela Fox at HTML5 Texas Conference, Austin, Texas (Deck)

Backbone is one of the most popular MVC frameworks for JavaScript these days, and one of the reasons for its popularity is that its minimal and lightweight. That makes it easy to use in different ways and adapt to different projects – but can also make it hard to learn. In this talk, I’ll start with Backbone basics, and then dive into three different ways that we use it to power the frontends of Coursera.org.

Backbone 3 Ways HTML5TX

Why use an MVC framework? Website includes: 242 js files, 28848 lines of code & 5-person frontend team. Needed more structure to their code.
Why Backbone?

  • Structure
  • Modularity
  • Persistence Layer
  • Common Services
  • Best Practices

Backbone JS MVC Diagram

Backbone is a lightweight model view controller framework. Models use set & get so the framework know what’s going on. Collections group objects together. Views with basic data binding. Router is available, but you don’t have to use it.

The backbone backend – pull the info from the server from the JSON in the url.

Single-page web apps can be crazy because you don’t have normal page loads, etc.

Backbon is integrated with jQuery and underscore, as well as RequireJS, which helps you put all the JavaScript files back together.

How do they use backbone at coursera?

  • custom router
  • custom region manager
  • custom API layer

Entire page is written in JavaScript. Pre-render static html pages for Google and Facebook.

“You don’t always have to do things the way they tell you to.”

Admin pieces require form building interfaces. Share models.

Enforce your permissions on the client, as well as the server or propagate them from the server.

The Router determines what models/collections are valid URLs based on groups in the cookie. Make sure you understand if what you’re building is a collaborative interface. Detect when others are entering the page or when the model was last saved. Don’t do real deletes. Make a deleted column and set it based on current status. Make a change log.

Using a front-end MVC allows you to easily connect to the backend, even if it changes.

You don’t have to use backbone for the entire site. You can pick and choose things that need to be fixed or updated and use a backbone app for one section at a time.

Backbone relational creates relational models.

Write all of your APIs consistently so that they can be used across different applications with different technologies.

If you want to start learning backbone, try a tutorial, not the docs.

Keep your options open

Figure out what’s important to you: modularity? data binding? testability? persistance?

Review your options: Ember? Spine? AngularJS? Enyo? and many more…

Related articles
  • Applying MVC to your frontend application using Require and Backbone
  • Beginner HTML5, JavaScript, jQuery, Backbone, and CSS3 Resources
  • Our First Node.js App: Backbone on the Client and Server
  • The rise of JavaScript micro-frameworks

Tell someone about this:

  • Email
  • Print
  • Twitter
  • LinkedIn
  • Facebook
  • More
  • Reddit
  • Pocket
  • Tumblr

Like this:

Like Loading...

Related

Filed Under: JavaScript, MVC, Web Development Tagged With: 5-person frontend team, Admin pieces, Application programming interface, backbone app, backbone backend, Backbone basics, Backbone Beginner HTML5, Best Practices, Best Practices Backbone, change log, collaborative interface, Collections group, Common Services Best Practices Backbone, conference notes, controller framework, CSS3 Resources, current status, custom router custom, data binding, data binding. Router, Deck Backbone, different applications, different projects, different technologies, different ways, entire site, form building interfaces, Front and back ends, front-end MVC, frontend application, HTML5 Texas, JavaScript micro-frameworks, JavaScript micro-frameworks Backbone, js files, layer Entire page, lightweight model view, lightweight model view controller, manager custom API layer, Modularity Persistence Layer, MVC framework, MVC Frameworks, Node.js App, normal page loads, options open Figure, page load, Pamela Fox, Persistence Layer, popular MVC frameworks, real deletes, relational models, Server The rise, Share models, Single-page web apps, static html pages, Technology Internet, Texas conference, Uniform Resource Locator, web app, Web apps

About Jonathan Jeter

Jonathan Jeter has been creating websites since 1997. He is currently Director of Technology Services and Digital Development at TracyLocke, a shopper marketing agency. You can follow him @mywebthoughts, on LinkedIn or connect on Google+.

What do YOU think? Let me know...Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stuff I Like to Talk About:

  • Business
  • Digital Imaging
  • Internet Marketing
    • Email Marketing
    • SEM / Paid Search
  • Life
  • Other Stuff
    • Health
    • Taekwondo (TKD)
  • Sports
    • Football
  • Technology
    • Augmented Reality
    • Awesome or Scary?
    • Marketing Technology
      • Data / Analytics
      • Omnichannel
    • Mobile
      • Android
    • Virtual Reality
  • User Interface / User Experience Design
  • Web Development
    • Browsers
    • CSS
    • Front-End Development
    • Google+ (Google Plus)
    • HTML5
    • JavaScript
    • jQuery
    • Mobile
    • MVC
    • Responsive Design
    • SEO
    • Social Media
    • UI/UX
    • WordPress

HTML

  • HTML Entities

JavaScript

  • MEAN.js

My Sites

  • Head Turning Media
  • Jonathan Jeter (Brand Yourself)
  • My Humor

Online Experts

  • Bryan Eisenberg
  • Danny Sullivan
  • Duane Forrester
  • Keith Brown
  • Louis Gray
  • Matt Cutts

UI / UX

  • Jared Spool
  • Paul Jeter
FreshBooks
Genesis Framework for WordPress Premise Landing Pages Made Easy

Most Popular

  • Verizon Wireless – My Favorite Mobile Provider
  • Exploring Standard Ad Unit Sizes: Google AdSense…
  • Intro to WebGL and Three.js – Front Porch…
  • Who?
  • People Data and the Future of Marketing –…
  • Exploring Standard Ad Unit Sizes: Google AdSense…
  • A Brief History of the Complete Redesign of Google…
  • Contact Jonathan Jeter
  • Privacy Policy
  • Looking for Instagram or Android fonts or logos and…

Copyright © 2025 Jonathan Jeter

 

Loading Comments...
 

    %d