Geertjan's Blog

  • August 11, 2008

Wicket in Action: Undoubtedly The Wicket Bible

Geertjan Wielenga
Product Manager
Without question, Wicket in Action, soon to be released by Manning, is the be-all and end-all when it comes to Wicket. How could it be otherwise, since it is written by two of its core members and key players, Martijn Dashorst and Eelco Hillenius? I've been lucky enough to have been given a chance to examine it prior to its release... and here are my impressions.

First of all, if you're new to Wicket look no further. "Wicket in Action" provides everything you need. In particular for beginners, chapter 4 ("Building a cheesy Wicket application") is excellent: it shows you step by step how to create a pretty advanced Wicket application... and covers 30 pages. That's pretty impressive and it's a very thorough introduction to what Wicket offers you. My favorite aspects of Wicket are (1) its separation of concerns between design (HTML) and coding (Java) and (2) its component model for Ajax (hurray, this means no need to touch JavaScript at all, while still getting partial page refresh). Both these aspects are dealt with at length in the book, as well as a myriad of others, in fact everything that Wicket is about is covered in detail in this book. I have read large chunks of the book in great detail, and I worked through all the code samples in the first half, and have found it very thorough and detailed.

Here's a quick break down of the sections: "Part 1: Getting Started with Wicket" ("What is Wicket?", "The architecture of Wicket", "Setting up a Wicket Project", "Creating a cheesy Wicket application"), "Part 2: Getting a basic grip on Wicket" ("Understanding models", "Using basic components", "Using forms for data entry", "Composing your pages"), "Part 3: Advanced Wicket" ("Creating Custom Components", "Working with Wicket resources", "Rich Components and Ajax", "Authentication and authorization", "Localization", "Multi-tiered architecture", "Putting your application in production", "Component index").

As you can see from the above, it's a very meaty book (375 pages in my review copy). After the first section, which is mostly architectural and introductory, a set of themes are covered in part 2. It's really good that the first of these themes is "Wicket models", since that's just about the most complex area in Wicket, because it is quite foreign to web frameworks. However, if you think of Swing development, then models aren't so foreign anymore. Both in Swing and in Wicket, models serve as abstraction layers for working with data, which is a comparison that could be made more strongly in this book. Each of the models is discussed in great detail with a lot of very practical (and compilable) code snippets throughout.

One quirky aspect of this book is its reliance on cheese as a metaphor for application development. (E.g: "[K]nowing what a lasagna is and how it tastes is not enough to create your own lasagna. You will need to know which ingredients you
need, when and how to apply them.") In fact, the example application built in chapter 4 is an on-line cheese store. This is a pretty fun approach and the digressions into the world of cheese, with which most chapters begin, provide useful relief from the intensity of the world of code.

It is a well written book, presented with the enthusiasm that is typical of those who are steeped in everything the framework provides and have the gift of explaining it all, step by step. Both beginners and more advanced Wicket users should grab this one as soon as it is available.

Join the discussion

Comments ( 2 )
  • Emiel Monday, August 11, 2008

    I agree it is a musthave book for everyone wanting to work with Wicket, but to me the cheese episodes where a bit of a turnoff. They are, well, quite cheesy.

  • Mark Derricutt Tuesday, August 12, 2008

    Emiel - if cheese isn't your thing, maybe the 2nd edition can come with a chapter on crackers just for you.

    Whilst cheese is as you say, cheesey - I think it also reflect the type of projects a lot of people deal with, and the fact the entire application sits inside the book is SOO much better than just having examples and snippets.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.