Django + GWT or Jquery Django + GWT or Jquery ajax ajax

Django + GWT or Jquery


Have you considered pyjamas?

For me, it's the best of both worlds. You use, as usual, the Django back-end but can easily use JSON RPC services from your pyjamas code.

You code the front-end pretty much like in GWT, but in Python instead of Java.

Here is a brief tutorial: http://gdwarner.blogspot.com/2008/10/brief-pyjamas-django-tutorial.html


I think you need to make your decision based the usual factors: how much time do you have to develop your app, and what are the best set of tools to get the development done in that time.

If you have made the decision that Django is your server-side framework (which is my favorite choice) then it seems pretty clear that jQuery, Dojo, etc. are probably going to integrate easier with your Django.

On the other hand, if you have more time and especially if you could open-source the Django interface parts, then it would be very cool to write some code that could hook into Django internals and generate the necessary Javascript to seamlessly interface with GWT and not violate DRY.

So in short, if you have to get the app done go with jQuery. If you have more time and want some kudos then develop a nice seamless library for Django that will render the proper HTML + Javascript from Django models and forms that will integrate with GWT.

Just my opinion :)


I've actually crossed this exact bridge, and unfortunately I found it is best to make the client side objects in GWT. Luckily, however, this is easily done using JavaScript Overlays and a little code generator.

My code generator looks at the models.py file and rips out all of the pertinent fields before plopping them into the .java files for GWT. Once you have this, implementing your new objects is pretty easy.