Developing Backbone.js Applications: Building Better by Addy Osmani

By Addy Osmani

If you need to construct your site’s frontend with the single-page software (SPA) version, this hands-on publication exhibits you the way to get the task performed with Backbone.js. You’ll the way to create dependent JavaScript purposes, utilizing Backbone’s personal style of model-view-controller (MVC) architecture.

Start with the fundamentals of MVC, SPA, and determination, then get your fingers soiled development pattern applications—a basic Todo checklist app, a RESTful publication library app, and a modular app with spine and RequireJS. writer Addy Osmani, an engineer for Google’s Chrome staff, additionally demonstrates complicated makes use of of the framework.

  • Learn how Backbone.js brings MVC advantages to the client-side
  • Write code that may be simply learn, based, and extended
  • Work with the Backbone.Marionette and Thorax extension frameworks
  • Solve universal difficulties you’ll come across whilst utilizing Backbone.js
  • Organize your code into modules with AMD and RequireJS
  • Paginate facts on your Collections with the Backbone.Paginator plugin
  • Bootstrap a brand new Backbone.js program with boilerplate code
  • Use spine with jQuery cellular and unravel routing difficulties among the two
  • Unit-test your spine apps with Jasmine, QUnit, and SinonJS

Show description

Read or Download Developing Backbone.js Applications: Building Better JavaScript Applications PDF

Similar javascript books

Beginning Android Web Apps Development: Develop for Android using HTML5, CSS3, and JavaScript

With starting Android net Apps improvement, you'll the way to observe HTML5, CSS3, JavaScript, Ajax and different net criteria to be used at the Android cellular platform, through development numerous enjoyable and visually stimulating video games and different net functions! If you've performed a few easy internet improvement, and you are looking to construct your abilities to create exceptional web apps, you'll find everything you search within the discussions and examples during this ebook.

Pro Windows 8 Development with HTML5 and JavaScript

Apps are on the center of home windows eight, bringing wealthy and fascinating reports to either capsule and computing device clients. home windows eight makes use of the home windows Runtime (WinRT), an entire reimagining of home windows improvement that helps a number of programming languages and is equipped on HTML5, CSS and JavaScript. those purposes are the way forward for home windows improvement and JavaScript is ideal language to exploit this intriguing and versatile setting.

Ruby in a Nutshell: A Desktop Quick Reference (In a Nutshell (O'Reilly))

Ruby is a completely natural object-oriented scripting language written in C and designed with Perl and Python features in brain. whereas its roots are in Japan, Ruby is slowly yet definitely gaining floor within the US. The aim of Yukihiro Matsumoto, author of Ruby and writer of this booklet, is to include the strengths of languages like Perl, Python, Lisp and Smalltalk.

Erlang Programming: A Concurrent Approach to Software Development

This booklet is an in-depth creation to Erlang, a programming language perfect for any state of affairs the place concurrency, fault tolerance, and quick reaction is key. Erlang is gaining frequent adoption with the appearance of multi-core processors and their new scalable method of concurrency. With this consultant you will methods to write complicated concurrent courses in Erlang, despite your programming historical past or event.

Additional info for Developing Backbone.js Applications: Building Better JavaScript Applications

Example text

This basket might be presented to the user in a box in the top-right corner of the page (see Figure 2-3). Figure 2-3. A shopping basket forming a region of a single-page application The basket and its data are presented in HTML. The data and its associated View in HTML change over time. There was a time when we used jQuery (or a similar DOM manipulation library) and a bunch of Ajax calls and callbacks to keep the two in sync. That often produced code that was not well structured or easy to maintain.

Within it, each todo is rendered with its title and com‐ pleted checkbox. Model editing is done through an edit view, where a user who has selected a specific todo edits its title in a form. el. • We then add our render() callback as a model subscriber, so the view can be trig‐ gered to update when the model changes. • You may wonder where user interaction comes into play here. When users click on a todo element within the view, it’s not the view’s responsibility to know what to do next. A controller makes this decision.

Templating In the context of JavaScript frameworks that support MVC/MV*, it is worth looking more closely at JavaScript templating and its relationship to views. It has long been considered bad practice (and computationally expensive) to manually create large blocks of HTML markup in-memory through string concatenation. write to inject the template into the DOM. This approach often means keeping scripted markup inline with standard markup, which can quickly become difficult to read and maintain, espe‐ cially when you’re building large applications.

Download PDF sample

Rated 4.06 of 5 – based on 3 votes