GWT with PHP

105 views
Skip to first unread message

SIERRA ODC

unread,
Sep 3, 2020, 6:33:51 AM9/3/20
to GWT Users
Hi
I noted that GWT can be used with PHP. Could you please share reference links of basic tutorial for using PHP with GWT.
Thanks

poseidonjm

unread,
Sep 3, 2020, 7:16:40 AM9/3/20
to GWT Users
Hello
In the past I made a small example of gwt and php and I wrote a blogpost 
https://vivagwt.blogspot.com/2012/12/gwt-and-php.html
While the blog is outdated and the example code may not run but You could use it as reference.
The example use GXT for UI and GWT's RequestBuilder and AutoBeans for communication with the server.

Hope it helps.

Thomas Broyer

unread,
Sep 3, 2020, 7:39:32 AM9/3/20
to GWT Users
GWT can be used with PHP the same as jQuery, Angular, React, Babel, TypeScript, etc. can be used with PHP.

You won't be able to use GWT-RPC or RequestFactory to communicate with your server, but most people have moved away from these for new projects anyway: you can use GWT's RequestBuilder, raw XMLHttpRequest, or fetch() to make HTTP requests to your server where the PHP code runs, with JsInterop to map JSON responses to Java objects; or you could go with things like domino-rest.

For running your code during development, you'll want to use the CodeServer with -launcherDir pointing to your Apache DocumentRoot (or whatever equivalent tooling you're using to serve your PHP code), or DevMode in -noserver mode (with -war pointing to the DocumentRoot in this case)

I'm afraid I don't have tutorials though, even less ones that would be up-to-date with GWT tooling and state-of-the-art…
Reply all
Reply to author
Forward
0 new messages