As from what I read, in all the examples it seems that JAVA
environment is necessary to deploy the application. Is it possible to
deploy the application to a non JAVA enabled server program like python
based TurboGears? Thanks a lot.
http://code.google.com/webtoolkit/documentation/examples/jsonrpc/
Bret Taylor
Product Manager, GWT
If you have a look at the JSON example (in JSON.java), you'll see the
following in the doFetchURL method:
if (!HTTPRequest
.asyncGet(DEFAULT_SEARCH_URL, new JSONResponseTextHandler())) {
Simply replace DEFAULT_SEARCH_URL with the URL of your server side
process and replace the JSONResponseTextHandler with your own
XMLParsing object.
If you have the choice, I'd really recommend using JSON over XML
though. They are virtually equivalent, but JSON is very lightweight in
comparison to XML. Also, since you're writing code that is eventually
going to be JavaScript, (depending on how Google implements the
Java->JavaScript conversion for deployment) JSON doesn't require any
parsing objects once deployed on your website.
If you're interested, see http://json.org/ for the spec and also
libraries to automatically convert your server side objects into JSON
format.
I'm hoping to use this on my site by the end of the weekend...
Regards,
Aaron Watkins
----------------------
My site: http://www.goannatravel.com
http://www.goannatravel.com/test/goanna/get_journal.php
or
http://www.goannatravel.com/test/goanna/get_journal.php?j=1
These URLs may not be around for too long. I've just got GWT working
with my site (see http://www.goannatravel.com/test/goanna), and when
I've finished integrating it, they will all move to a live area (just
replace 'test' with 'home').
Cheers,
Aaron
If you go to http://json.org, down the bottom there's a bunch of links
to JSON in different languages. Download the PHP one. Then in PHP, you
just do something like:
require(<JSON_LIBRARY>);
$JSON = new JSON();
$JSON->encode(<YOUR_PHP_OBJECT>);
Cheers,
Aaron