Google App Engine Java and GWT Application Development

The challenges of building AJAX web applications with Java are brilliantly answered in this guide that walks you through GAE and GWT in easy steps. Packed full of useful examples and crystal clear instructions.

Google App Engine Java and GWT Application Development

Starting
Daniel Guermeur, Amy Unruh

The challenges of building AJAX web applications with Java are brilliantly answered in this guide that walks you through GAE and GWT in easy steps. Packed full of useful examples and crystal clear instructions.
$24.00
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook
$12.99 p/month

Want this title & more? Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.
+ Collection
Free Sample

Book Details

ISBN 139781849690447
Paperback480 pages

About This Book

  • Comprehensive coverage of building scalable, modular, and maintainable applications with GWT and GAE using Java
  • Leverage the Google App Engine services and enhance your app functionality and performance
  • Integrate your application with Google Accounts, Facebook, and Twitter
  • Safely deploy, monitor, and maintain your GAE applications
  • A practical guide with a step-by-step approach that helps you build an application in stages

Who This Book Is For

If you are a developer with prior programming experience of Java development and object-oriented programming and want to understand the key concepts of how to build AJAX web applications with Java, then this book is for you. The book assumes some previous exposure to the basics of using GWT, for example at the level of Google's online introductory GWT tutorials. You don't need to know anything about Google App Engine. This book will teach you everything you need.

Table of Contents

Chapter 1: Introduction
Overview of the chapter
Introduction to Google App Engine
Example application:
Online resources
Summary
Chapter 2: 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
Chapter 3: 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
Chapter 4: Persisting Data: The App Engine Datastore
Introduction
The Datastore
JDO
Creating Connectr's data models
Inspecting the Datastore
Resources
Summary
Chapter 5: JDO Object Relationships and Queries
Modeling relationships between objects
Finding objects—queries and indexes
The App Engine Datastore index
Summary
Chapter 6: 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
Chapter 7: 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
Chapter 8: 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
Chapter 9: Robustness and Scalability: Transactions, Memcache, and Datastore Design
Data modeling and scalability
Using transactions
Using Memcache
Summary
Chapter 10: 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
Chapter 11: 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
Chapter 12: 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
Chapter 13: Conclusion and Final Thoughts
What lies ahead for App Engine and GWT?

What You Will Learn

  • Develop state-of-the-art AJAX web applications with optimized JavaScript using GAE and GWT
  • Explore the basics of using Eclipse via a sample GWT/Google App Engine application generated automatically by the Google plugin
  • Learn how GWT works as an AJAX framework, and why it makes you more productive as a developer
  • Use GWT RPC for easy client-server communication
  • Develop a GWT + App Engine application locally and use Eclipse for "one-click" deployment
  • Construct GWT user-interface elements using UIBinder, so that layout and style information is separated from logic
  • Integrate your application with Google Accounts, Facebook, and Twitter for user authentication and information retrieval
  • Delve deeper, to investigate datastore-related ways to help increase the robustness, speed, and scalability of an App Engine app, and apply these techniques to our "Connectr" application
  • Configure, deploy, monitor, and maintain an App Engine application

 

In Detail

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.

Authors

Table of Contents

Chapter 1: Introduction
Overview of the chapter
Introduction to Google App Engine
Example application:
Online resources
Summary
Chapter 2: 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
Chapter 3: 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
Chapter 4: Persisting Data: The App Engine Datastore
Introduction
The Datastore
JDO
Creating Connectr's data models
Inspecting the Datastore
Resources
Summary
Chapter 5: JDO Object Relationships and Queries
Modeling relationships between objects
Finding objects—queries and indexes
The App Engine Datastore index
Summary
Chapter 6: 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
Chapter 7: 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
Chapter 8: 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
Chapter 9: Robustness and Scalability: Transactions, Memcache, and Datastore Design
Data modeling and scalability
Using transactions
Using Memcache
Summary
Chapter 10: 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
Chapter 11: 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
Chapter 12: 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
Chapter 13: Conclusion and Final Thoughts
What lies ahead for App Engine and GWT?

Book Details

ISBN 139781849690447
Paperback480 pages
Read More