Learn how to set up event handlers in your Backbone.js view In the previous two articles of this series: “Getting Started with Backbone.js Views” (Parts I & II), we learned how to set up a view and optimize it for better performance. The next logical step is event handlers. While it may be possible that […]
Getting Started with Backbone.js Views – Part II : Optimization Basics
Learn how to optimize your Backbone.js view for better performance In the first part of this series: Getting Started with Backbone.js Views – Part I : Introduction, we learned the basics of how to implement a view in Backbone.js. Although the process of extending the Backbone.View class was quite similar to extending the Backbone.Route constructor, […]
Getting Started with Backbone.js Views – Part I : Introduction
Learn how to separate presentation from logic by leveraging Backbone.js views2 One of the main principles of MVC is the separation of presentation, data and logic. While it may be tempting to mix these concerns in order to “get it out the door”, maintaining and extending this kind of code can quickly become a nightmare. […]
Getting Started with Backbone.js Routes – Part IV: Configuring an Initialization Function
Learn how to configure a function that initializes your Backbone.js router In the last few articles of this series, we have learned the basics of setting up routes in Backbone.js. We’ve discussed setting up route handlers, specifying a default route, graceful actions for corner-cases, as well as passing parameters to routes. But what about setup […]
Getting Started with Backbone.js Routes – Part III: Passing Parameters to the Route
Learn how to pass values to your Backbone router in the URL In the second part of this series: Getting Started with Backbone.js Routes – Part II: Handling Bad Requests, we learned how to handle route requests that are not configured in our router. This allows us complete control over the user experience, even when […]
Getting Started with Backbone.js Routes – Part II: Handling Bad Requests
Learn how to handle requests for a route that you have not configured In the first part of this series: Getting Started with Backbone.js Routes – Part I: Introduction, we learned how to set up routing in a single page web application. We covered two kinds of routes: a “default” route (i.e. no route is […]
Getting Started with Backbone.js Routes – Part I: Introduction
Learn the simple yet powerful syntax for setting up routing in your Backbone.js single page application Routes are one of the most important aspects of any single page application. Routes allow you to intercept browser address changes and act upon them accordingly. As per the moniker “single page application” suggests, after the completion of the […]