PacktLib: Google App Engine Java and GWT Application Development

Google App Engine Java and GWT Application Development

Credits

About the Authors

About the Reviewers

Preface

Introduction

Overview of the chapter

Introduction to Google App Engine

Example application:

Online resources

Summary

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

Summary

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

Summary

Persisting Data: The App Engine Datastore

Introduction

The Datastore

JDO

Creating Connectr's data models

Inspecting the Datastore

Resources

Summary

JDO Object Relationships and Queries

Modeling relationships between objects

Finding objects—queries and indexes

The App Engine Datastore index

Summary

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

Summary

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

Summary

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

Summary

Robustness and Scalability: Transactions, Memcache, and Datastore Design

Data modeling and scalability

Using transactions

Using Memcache

Summary

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

Summary

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

Summary

Asynchronous Processing with Cron, Task Queue, and XMPP

Introduction

Activity stream classes

Server-Side asynchronous processing

Supporting synchronous content delivery: Datastore queries and caching

XMPP: Information push to the app

Summary

Conclusion and Final Thoughts

What lies ahead for App Engine and GWT?

Index