Backbone and Azure, Yass.js, grunt-stripmq

2013-06-21 00:00:00 +0100 by Alex R. Young

Backbone Adapter for Azure

Olivier Bloch sent in a Backbone adapter for Windows Azure (GitHub: MSOpenTech / backbone-azure-mobile-services, License: Apache 2.0). It's distributed by Microsoft Open Technologies, and syncs data with the Windows Azure Mobile Data Service.

If you're interested in trying out the server-side API without Backbone.js, I noticed there's a tutorial here: Get started with data in Mobile Services.

To use Azure with Backbone, all you need to do is include the adapter, an additional JavaScript file provided by Microsoft, and some settings for your collections:

var People = Backbone.Collection.extend({
  client: client,
  table: 'Table1',
  model: Person

The authors have included build scripts (Grunt) and tests (Jasmine).


Yass.js (GitHub: EightMedia / yass.js, License: MIT) by Jorik Tangelder is an adaptive image script that adds support for srcset tailored to mobile browsers. Once yass.js has been added after the last image on a page, it will ensure the optimum image is loaded.

It's currently very small (less than 500 bytes when compressed), and has been tested in Chrome 28, Android 4.2, IOS6, BlackBerry10 and IE6.


grunt-stripmq (GitHub: jtangelder / grunt-stripmq, License: MIT, npm: grunt-stripmq) also by Jorik Tangelder is a "mobile-first CSS fallback":

A Grunt task to generate a fallback version of your fancy mobile first stylesheet. Since IE9 doesn't support media queries, you can use a JavaScript like respond.js to enable this, or generate a fallback version with this task.

So if you've invested a lot of time developing modern, mobile-optimised sites, then you should be able to jam them through Grunt to spit out something desktop-friendly.