Wicket is a framework that makes building web applications easier and more fun. It boasts an object-oriented programming model that encourages you to write maintainable code and helps you scale your development effort with its facilities for reusable components and separation of concerns.
This book will show you how Wicket works and how you can use it effectively to write web applications, and it will point out the occasional gotcha. It covers a broad range of topics relevant to programmers who are in the business of building web applications.
If youre new to Wicket, youre probably best off following the sections (and chapters) in order.
Chapters 1 and 2 give you a high-level overview of what Wicket is and what kind of problems it tries to solve. If youre already experienced with Wicket, you should still read the first two chapters, because they explain the framework from our perspective. Chapter 3 gives you a quick example of how to develop an application with Wicket. After reading this chapter, youll have a good idea of what developing with Wicket looks like, and although the chapter doesnt explain all the code in detail, youll pick up a few things intuitively.
Part 2 covers you all you need to know to develop straightforward web applications with Wicket. Chapter 4 starts out with an in-depth explanation of models, which is something many people struggle with when they begin using Wicket. Chapters 5 and 6 talk about the components youll use no matter what kind of application youre building: labels, links, repeaters, forms, and form components. Chapter 7 discusses effective strategies to build your pages from smaller parts, and how to apply a consistent layout.
Parts 3 and 4 go into specific areas that can be relevant when you develop non-trivial web applications, like localization and component-level security. This is where youll learn how to take Wicket to the next level. Chapter 8 explains the advantages of organizing your Wicket-based projects around reusable components. Chapters 912 explore additional techniques that you can use to develop sophisticated Wicket applications: shared resources, Ajax, security, and localization. These techniques are explained by themselves and also in the context of reusable components, using a gradually evolving example. Chapters 13 and 14 talk about the practical matters of how to fit your Wicket code in with the rest of your architecture, how to test pages and components, how to map URLs for bookmarkability and search engines, and how to tweak and monitor your Wicket configuration for the best performance.
In addition to these chapters we also provided a free bonus chapter titled Setting up a Wicket project. In this chapter youll learn how a Wicket application is structured and how you can build your Wicket application using the open source build tools Ant or Maven. You can obtain this chapter from the publishers website at http://manning.com/dashorst.
If youre considering using Wicket to write web applications, or youre already doing so but would like to have a better understanding of the framework and how to best utilize it, this is the book for you. This book can be a good read for tech-savvy managers and architects who are in the process of selecting a web framework, and for anyone who is interested in web application frameworks. Finally, we invite our moms to read along.
Most of the source code in this book is part of a Google Code project you can find at http://code.google.com/p/wicketinaction/, and which is ASF 2.0 licensed.
We aimed for a smooth narrative by employing an evolving example throughout the chapters. We hope the examples, which talk about a cheese store, arent too far fetched; we tried to make the book fun for you to read while addressing the technical nuances we had in mind.
The downloadable source code is structured in packages that reflect the chapters so that you can easily play with the code while reading the book. Trying things for yourself is a great way to learn technology.
The code in this book is pretty much printed as is, with the exception of the imports that are needed to compile the code. You can find those imports in the Google Code project, although in most cases asking your IDE to autocomplete them for you should work fine.
You can also download the source code from the publishers website at www.manning.com/WicketinAction or www.manning.com/dashorst.
Purchase of Wicket in Action includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the lead author and from other users. To access the forum and subscribe to it, point your web browser to www.manning.com/WicketinAction or www.manning.com/dashorst. This page provides information on how to get on the forum once youre registered, what kind of help is available, and the rules of conduct on the forum.
Mannings commitment to our readers is to provide a venue where a meaningful dialog between individual readers and between readers and the authors can take place. Its not a commitment to any specific amount of participation on the part of the authors, whose contribution to the AO remains voluntary (and unpaid). We suggest you try asking the authors some challenging questions lest their interest stray!
The Author Online forum and the archives of previous discussions will be accessible from the publishers website as long as the book is in print.
Martijn Dashorst is a software engineer with more than 10 years of experience in software development. He has been actively involved in the Wicket project since it was open-sourced and has presented Wicket as a speaker at numerous conferences, including JavaOne and JavaPolis.
Eelco Hillenius is an experienced software developer who has been part of Wickets core team almost from the start. He works for Teachscape, where he is helping to build the next e-learning platform. A Dutch native, he currently lives in Seattle.
By combining introductions, overviews, and how-to examples, the In Action books are designed to help learning and remembering. According to research in cognitive science the things people remember are things they discover during self-motivated exploration.
Although no one at Manning is a cognitive scientist, we are convinced that for learning to become permanent it must pass through stages of exploration, play, and, interestingly, retelling of what is being learned. People understand and remember new things, which is to say they master them, only after actively exploring them. Humans learn in action. An essential part of an In Action book is that its example-driven. It encourages the reader to try things out, to play with new code, and explore new ideas.
There is another, more mundane, reason for the title of this book: our readers are busy. They use books to do a job or solve a problem. They need books that allow them to jump in and jump out easily and learn just what they want just when they want it. They need books that aid them in action. The books in this series are designed for such readers.
The figure on the cover of Wicket in Action is taken from the 1805 edition of Sylvain Maréchals four-volume compendium of regional dress customs. This book was first published in Paris in 1788, one year before the French Revolution. Each illustration is finely drawn and colored by hand.
The colorful variety of Maréchals collection reminds us vividly of how culturally apart the worlds towns and regions were just 200 years ago. Isolated from each other, people spoke different dialects and languages. In the streets or the countryside, they were easy to placesometimes with an error of no more than a dozen miles--just by their dress.
Dress codes have changed everywhere with time and the diversity by region, so rich at the time, has faded away. It is now hard to tell apart the inhabitants of different continents, let alone different towns or regions. Perhaps we have traded cultural diversity for a more varied personal life--certainly for a more varied and fast-paced technological life.
At a time when it is hard to tell one computer book from another, Manning celebrates the inventiveness and initiative of the computer business with book covers based on the rich diversity of regional life of two centuries ago, brought back to life by Maréchals pictures.