My alternative to ember data


Hi Guys.

I’ve built a reasonably simple alternative to ember-data called which I’d like to throw out there:

It takes a slightly different approach by not really focusing on relationships, but more on controlling how and when data gets loaded into an object by letting you define “lazy” and “partial” fields.

Like a few people, I’ve had some difficult experiences with ember data so decided to make something which would provide me with the features I want for my current projects. It may not service everyone’s needs and is not intended to be as ambitious as ember data but would be interested to hear what people think.




hey cool…

does it default to REST ?


Hi Charlie, great job on this!

I have a question though, is it possible to do something like:

App.Organization = Emu.Model.extend({
  name: Emu.field('string'),
  projects: Emu.field('App.Project', {collection: true, lazy: true})

App.Project = Emu.Model.extend({
  name: Emu.field('string'),
  organization: Emu.field('App.Organization')

  name: 'Foo'

Where the adapter would make a call to:

POST /organization/:id/project

My workaround would be to create the project with an organizationId then reload the projects of the organization. Is there a way to do this in one call?




Yeah, if you don’t pass the store an adapter uses the rest one


Hi Charles,

In order to save the new record you’d have to do

project = App.Organization.find(1).get('projects').createRecord({
  name: 'Foo'

Then, the adapter should make a call to

POST /organization/:id/project

However, I tested this out and it actually makes a call to

POST /project

Which isn’t right so I’m going to fix that:

Glad you like what I’ve done so far, thanks.


Just to let you know I fixed that issue so the latest version on github. This integration tests demonstrates the fix:


Awesome! Thanks for the quick fix!


Hey everyone, I’ve also been working on a model library. It’s called Ember Model:

Would love some help :slight_smile:


Hey Erik. This looks great, I’ll have a play.