Google App Engine Java and GWT Application Development

Daniel Guermeur, Amy Unruh

Mentioned 2

Google Application Engine is a cloud computing technology that lets you run web applications that are easy to build and maintain as well as being scaled and load-balanced automatically. To build interesting and interactive web applications developers are turning to Java. However, building and deploying scalable web applications using Google Web Toolkit and Google App Engine for Java can be challenging even to developers. The start to finish approach of this book helps you meet these challenges. This book is designed to give developers all the information they need to develop their own GAE+GWT applications, with a particular focus on some of the technologies useful for building scalable social-media-oriented applications. It is an easy-to-follow guide that shows you how to get the most out of combining the powerful features of GAE and GWT. It provides you with solutions to many of the problems that arise in developing, maintaining, and scaling web applications. The book introduces you to the features of Google App Engine (GAE) and the Google Web Toolkit (GWT) to help you build interesting and interactive real-world AJAX applications. Over the course of the book, you are guided by the development of a sample application using the Google Web Toolkit (GWT) plugin for Eclipse. To make things easier for you, all application building blocks are explained in detail, walking you through the development process step by step. The book teaches you the key technologies and methodologies that can be applied to developing your application locally, enhancing your application functionality and accelerating performance, integrating your application with Google Accounts, Facebook, and Twitter as well as monitoring and maintaining your web application. Packed with great examples and clear explanations, you will be able to build your own web applications that are scalable and reliable using GAE and GWT with Java. Build a real-world interactive web application in the cloud using GAE/J and GWT, with Push, background processing, OAuth, social media APIs, and more

More on Amazon.com

Mentioned in questions and answers.

I am trying to learn GWT, but have no clue about the same.

I have a java background and have all through my years of experience worked on Struts, Spring, Grails and such MVC Frameworks.

I am to learn GWT for a project and am looking for help as to how I can go about it.

Could someone give me an idea of the learning curve when it comes to a technology like this.

Thanks in advance!

The GWT documentation is a good starting point and watch the Google I/O presentations on GWT, start with the most recent it covers the newer features.

But if you (also) want to read a book make sure it's a recent version. GWT changes fast, and therefor most books are rather outdated. Actually some of the newer GWT features are not or very briefly covered in currently available books.

Here are 3 books which are more recent:

GWT in Action, Second Edition

Essential GWT: Building for the Web with Google Web Toolkit 2

Google App Engine Java and GWT Application Development (While this book covers also Google App Engine, it contains a lot of usefull examples)

I would avoid starting with Ext GWT, as it's a framework build upon GWT. Just learn the GWT basics and then decide if you want to use and additional framework.

I try to optimize my GAE. This is my model :

Game : id , status, players ... and List ;
Round : id , name, desc ... ;

I got relationships between Game and Round : 1-N

The problem is I can't request a Game without his all Round or specific field.

I have already tried this :

Query query = pm.newQuery(Game.class);
ArrayList<Game> allgame = new ArrayList<Game>();
query.setResult("id, status");
allgame.addAll((Collection<? extends Game>) query.execute());

and

Query query = pm.newQuery("SELECT id, status FROM com.ws.model.Game");
ArrayList<Object> allgame = new ArrayList<Object>();
allgame.addAll((Collection<? extends Object>) query.execute());

I'm using the PersistenceManagerFactory and JDO v1. I really want to reduce my read cost by not request all child (Round)

Thanks

When an object is retrieved from the datastore by JDO, only the called fetch group is retrieved. Unindexed properties including Text and Blob are not retrieved by default. This means that serialized field values (as your Round objects) will not be retrieved by default. This is called lazy loading.*

To get only certain fieds you can use a query like this:

        query = pm.newQuery("SELECT status, players FROM " +
                Game.class.getName() + " WHERE xy == :xy);

Remember that in this case the fields you retrieve must be indexed.

Hope this helps.

*REF: Google App Engine Java and GWT Application Development