Saturday, June 12, 2010

Re: GWT front-end with PHP backend

Hi Rajath,

I've been using GWT with PHP backends, almost exclusively, with great
success. The GWT docs have a pretty good tutorial.
http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html#client

Just ignore Section 1 ("Creating a source of JSON data"), which talks
about implementing the server-side in Java. It sounds like you have
the server-side portion of the work already done.

The GWT-created js files do not have to be served from a Java server;
they are just served as static files like any other
standard .html, .jpg, .gif, .js, etc. files. You can serve them from
the same server running PHP. If you serve the js files from a server
on a domain other than the server providing the JSON, you will need to
watch out for the same origin policy (http://en.wikipedia.org/wiki/
Same_origin_policy).

Tyler


On Jun 11, 12:17 pm, rajath <rsdso...@gmail.com> wrote:
> Hi all,
> I recently tried my hand with GWT hosted on GAE/J, and found it to be
> really good, especially considering that i did not have to learn
> javascript. I want to try to build the front end with GWT, but for the
> back end, we already have a php server which gives json data over
> restful urls.
>
> I have read in other places that the communication between GWT and php
> can happen with a few tweaks. My questions are related to the
> following, which is confusing me - does the gwt-created js files have
> to be served from a Java-server (or GAE)? Is there some way for the
> php server that we have to serve these js files?
>
> Any help would be much appreciated. Thanks, Rajath

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate