Quantcast
Channel: Hacker News
Viewing all articles
Browse latest Browse all 10943

Serving Backbone.js for crawlers | SC5 Blog

$
0
0

Comments:"Serving Backbone.js for crawlers | SC5 Blog"

URL:http://blog.sc5.fi/2013/04/serving-backbone-for-robots-legacy-browsers/


The different approaches for reusing your single page web app codebase on both client and server side are stirring some vibrant discussion around the community. We love the buzz around e.g. Airbnb rendr.

Knowing that the world is not complete on this front, we decided to share our research and experience on the same field.

Server side backbone example

The backbone-serverside framework provides an approach with minimal dependencies and app design constrains to serve a backbone app for modern browsers, robots and legacy clients alike.

Here’s an excerpt from the Mozilla Hacks article introducing backbone-serverside:

We believe there is no easy way of fully abstracting out the DOM without changing what Backbone applications essentially are. We like our Backbone applications without extra layers, and jQuery has always served us as a good compatibility layer to defend ourselves against browser differences in DOM manipulation. Like Backbone.LayoutManager, we choose Cheerio as our jQuery abstraction. We solved the Backbone browser API dependencies by overriding Backbone.history and Backbone.ajax with API compatible replacements.

The backbone-serverside framework is naturally available for forking and fiddling at GitHub.

We’d love to have you share the love and provide feedback!

If you happen to be at HTML5DevConf today, April 2nd, our Lauri Svan will take you for a presentation ride to learn more about backbone-serverside.

 

This entry was posted in HTML5, Open source and tagged Backbone.js, html5, open source. Bookmark the permalink.

Viewing all articles
Browse latest Browse all 10943

Trending Articles