JSON API By Example

February 04, 2017

For the past six weeks or so I have been learning Ember.js, a JavaScript framework frequently described as the “Rails of JavaScript”, which I deem to be an accurate moniker.

Ember brings Rails’s omakase mantra of “convention over configuration” to the JavaScript world. It removes the requirement of stitching together different tools, and provides the ember-cli for developer productivity. Lucky for us, the React team acknowledges that the ember team is onto something there and plans on implementing their own CLI tool as well.

If I have one nit to pick, it is that the ember guides only tell you half of the story. The tutorial uses ember-cli-mirage to mock an API, but you are left on your own to discover how to get ember.js to work with a true back end.

JSON API By Example by Adolfo Builes.

If only I had discovered this book earlier! This book walks you through building a Rails API that follows the JSON API specification that Ember expects by default. Now we’re cooking with gas.

It’s a short book, but I think it is well worth the sixteen dollars to get you up and running. Especially because it works alongside ember 101, the free counterpart that walks you through building an Ember app to consume the API. This is in no way a dig at the author, but ember 101 may feel a bit scatterbrained for a new Ember developer. At the time of this writing it is not fully up to date, but I believe it is still worth checking out.