You can rent this space for 30 days. Interested?

Monday, April 14, 2008

Using Java (GWT) with Google App Engine

Since Google App Engine (GAE) announcement many developers are wondering when/if Google App Engine will support Java. As we already know GAE currently supports only Phyton.

Do Java developers have to wait for Java support in GAE? In my opinion, no.

Google App Engine can be used to host any HTML/JavaScript based application. In that scenario we still need Python, but only as a tool for application deployment.

First screencast shows exactly that:
  • Python installation (Windows).
  • GWT application deployment on GAE.

If you are not familiar with GWT you may want to take a look at the previous screencasts.

Install Python and deploy GWT app (03:10):

Certainly, GAE is much more than just a hosting platform.
GAE provides APIs for the datastore, Google Accounts, URL fetch and email services.

Problem (or opportunity?) for Java developers is that GAE API is available only for Python.

After two afternoons of Learning Python, and copying/pasting from GAE tutorials I was able to modify previous example to use GAE URL fetch API.

Here is the screencast (02:30):

Instead of conclusion:

For web application development, more work has to be done on the client-side – especially for AJAX apps. GWT does a great job in making that easier. Almost every AJAX application needs to communicate with the server and the server-side is where scalability (GAE) is needed.

This screencast shows a JSON sample, because I expect to see many approaches (frameworks) that will enable us to wrap GAE API in JSON messages.

"Any problem in computer science can be solved with another layer of indirection" [Wheeler] so I don't think that the "Python only" is an issue.

The same argument (or architecture) can be used if you are afraid of “platform lock-in”. After decades of "architectural patterns" is it really so hard to decouple client-code from GAE services?

If you liked this post, share it with others using the links below.

5 comments:

Pavan said...

Nice article.

majo said...

I invite you to look at http://code.google.com/p/python-gwt-rpc/, I write some small but usefully library.

vojko said...

Interesting! Thanks!

Vladimir said...

Great article

robin79 said...

Indeed exactly what I was looking for. I am currently planning a application for GAE and was fearing to be forced to code the UI parts in Python. As a Java developer I am feeling much more familiar with GWT.. :)

 
You can rent this space for 30 days. Interested?