Question

I have been using Django for a while. Recently, I came across Meteorjs and Emberjs. After looking at them I started wondering:

Could I combine Emberjs and Django to build reactive app like Meteorjs does?

How can Django project changes in its Models down to the browser?

Was it helpful?

Solution

You could use Ember Data to represent your models in the browser which makes it easy to use a Restful interface to load and save your models.

If you want push changes from your Django server to the browser, you could use websockets or long polling to update the Ember Data models

OTHER TIPS

Depending on your project needs, I think you can consider djangorestframework-reactive (https://pypi.org/project/djangorestframework-reactive/1.0.0/). The plugin will enable you to display immediate data changes without the need for long polling. There is also the option of using celery with Redis to achieve an immediate response. Check out sample here: https://codesachin.wordpress.com/2016/01/04/redis-celery-reactive-computing-in-django-for-iot-applications/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top