Home What SendHub Learned Building a Single-Page Backbone.js App

What SendHub Learned Building a Single-Page Backbone.js App

SendHub has put up a post on things its developers learned in rebuilding the front-end of its Web site as a single-page application with Backbone.js. This includes everything from template rendering to “avoiding a zombie apocalypse.”

The company decided to give SendHub.com a facelift because “the site looked a bit dated, and it just didn’t feel as snappy as we wanted it to. All pages were rendered almost entirely on the server, and only a couple of places used Ajax to pull in data asynchronously.” The company also wanted to test out its developer API>.

Because Backbone.js has a dependency on Underscore.js, they decided to use it over Mustache, Handlebars and other rendering libraries. This turned out to be a good choice because it not only saved them from having to load an additional library, they also didn’t need the extra features provided by the other libraries.

Killing Zombies

Another “big learning opportunity” in building the new front-end, was “in understanding the importance of killing zombies.” In this case, we’re talking about objects that “you can’t access directly, but live inside the application and take up memory resources.” Basically, SendHub says these crop up “when you forget to clean up event listeners after objects are removed from the page (usually they are view objects).”

The best zombie-killing resource, according to SendHub, is Derick Bailey’s “Zombies! Run! (Managing Page Transitions In Backbone Apps)”, which explains how to use a close method to avoid zombies.

SendHub also talks about how to use a global dispatch object to get Backbone.js views talking to one another, “without tightly coupling them to each other.”

If you’re new to Backbone.js, SendHub’s post is worth reading.

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.