background preloader

Backbone.js

Facebook Twitter

Backbone.js Wine Cellar Tutorial — Part 1: Getting Started. One of the challenges when building nontrivial Web applications is that JavaScript’s non-directive nature can initially lead to a lack of structure in your code, or in other words, a lack of… backbone.

Backbone.js Wine Cellar Tutorial — Part 1: Getting Started

JavaScript is often written as a litany of free-hanging and unrelated blocks of code, and it doesn’t take long before it becomes hard to make sense of the logic and organization of your own code. Backbone.js is a lightweight framework that addresses this issue by adding structure to JavaScript-heavy Web applications.Self-contained building blocks Backbone.js provides several classes (Model, Collection, View, Router) that you can extend to define the building blocks of your application. To build an app with Backbone.js, you first create the Models, Collections, and Views of your application. You then bring these components to life by defining a “Router” that provides the entry points of your application through a set of (deep-linkable) URLs. Data Binding Elegant REST Integration Download. Oreilly.developing.backbone.js.Applications.apr.2012.

Developing Backbone.js Applications. Backbone Fundamentals. Backbone Js. Writing HTML5 Mobile Web Apps using Backbone.js. Building Mobile JavaScript WebApps With Backbone.js & jQuery: Part I. Welcome to Part 1 of a two-part tutorial on building complete mobile web applications in JavaScript using DocumentCloud's Backbone.js, jQuery Mobile and LABjs.

Building Mobile JavaScript WebApps With Backbone.js & jQuery: Part I

In Part 1, I'll be covering a complete run-down of Backbone 0.5.2's models, views, collections and routers but also taking you through options for correctly namespacing your Backbone application. I'll also give you some tips including what scaffolding tool that can save time setting up your initial application, the ideal number of routers to use and more. We'll then build a testable wireframe of our application in jQuery Mobile before we complete building it in Part 2. Why is this two-part tutorial different from others? Developers that have attempted to work with Backbone.js and jQuery Mobile in the past will be aware that both solutions have their own approaches to handing routing. Unfortunately, there are often a number of hacks and workarounds required to get them functioning in unison.

Introducing The Backbone Boilerplate. Over the past year Bocoup has worked on several production applications that utilize the MVC library Backbone.js.

Introducing The Backbone Boilerplate

We’ve worked hard to give back to the community through informative blog posts, core contributions, support & evangelism through various mediums such as meetups, IRC and Twitter. Over the course of the past year, we created small boilerplates to share around the office and across projects. I recently began to organize this work into a canonical boilerplate for Backbone. Today, I’d like to introduce our Backbone Boilerplate: Backbone Boilerplate on GitHub → Backbone Boilerplate is a set of best practices and utilities for building Backbone.js applications. Backbone, Underscore and jQuery with an HTML5 Boilerplate foundation Boilerplate module code A Windows/Mac/Linux build tool for template precompilation and, concatenation & minification of all your libraries, application code and CSS A Lightweight node.js webserver Numerous other Backbone snippets for making your life easier.

Give your Couchapp some Backbone! Description backbone-couchdb is a plugin for Backbone.js that takes care of synching (Backbone-) Models and Collections automatically with a CouchDB instance. It makes heavy use of CouchDBs built-in Couchapp functionality. Normally it would be necessary to set up a webserver and a webapp (Rails, Sinatra, Django…) in order to persist Models. But with this plugin it is only needed to host Backbone Apps as Couchapp and the persistence layer is ready out of the box. Since the App runs as a Couchapp, it is also capable of using the CouchDB _changes-feed which enables the App to receive real-time updates for Collections and Models. 1.Description 2.Usage 3.Examples 4.Recipes Usage All Backbone apps should work normally without any changes. Backbone.couch_connector.config.db_name = "backbone-couchapp";Backbone.couch_connector.config.ddoc_name = "backbone-couchapp";Backbone.couch_connector.config.global_changes = false; function(doc) { if (doc.collection) { emit(doc.collection, doc); }}

Give your Couchapp some Backbone!