2
votes

I am planning on building a GWT app that will be deployed to GAE. In addition to the normal (GWT) web client, the server-side code will service requests from other clients besides just the web app. Specifically, it will host a RESTful API that can be hit from any HTTP-compliant client, and it will also service requests from native apps on iOS and Android.

If my understanding of GWT is correct, it's your job to code up both the client-side code (which includes the AJAX requests your app makes back to the server) as well as the server-side request handlers.

This got me thinking: why do I need to package the web client and the web server inside the same WAR? This forces me to (essentially) re-deploy the client-side code every time I want to make a change to the backend. Probably not a big deal, but if I don't have to, I'd prefer to honor "separation of concerns".

So I ask: is there a way to essentially deploy a Java-less WAR on GAE in such a way that it just serves pure HTML/JS/CSS back to any clients that will use it, and to then deploy the server-side in its own WAR, and some how link the two up? Thanks in advance!

3

3 Answers

1
votes

The WAR is just for the server side. It includes the client-side classes needed for serializing objects passed between client and server: obviously, both sides need implementations of the same objects in order to handle those objects.

I don't think it will save you any effort or development time to separate the two concerns, but if you really want to, then you can rework your client/server interaction using something other than GWT-RPC. For example, JSON. See https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideHttpRequests for discussion of your options if you want to go down that road.

0
votes

No, AFAIK, you can not do partial update in GAE, i.e. you can not upload a part of the project to GAE instance and then upload in a separate upload another part (and so separating HTNML/JS/CSS to java classes).

-1
votes

Hopefully this is what you are looking for.

Finally the main stub that you want to deploy might be EAR file which you can mention in main pom.xml