2
votes

I have been studying emberjs and tried to get it to work with the django rest framework, without much luck.

Here is what I have found:

  1. django rest framework does not natively spit the json format that Ember expects
  2. ember django rest framework adapter is based on ember-data, which leads to next point
  3. ember-data is not production ready, and the rest framework adapter does not work on the latest ember-data
  4. someone mentioned to roll your own without using ember data in this link http://discuss.emberjs.com/t/ember-data-endless-frustration/893/2 but it makes me feel like doing things twice since I already defined my models in django.

My question is, is this combination ready for prime time and has anyone used this combination for any production sites?

3
I think you've pretty much answered your own question :) Personally, I've had a lot of success using Sammy for client-side routing/events and Knockout for data binding data coming from Rest calls. - Brandon
Hey @Brandon thanks for the heads up, just had a quick look at both, which one should I learn first? - James Lin
They pretty much go hand in hand, although there are a few areas of overlap. You don't need Sammy to produce complex UIs with Knockout, but it has some nice plugins for caching and rendering templates - an area of overlap. I would probably start with Knockout, as I leverage more from it than Sammy. Sammy's docs, in my opinion need some improvement. - Brandon

3 Answers

1
votes

Author of ember-django-adapter here. We just released version 1.0.0 compatible with Ember Data 1.13.7 and higher and Django REST Framework 3.0.0 and higher. It has grown with Ember for the past year and a half, and is ready for prime time.

0
votes

I'm using ember-data-django-rest-adapter and it's working fine with latest stable ember and canary ember-data. There's an experimental ember1.0 compatible branch. Luckily the code for django's adapter as of this moment is only 300 lines and easily understandable.

To answer your question: I think it's ready for startups to use in production in a few months (we're going live in January 2014).

0
votes

As of April 2015, the package that @ObviousCat mentioned is deprecated in favor of the django rest framework ember package. We're using it in our Ember/Django project and it does wonders for "enhancing" DRF to play with Ember.

If you want to create the adapter on the client side, there is also an option for that with the ember django adapter, although we decided to make changes to the server side instead of the client side, so we aren't using that.