Ironing down the JBoss Seam
Not just another Java framework
Book review We might as well get this over and done at the outset. Yes, JBoss Seam is another Java framework. I know, you thought there couldn't possibly be any room for another one, but you're wrong.
What's more, it's another Java EE framework, built to make life for the enterprise developer more productive, more efficient, more interesting etc etc.
All the usual suspects are present here: object relation mapping, database persistence, transactions, inversion of control, the model-view-controller design pattern, and so on.
However, Seam is different. The obvious influence of Ruby on Rails is visible. The lure of Ajax and rich internet applications (RIA) is here. And there's plenty of Java here too, in case you were wondering.
The intention of Seam is to take a lot of the pain out of Java EE – no screeds of XML configuration, no brittle dependencies, an easier "code deploy debug" cycle, an easy way to get the most out of existing tools such as Hibernate, Java Server Faces, and Ajax.
What's more, it takes a leaf out of the Ruby On Rails book, as much of the work as possible is done for the developer up front. And, to a greater or lesser extent, that's what Seam succeeds in doing.
The authors manage to squeeze a fair chunk of material into this book, starting with a basic introduction to Seam, with a quick run-down of the aims and benefits it provides before launching into the compulsory "Hello World" example in the second chapter. This being a web application, of course, there's more to this simple example than a page that loads a simple "Hello World" message. From then on the examples become more elaborate or are geared to illustrating particular aspects of the platform.
For example, there is a complete section of the book devoted to creating stateful applications (HTTP not being a stateful protocol means that developers need to carry state with them as an application moves from page to page). Seam applications are stateful by default, but there's a fair amount of functionality and detail involved in something as complex as a shopping basket application. In the case of Seam there's even functionality to create complete workspaces, in much the same way that an IDE has a workspace.
More advanced material looks at business rule processing, rule-based security, two chapters dedicated to testing, a number of chapters on deployment and productionising, and more. Oh, and there's IDE support for NetBeans and Eclipse covered as well.
The book features lots of code, but the reader is really expected to have downloaded and installed the samples. The writing tends to be clear and easy to get to grips with, though there are times when a little more of the why rather than the how would have been useful. That said, there's a lot to be gained from the book and it's certainly not as dry as many Java EE books tend to be.
Verdict: Whether Seam will change the world is open to question, but there's no disputing the increasing interest that it's attracting, and this book is a great introduction to it.
Author: Michael Juntao Yuan and Thomas Huete
Publisher: Prentice Hall
List Price: £28.99
Current Reg price: £19.13 inc VAT (discount 34 per cent)
Buy this book at Register Books, at Reg Developer's special discounted price (subject to change).