3
votes

I'm using django, but I like to use it with gwt, well I've try using json with piston and works well, but I prefer using RPC call.

So I know that there's some rpc lib for django, but I'm confused about xml-rpc json-rpc gwt-rpc...

So the questions are:

1) where find a tutorial if exists... 2) or how can I do a simple rpc call in gwt and use django to server side

thanks, I'm asking here because I've find nothing in google thanks

1

1 Answers

1
votes

Any particular reason you want to use RPC to Django instead of a web service from GWT application? I think using JSON communication between Django and GWT is much easier than RPC.

The main challenge in using RPC is that your Django and GWT client should communicate via a common protocol. On Django side you need a module that translates the GWT RPC calls to something Django understands and then convert the Django results into something GWT client application understands. In a nutshell RPC calls are serialized text stream sent over http via post method. On the server side you should be able to translate that into the right data structure by deserializing it. So you need a library that will do this serialization and deserialization for Django based on GWT-RPC protocol.

Useful links:

About GWT RPC:

Google documentation : RPC

GWT RPC in a nutshell

GWT + Django:

How to use Django with GWT?

Using GWT with Django using xml

Google Web Toolkit like application in Django

Pyjs

You can also look at http://pyjs.org/ which is a python to JS compiler and use it with Django. The great thing about pyjs is that you are still in Python world :)

http://www.derekschaefer.net/2011/02/08/pyjamas-django-pure-win/

http://gdwarner.blogspot.no/2008/10/brief-pyjamas-django-tutorial.html