PacktLib: Google App Engine Java and GWT Application Development

Google App Engine Java and GWT Application Development


About the Authors

About the Reviewers



Overview of the chapter

Introduction to Google App Engine

Example application:

Online resources


Using Eclipse and the Google Plugin

Installing the plugin and supporting software

Developing your application in Eclipse

Running and debugging your application

Deploying your application

Importing an existing application


Building the Connectr User Interface with GWT

Installing the (first version of) the project in Eclipse

AJAX and its benefits

Why AJAX apps are the way forward

Challenges associated with AJAX programming and how GWT solves them

Google Web Toolkit overview—modern tools for modern developers

Building the application—the user interface

Grouping CSS files and images for faster speed with ClientBundle

Getting data from the server using GWT RPC


Persisting Data: The App Engine Datastore


The Datastore


Creating Connectr's data models

Inspecting the Datastore



JDO Object Relationships and Queries

Modeling relationships between objects

Finding objects—queries and indexes

The App Engine Datastore index


Implementing MVP, an Event Bus, and Other GWT Patterns

Introducing MVP – The need for design patterns in software

Introduction to MVP

Connectr MVP application architecture overview

Coding MVP into Connectr

Events and the event bus

Adding support for browser history

Implementing browser history management

Centralizing RPC calls for better handling and usability and reliability

MVP Development with Activities and Places


Background Processing and Feed Management

Overview of the chapter

Using Servlets in App Engine

Using migrations to evolve the Datastore entities

Pulling in Feeds: The URL Fetch service

Using RSS/Atom feeds in the app

Enabling background feed updating and processing


Authentication using Twitter, Facebook OAuth, and Google Accounts

Connectr login implementation

OAuth: a new way to login and authorize

Integrating with Facebook

Registering Connectr with Facebook

Authenticating against Google

Authenticating against Twitter with OAuth

Logging out

Uniquely identifying Connectr users

Automatically registering users when they login


Robustness and Scalability: Transactions, Memcache, and Datastore Design

Data modeling and scalability

Using transactions

Using Memcache


Pushing Fresh Content to Clients with the Channel API

Why use push technology

Implementation overview

Setting up the application to handle pushed messages

Pushing messages to clients

Creating custom classes of pushed messages

Telling the server a client is inactive

Adding a refresh button to allow on-demand news updates


Managing and Backing Up your App Engine Application

Configuration and deployment

The Admin Console

Command-line administration

Using Appstats

Using your own domain for an app


Asynchronous Processing with Cron, Task Queue, and XMPP


Activity stream classes

Server-Side asynchronous processing

Supporting synchronous content delivery: Datastore queries and caching

XMPP: Information push to the app


Conclusion and Final Thoughts

What lies ahead for App Engine and GWT?