views:

608

answers:

3

All the time, I use PHP on server side to generate HTML/XHTML directly or via Smarty/PHPTAL or any other templating engine. I do believe most of developers follow the same path most of the time.

Now I'm thinking of delegating GUI & client-side to GWT and using to send RPCXML / RPCJSON / POST / GET to server side which run PHP. I'm looking for good examples of doing so. It's great to have code accompanied. Thanks in advance.


EXTRA:

Although I could not find any example site, I have found documents that hint on using JSON as a mean for data exchange.

http://code.google.com/webtoolkit/articles/using_gwt_for_json_mashups.html

http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html

http://code.google.com/webtoolkit/doc/latest/tutorial/JSONphp.html

+4  A: 

You won't find them.

GWT uses a non-transparent protocol for GWT-RPC communication. This is easy and relatively convenient in Java where the GWT compiler creates that for you. You'd have to reverse engineer that for PHP.

If you want a rich UI with a PHP backend I'd suggest you look at YUI or ExtJS (among others).

cletus
+1 Thanks cletus. I must admit that I'm new to GWT so I was not aware of non-transparency of GWT-RPC.
Viet
+1  A: 

Have you tried http://www.gwtphp.com/ ?

I don't have any experience with GWT, and what @cletus is saying may be true, but there do appear to be several projects providing mechanisms for using a PHP backend with GWT.

pix0r
That particular framework isn't available to the public yet. Ergo, you won't find any sites using it.
cletus
A: 

Just for completeness, GWTPHP claims to support GWT-RPC fully. PHP source is available at sourceforge. But the project is not updated since May 2008, although a fix for GWT 2.0 is mentioned in the issue list.

It is required to update the php interface code each time after you have compiled the GWT client. But this can be done automatically. See the wiki pages for more information.

I have not tried it myself, so it would be nice after someone has tried it, to add a comment or update this text.

Wimmel