Tuesday, January 15, 2013

Book Review: GateIn Cookbook

I recently accepted an invitation to provide a review of a relatively recently released (publication date is listed as November 2012) Packt Publishing book called GateIn Cookbook. This book is, as its name implies, about the JBoss/eXo collaborative GateIn Portal. The cover of the book offers "quick answers to common problems" and describes its contents as "over 60 recipes for building portals with GateIn." Although I am familiar with the portal concept and looked at them in some detail several years ago, it has been a while since I've seriously considered portal technology and I looked forward to reading a book on GateIn.

Including index, preface, table of contents, introductory pages, etc., GateIn Cookbook is nearly 400 pages and is written by three authors: Ken Finnigan ("Technical Lead of the JBoss Portlet Bridge project and a member of the GateIn Development team" at JBoss), Luca Stancapiano, and Piergiorgio Lucidi (Sourcesense).

The Preface

The Preface of GateIn Cookbook states that the book provides "a quick approach to building portals" and is written for "anyone who needs to administer or develop applications on GateIn." According to the Preface, the reader will benefit from familiarity with Java and REST and should have access to one of the three major operating systems (Linux, Mac OX S, Windows), JDK 1.6, Eclipse IDE (to use Eclipse-based JBoss tools, but other Maven-supporting IDEs can be used as well with GateIn and most of the recipes will be workable with any modern Java IDE), Apache Subversion ("latest version"), Apache Maven ("latest version"), and "GateIn Portal 3.2.0 and beyond" to run examples provided in GateIn Cookbook.

Chapter 1: Getting Started

As its title suggests, Chapter 1 is about getting started with GateIn. It seems that "cookbooks" used to assume introductory knowledge and focused on more intermediate and advanced recipes. More recently, it seems to have become more customary for the initial chapters of cookbooks to have more introductory material. I think this is an advantage because it allows the read to use the same book to learn enough basics to start using the new technology.

Chapter 1 introduces GateIn with this description:

GateIn is a portal framework dedicated to implementing highly customizable portal solutions with a powerful set of components based on well-known and adopted open source technologies and standards based on the Java web technologies.

Chapter 1 covers installation of GateIn from a binary package for application/web server-specific bundles for three major versions of JBoss (5.x, 6.x, 7.x), two major versions of Tomcat (6.x, 7.x), and Jetty 6.x. Most of the recipes in the book focus on Tomcat and JBoss AS 6 or 7. Another section of Chapter 1 describes building GateIn from source code retrieved using Subversion and built using Maven.

A recipe in Chapter 1 discusses use of eXo JCR as a JSR 170 Java content repository and PicketLink IDM as a "a common identity model for Identity Management operations." That section also looks at replacing the provided HypersonicSQL database with an Oracle database and with a MySQL database via JDBC driver configuration.

Chapter 1 of GateIn Cookbook has one non-trivial error that I noticed. The authors write that the reader can determine whether the JDK is installed (as opposed to the JRE only being installed I imagine) by running java -version and looking at which version of the JVM is returned by default. Specifically, they state that the presence of the "String Client" indicates the JDK is not installed and the presence of the "String Server" indicates that the JDK is installed. This is not correct.

Chapter 2: Managing Portal Contents Using the GUI

The second chapter discusses GateIn administration using GateIn's "default administration tools" using the graphical dashboard. The covered administrative tasks include creating a portal instance, removing a portal instance, allowing public access to the portal, changing portal layout, creating and removing page instances within a portal, and using/contrasting portlets and gadgets in a portal instance. Not surprisingly for a chapter on graphical administration, this chapter is full of screen snapshots.

Chapter 3: Managing Portal Contents Using XML

The third chapter covers similar material as the second chapter, but demonstrates administration via XML and command-line tooling rather than graphical tooling. Reading Chapters 2 and 3 helps one to see how much easier the graphical interface is than the XML, which seems to me to quickly become unwieldy as the XML files get large.

Chapter 4: Managing Portal Users

The fourth chapter of GateIn Cookbook is about user administration and covers recipes related to creating users, removing users, managing memberships, managing groups, and assigning users to groups. Other recipes in this chapter cover LDAP integration, use of OpenSSO, and use of Simple and Protected GSSAPI Negotiation Mechanism.

Chapter 5: Securing Portal Contents

Chapter 5 of GateIn Cookbook "discusses the configurations aimed at providing security features to portals and all the related components." While Chapter 4 covered authentication, Chapter 5 covers authorization. Its recipes include securing portals, securing pages, securing portlets, and securing applications.

Chapter 6: Developing Portlets

Chapter 6 introduces portlets and the Portlet 2.0 specification (JSR 286) and uses JavaServer Pages (JSP) as the primary view technology. The chapter outlines the basics of applying portlets and summarizes the "three main parts to a portlet": a portlet class, view technology (JSP), and deployment descriptor. Recipes in this chapter also cover multiple ways of communicating between portlets and localizing portlets.

Chapter 7: Developing Using Components API

The seventh chapter of GateIn Cookbook introduces the GateIn-provided "web framework named WebUI (Web User Interface)" and describes it as "similar to JSF because it is based on components." The chapter also mentions that "GateIn has about 400 components provided by WebUI." The chapter shows use of XML for configuration or alternative annotations for configuration. Other recipes include use of Groovy templates and embedding JavaScript in portlets.

Chapter 8: Migrating from Existing Portals

GateIn Cookbook's eighth chapter covers migration from an existing portal to GateIn and introduces JSR 329 ("Portlet 2.0 Bridge for JavaServerTM Faces 1.2 Specification"). One recipe in this chapter focuses on migration from JBoss Portal to GateIn and another recipe focuses on migration of a Liferay portlet to GateIn.

Chapter 9: Managing Gadgets

The ninth chapter of GateIn Cookbook introduces Gadgets and outlines the advantages of Gadgets. The recipes of this chapter make use of Google Gadgets. This is another image-heavy chapter showing different gadgets in place.

Chapter 10: Frameworks in a Portal

The tenth chapter of GateIn Cookbook discussed integration of frameworks with portal development and specifically focuses on use of JavaServer Faces (JSF). Other recipes also cover use of jQuery and RichFaces 4 with portlets.

Chapter 11: Managing Portal Resources with the Management Component

Chapter 11 introduces the management component and describes its purpose as "[enabling] portal resources to be managed over common interfaces such as RESTful Service interfaces, Command Line Interfaces (CLI), and portlets." The CRaSH-based tool CLI tool is demonstrated in a recipe as is exporting a page via a RESTful interface.

Chapter 12: Managing Documents Using External ECM Systems

The final chapter of GateIn Cookbook discusses "Creating a portlet" to integrate with four "Enterprise Content Management (ECM) systems": JBoss ModeShape, Apache JackRabbit, Alfresco using Spring WebScripts, and a Content Management Interoperability Services (CMIS) repository.

Conclusion

I only had a cursory knowledge of portals and portlets before reviewing GateIn Cookbook, but definitely feel more comfortable with those concepts after reviewing this book. It provides general information on portals and portlets with specific focus on implementing portals with GateIn. There are numerous screen snapshots and lots of code (mostly XML, but also Java, Groovy, JavaScript, and more). If I find myself using the GateIn Portal for my next application, GateIn Cookbook would be a good book to have on hand. I found my previous experience with Java, XML, and REST to be useful in more quickly understanding thebook's contents.

1 comment:

Piergiorgio Lucidi said...

Hi Dustin,

thank you for your review and for reporting the error. We are working on resolving it as soon as possible.

Have a nice day!