What is the advantage of using basic js with django

My question is pretty simple: I am currently using the django + coffeescript stack.

Is joining django, js spine a good idea? What advantage does it offer? Can anyone take me for the pros and cons.

PS: I know that base js is MVC.

+4
source share
2 answers

Backbone.js offers an MVC way to do something on the client side. You can, of course, easily mix a coffee pot with a base.

If your application needs to do quite a few things on the client side, adopting a basic system will allow you to achieve this in a cleaner, more structured and elegant way.

+6
source

We use backbone + django for the application, however, only django doesnโ€™t work very well with the framework, since most of the template system and some viewing systems become redundant when you exchange REST-api. Fortunately, you can easily add an API to django through the plunger, tastypie, or our favorite django-rest-framework.

The problem is a doubled code base, you need to define models and potentially generate the verification logic twice, in different frames. Perhaps you should take a look at node.js as a replacement for django with a backend to be able to reuse the logic on both sides of http. Perhaps look at the capsule from andyet.com (more precisely, Henrik Joreteg) to reuse the base system on the client and server.

The new guy on the block seems djangbone ( https://github.com/af/djangbone ) makes it very easy to use Django ORM with the base!

+3
source

Source: https://habr.com/ru/post/1386844/


All Articles