I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea?
I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine?
I'd recommend looking into a pure javascript framework (probably Jquery) for your client-side code, and write JSON services in python- that seems to be the easiest / bestest way to go.
Google Web Toolkit lets you write the UI in Java and compile it to javascript. As Dave says, it may be a better choice where the backend is in Java, as it has nice RPC hooks for that case.
jQuery is a fine library, but also check out the Prototype JavaScript framework. It really turns JavaScript from being an occasionally awkward language into a beautiful and elegant language.
You may want to have a look at Pyjamas (http://pyjs.org/), which is "GWT for Python".
A nice way is to use an AJAX library is to take advantage of Google's AJAX Libraries API service. This is a bit faster and cleaner than downloading the JS and putting it in your
/static/
folder and doesn't eat into your disk quota.In your javascript you would just put, for example:
and/or
Somewhere in your header you would put something like:
And that's all you need to use Google's API libraries.
There is no reason why you shouldn't use GAE and Google Web Toolkit (GWT) together. You write your backend code in Python and the frontend code in Java (and possibly some JavaScript), which is then compiled to JavaScript. When using another AJAX framework you will also have this difference between server and client side language.
GWT has features that make remote invocation of java code on the server easier, but these are entirely optional. You can just use JSON or XML interfaces, just like with other AJAX frameworks.
GWT 1.5 also comes with JavaScript Overlay Types, that basically allow you to treat a piece of JSON data like a Java object when developing the client side code. You can read more about this here.
Update:
Now that Google has added Java support for Google App Engine, you can develop both backend and frontend code in Java on a full Google stack - if you like. There is a nice Eclipse plugin from Google that makes it very easy to develop and deploy applications that use GAE, GWT or both.
As Google Web Toolkit is a subset of Java it works best when you Java at the backend too. Since Google App Engine is currently Python only I think you'd have to do a lot of messing about to get your server and client to talk nicely to each other.
jQuery seems to be the most popular JavaScript library option in the AJAX Tag at DjangoSnippets.com.
Edit: The above is only true of Google App Engine applications written in Python. As Google App Engine now supports Java, GWT could now be a good choice for writing an AJAX front end. Google even have a tutorial showing you how to do it.