Oops Null Pointer

Java programming related

Book review: ExtGWT Rich Internet Application Cookbook

ExtGWT cookbook


The ExtGWT Cookbook from Packt Publishing covers the GXT UI framework version 2 (currently at 2.2.6) as well as a quick overview of key features of GWT and some ideas on building robust UI frameworks. While a good knowledge of GWT itself is recommended, this book could be used a basic primer of some of the required concepts.

I think it’s important to bring up that the version of GXT this book covers is now a major revision behind the latest: GXT 3.0.

A lot has changed in GXT 3.0 and thus some of the detail in the Cookbook is not applicable to projects using this version. Some examples are:

  • The GXT data model (BeanModel) is now replaced by POJOs (using GWT AutoBeans)
  • Wigets can now use UIBinder
  • GXT Event listeners are replaced by GWT handlers
  • The flash charts are replaced by a new JavaScript based chart package

So with that in mind, who is this book useful for? The GXT widgets are relatively unchanged and this book covers the set-up and options of nearly all the widgets in detail and is still helpful from this aspect. The book also covers some useful ideas for building robust UI frameworks; it explores the idea of an “action” that different views can share, each which their own set of supported options. For those who have existing investments in applications using GXT 2 or are just starting projects will find this book a great companion – I wish I had this book during the creation of my current application as it would of helped clarify some of the quirks in GXT and replace the rather lack lustre GXT documentation. It also would of added some depth in the architecture, reducing repetition and linking related components.


The ExtGWT Cookbook’s layout is code heavy – in a good way. Each recipe follows the format of a description of a feature, a “how do do it” code section and a detailed “how it works” line by line breakdown of the code. In this way you are rarely left wondering what a line of code does and any GXT quirks are normally highlighted and explained.

The progression of the examples builds well through each chapter and in the same way the chapters tend to naturally flow on from one another, so the book can be read linearly, but each chapter is self contained enough that you can jump into a recipe with little reference to other sections.

The main documentation that GXT provides is the API and a set of examples with code. While better than nothing, they often are not enough to cover real life scenarios or they leave important options out. The ExtGWT Cookbook has more examples with a focus on building practical applications, and importantly the examples are detailed and backed by a comprehensive description.

I felt the detail and relevance was typically compelling enough to encourage reading through whole chapters. Nearly ever chapter covered a new aspect or feature that I hadn’t previously been aware of, making reading this book worthwhile.


The first three chapters cover the basic elements of panels, windows, tabs and “click-ware” (buttons, toolbars and menus). The section on tabs shows real world experience in the example which toggles the tab strip based on the number of tabs. The last recipe of chatper 3 “Bind a single action to several click-wares” introduces a useful pattern to relate an underlying action or behaviour to different representations that is elaborated and expanded in Chapter 11 in the recipe “A novel UI with MVP, actions and a bus”.

The next four chapters cover GXT specific layouts, trees and grids with enough thoroughness to provide a good head start in using these components.

Chapter 8 covers the GXT templates which allow the modification of views within components with easy access to model data properties. This was a topic that I found GXT’s own documentation was particularly unhelpful, while this chapter succinctly covered with several handy examples.

The built in charts are well covered in Chapter 9, although few would find this flash based package very useful (especially for mobile devices). The last recipe “Drawing on a canvas” hints at alternatives, but for detailed charts look to GXT 3 or an external library.

The chapters “Drag-and-drop”  (chapter 10) and “Theming” (chapter 12) adequately explain these topics and the appendices provide thoughtful coverage of topics that GWT developers need to know.

I found the “Advanced Tips” chapter (11) the most useful and insightful as it covered important architectural concepts for larger applications (MVP, History, working with persistence frameworks). Having gone through the pain of building similar patterns before they were more commonly discussed for GWT projects, I like the way this chapter helps lay the foundations of testable and robust GWT based software. The working server push recipe was also stimulates thoughts on building more interactive applications.


In all the ExtGWT Cookbook is a very detailed and comprehensive overview of GXT 2.x. It inspired me to read the whole thing cover to cover and I only really didn’t learn something from the charts chapter as we have moved to Highcharts (and GXT has moved to a new JavaScript based charting framework in GXT 3).

There are some aspects of GXT’s layout system that were (for me) difficult to deal with that are not covered in this book – in particular deeply nested layouts and using components in resizable windows (say a grid in a portlet in a resizeable window). The GXT documentation avoided complicated layouts and the cookbook’s layouts are typically not too complicated either. This book is aimed at the beginner to intermediate as it lacks some depth in relation to constructing large / complicated GXT based applications, but it still has enough detail to learn some useful tips from.

I’d look forward to a GXT 3 version by the same authors, especially if it covered some more advanced patterns.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: