Backbone JS Course

Backbone JS

Course Overview

Backbone JS is an attempt to discover the minimal set of data-structuring (models and collections) and user interface (views and URLs) primitives that are generally useful when building web applications with JavaScript. 

When working on a web application that involves a lot of JavaScript, one of the first things you learn is to stop tying your data to the DOM. It’s all too easy to create JavaScript applications that end up as tangled piles of jQuery selectors and callbacks, all trying frantically to keep data in sync between the HTML UI, your JavaScript logic, and the database on your server. For rich client-side applications, a more structured approach is often helpful.

With Backbone, you represent your data as Models, which can be created, validated, destroyed, and saved to the server. Whenever a UI action causes an attribute of a model to change, the model triggers a “change” event; all the Views that display the model’s state can be notified of the change, so that they are able to respond accordingly, re-rendering themselves with the new information.

 In a finished Backbone app, you don’t have to write the glue code that looks into the DOM to find an element with a specific id, and update the HTML manually when the model changes, the views simply update themselves.

Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.

This course mainly for developers, the Backbone js a JavaScript framework extensions. Individuals with interest in learning can take up the course.

Individuals taking the course should have programming skill with JavaScript concepts.

You get hired as application developer in product based IT companies like E&Y, Ctrl S, Data grid, Spino technologies and more.

The main concepts covered are Model-View-Controller, Basic Backbone, and Event handling, Collections: Multiple models, manipulating collections with Underscore.js, Display information with Views, Change views with a router, Backbone. Sync: How to talk to a server, Update server-side data with forms

Backbone JS Course Syllabus

Introduction

Model-View-Controller

  • What is Model-View-Controller?
  • How does Backbone.js fit into this model?
  • What about the back-end?

Basic Backbone

  • A very simple model
  • Retrieving our simple model
  • Saving our simple model

Event handling

  • Capturing events
  • Abandoning events
  • Triggering events

The model in depth

  • Building a Model with extend()
  • Getters and setters
  • Constructors and defaults
  • Managing changes
  • Validation

Collections: Multiple models

  • Overview of the collections API
  • Creating your own Collection
  • Adding and removing elements
  • Comparing and sorting elements
  • Filtering collections
  • Data manipulation as a batch operation

Manipulating collections with Underscore.js

  • Iteration functions (forEach, map, filter)
  • Accessors: last, first
  • Searching: contains/include, etc
  • Aggregation functions: max, min, etc.

Display information with Views

  • Display a Model
  • Display a Collection
  • Display Aggregated (Reduced) Data

Backbone.sync: How to talk to a server

  • The RESTful model of CRUD interaction
  • Standard syncing over REST
  • Alternatives for non-RESTful applications

Update server-side data with forms

  • Display forms
  • Perform client-side form validation
  • Submit a form to update an object

Change views with a router

  • Start on a main route
  • Create links to display different views
  • Animate changes
  • Tracking History

Advanced topics and techniques

  • Create an automatically updating view
  • Extracting common code to libraries

Improve Performance

  • Preparations
  • Update data with a changes feed
  • Make requests over a websocket
  • Organize with Pagination