Introduction

Over the last couple of years, we've noticed that our customers have gotten more demanding when it comes to the usability of their web applications. Inspired by the "web 2.0" trend and applications such as Gmail and the like, we've tried many approaches to building these rich Internet applications (RIAs). But all of these had one big flaw: they required us to learn a different language, including adhering to a whole new set of conventions and best practices. Only with the introduction of Google Web Toolkit (GWT) have we begun to feel confident about building this kind of application in a maintainable fashion.

This book introduces GWT within the context just described, and will guide you through the first steps of using it to build real-world applications. The goal is to get you as a Java developer up to speed quickly by providing just enough background and a lot of hands-on code samples. During the course of the book, we'll guide you through the different aspects of GWT that we feel are important, and leave out the ones we feel are out-of-scope for beginners. Most of the code samples will gradually build to make up a real-world sample application that allows you to manage your tasks using a web application.

After reading this book, you'll be equipped with the necessary knowledge and tools to start building real-world applications using GWT.

Who This Book Is For

This book is intended for Java developers who wish to reuse their Java expertise for writing complex rich Internet applications using the GWT framework. It can also serve those developers who have extensive knowledge of other web development technologies such as JavaScript and HTML, as GWT helps abstract away one of the biggest challenges in such development: browser compatibility and client-side performance.

How This Book Is Structured

This book is divided into eight chapters:

Chapter 1 introduces the basic concepts of contemporary rich Internet application development. It walks you through the history of web application development and provides a solid basic knowledge of the technologies that drive modern Web 2.0 applications in general and GWT positioning in particular.

Chapter 2 introduces you to GWT. This chapter details the basic concepts of GWT, the problems it was designed to solve, and its inner workings. You'll learn about the anatomy of a typical GWT application, and will also be introduced to the GWTasks sample application (a task management application) you'll be developing along with the book.

Chapter 3 gives you all the tools to get started with GWT. It teaches you how to create a simple GWT project from scratch, run it, and debug it. It's highly recommended that you not skip this chapter, as the following chapters rely on the knowledge it provides.

Chapter 4 shows how to develop GWT application in more detail. It introduces the basic components that are available for you to use when creating GWT user interfaces. It introduces some of the more common widgets and panels that will be used to develop an initial version of the sample application.

Chapter 5 builds on the knowledge gained in the previous chapter and introduces more advanced UI components. Among other things, you'll learn how to create your own custom UI elements that can be reused in any application. This chapter also discusses the role of the application architecture and design from the software development perspective, and provides tools to build robust, extensible, and maintainable code bases for your application. All techniques learned in this chapter will be put to action and applied on the sample application.

Chapter 6 introduces server-side communication and how it can be done in GWT applications. It explains the basics of such communication and covers the various mechanisms supported by GWT. By the end of this chapter, the GWTasks application will be a full-blown task management application with a solid server-side back end.

Chapter 7 discusses the important role testing has in the application development process. It introduces the different types of testing, from fine-grained unit testing to full-blown functional testing using third-party tools such as Selenium.

Chapter 8 enriches your knowledge and GWT expertise by discussing some of the more advanced features GWT has to offer. Each section in this chapter is dedicated to a specific topic that will help you build better and more advanced GWT applications. As opposed to the other chapters, each section in this chapter can be read independently of the others.

This book was specially structured to get you up-to-speed with GWT in a more efficient and practical manner. The sample application plays a major role in it, as it serves as a concrete example of how the theory can be applied.

Prerequisites

We assume that you have a good understanding of the Java programming language and are at least familiar with Java 5 features such as generics, annotations, and enum types. A good understanding of basic HTML is required as well, and knowledge of JavaScript will serve as an advantage (though it's not a requirement).

Downloading the Code

The code for the examples and the sample application in this book is available to readers in the Download section of the Apress web site at http://www.apress.com. Each chapter has associated code examples and optionally a relevant sample application version. Please feel free to visit the Apress web site and download all the code there. You can also check for errata and find related titles from Apress.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.39.16