What advantage of backbone js be using with django

My question is pretty simple: Currently the stack i use is django+coffeescript.

Is coupling django, backbone js a good idea? What advantage does it offer? Could anyone take me through the pros and cons.

PS: I know backbone js being an MVC.

Answers


Well, the resources are best answered at two different places, I do not wish to repeat them here:

  1. How does Backbone.js interact with Django?
  2. What are the advantages of Backbone.js?
  3. What are some good resources for Backbone.js?

Backbone.js offers an MVC way of doing things on the client-side. You can of course mix coffeescript with backbone quite easily.

If your app has to perform quite a lot of stuff on the client-side, adopting backbone is going to let you achieve this in a cleaner, more structured and elegant way.


We use backbone+django extensively for an app, however, django alone doesn't really mix well with backbone, as most of the template system and some of the view system become superfluous when you communicate over a REST-api. Luckily you can easily add an API to django through piston, tastypie or our favorite django-rest-framework.

A problem is the doubled code-base, you need to define models and potentially form validation logic twice, in different frameworks. You might want to look at node.js as a replacement for django on the backend to be able to reuse logic on both sides of the http. Perhaps take a look at capsule from andyet.com (Henrik Joreteg to be precise) for reusing backbone logic across client and server.

A new kid on the block seems to be djangbone (https://github.com/af/djangbone) makes it really easy to use the Django ORM with backbone!


Need Your Help

Solr — reqh object access from document collector

java namespaces lucene solr

I'm interested in accessing the Solr RequestHandler from the point of document collection/scoring. SolrParams to be exact, but the issue will come up again.

XML Writer question

c# .net xml xmlwriter

I'm using XML Writer to create a log of some important events in my application.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.