darthdeus' blog

Random thoughts about the world of programming

Ember Data in Depth

This is a guide explaining how Ember Data works internaly. My initial motivation for writing this is to understand Ember better myself. I’ve found that every time I understand something about how Ember works, it improves my application code.

Main parts

First we need to understand what are the main concepts. Let’s start with a simple example.

Controller’s Needs Explained

Since the v2 router came it became clear that using global singleton controllers like App.userController = App.UserController.create() is not the way to go. This prevents us from doing a simple binding like

1
2
3
App.UserController = Ember.ObjectController.extend({
  accountsBinding: "App.accountsController.content"
})