views:

939

answers:

4

both seems to be pretty cool which is to be in used in what scenario ?

+5  A: 

GWT: http://code.google.com/webtoolkit/

Faster AJAX than you'd write by hand

With Google Web Toolkit (GWT), you write your AJAX front-end in the Java programming language which GWT then cross-compiles into optimized JavaScript that automatically works across all major browsers.

Django: http://www.djangoproject.com/

a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

They have little or nothing to do with each other. Django provides some Javascript; Django can easily handle the server-side of any Ajax conversation.

Django doesn't help you write javascript. It helps you write the server-side of the application.

Django helps you write the HTML pagess (with templates). If the page includes, or relies on Javascript, Django doesn't care very much at all.

S.Lott
+3  A: 

With GWT you write client-side applications, that run inside some browser Javascript engine. You code in Java, and it gets compiled into Javascript.

Django, is different because you write server-side applications: applications will be executed in the server and their result is sent to the client browser. Ah! Django is Python.

Both have libraries to achieve most of the tasks web developer needs, like internationalization, sessions, etc. Django comes with a nice ORM (Object Relational Mapper) and GWT comes with a Tomcat based engine, for the server-side coding and development.

If you need to make a decision just choose the framework based in the language of your choice.

licorna
+3  A: 

It is quite possible to use both in the same project. I've been working on such a project for some time now. Have Django handle the server side and leave the client side to GWT. The only issue I have is that the RPC mechanism in GWT cannot be used because it works with Java servlets. I use JSON for communication instead.

TrayMan
did u guys try use python instead of java http://pyjs.org/
yesraaj
this may be helpful http://code.google.com/p/pyjamas/wiki/DjangoWithPyjamas
yesraaj
unfortunately, Pyjamas compiles such a limited subset of Python that it's even easier to work in JS
Javier
I haven't run into Pyjamas before, so no, we didn't try that. The client and the server are pretty well separated so there's no particular benefit from using the same language on both sides for our project. I also find the static type checking in Java to be of some use.
TrayMan
+3  A: 

pyjamas is a Python port of the GWT, so all the javascript is generated using Python instead of Java.

If you're planning on working with Django it might simplify to make your entire shop code in Python.

jfenwick
just found the same link.
yesraaj