1.) use a REST framework to transform your models into JSON over the wire
** We use the latest 2.x of django-rest-framework and it's been great
** If you are into the bleeding edge stuff you could also use ember-data (I have an adapter that works with both projects to reduce the $.ajax you normally write to communicate with your server on the backend)
https://github.com/toranb/ember-data-django-rest-adapter
2.) you will need a template precompiler that can crunch down your handlebars templates
** We use django compressor to minify our JS and CoffeeScript so we just added another module called django-ember-precompile
https://npmjs.org/package/django-ember-precompile
3.) If you are a unit testing shop look into ember-testing with QUnit and Karma
** The only down side is that Karma does not have a preprocessor built in so write your own or wait for my pull request (assuming the core pulls it in)
A full example project showing a django app + django rest framework + the compressor / handlebars stuff mentioned above
https://github.com/toranb/complex-ember-data-example
Also I'm up for a pairing session or discussion over email if you decide to jump in and need some pointers to get started
Toran
toranb@gmail.com
On Saturday, June 1, 2013 12:34:01 AM UTC-5, JJ Zolper wrote:
-- On Saturday, June 1, 2013 12:34:01 AM UTC-5, JJ Zolper wrote:
Hello,So I'm thinking about bundling together Django and Ember. The reason is my front end is going to be lots of data in realtime. Think like overlaying a map with information for an example. Lots of data needs to be handled on the front end. Things need to be extremely dynamic.I love Django and the interface with the database and all that. I'm thinking a powerful solution might be tagging Django and Ember together. Has anyone done this? Anyone have any advice? My questions really are (like the questions on my mind are) like lets say I query the database and get this resulting queryset or list in a variable. In Django you hand that list off to the template. Like I'm not sure how to hand things back and forth between Django and Ember. How I would hand the result from the query to Ember aka JS and then display that to the front end.Does this sound like a powerful solution for handling large amounts of data? Really any information would be wonderful, better than nothing for sure...I need high performance and power for processing quickly and giving the users a seamless experience and I'm wondering if this might be the ticket?Thanks so much,JJ Zolper
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment