In mid-2006, I started a new project. Since in this case I was developing for myself, under the banner of my own company, I had the pleasure of making all the technological choices myself. Most of my previous experience had been with Struts 1, a framework that proved to me that you wouldn’t want to work without a framework, but no longer convinced me that I was working with the best option available. For my new project, I was going to choose one of the new, second-generation web application frameworks.
To be honest, I can no longer recall why I chose Struts 2. I know that I also considered using Spring’s MVC framework, but something made me go with Struts 2. I probably chose Struts 2 because I figured it would be more widely in demand in my contract work. At any rate, the choice was not that impassioned. But once I started development, I almost couldn’t believe the power of this new framework. It’s the perfect blend of a dedication to software engineering, which yields high levels of architectural componentization and flexibility, and a willingness to be influenced by the innovations of others. While many people love to compare frameworks and quibble over which is best, we think that any of the serious contenders will quickly absorb the strengths of other technologies. The Struts 2 commitment to convention over configuration aptly demonstrates this.
So I was sold on Struts 2 by the time Manning contacted me later that year to see if I was interested in teaming up with Don Brown to write a Struts 2 book for their In Action series. I was looking at a busy upcoming year, but this was, as they say, an offer I couldn’t refuse. It’s been a pleasure working with Don, but mostly it’s just nice to be able to pick his brain about the details of Struts 2. That alone is worth the price of admission.
Originally, the project was to rewrite Patrick Lightbody and Jason Carreira’s WebWork in Action. The core architecture of Struts 2, as you’ll learn in this book, was taken directly from WebWork in Action. Before any Struts 2 books were available, many developers, myself included, used that book to learn Struts 2. As we started working on our book, it became clear that Struts 2, thanks to its large and highly active community, had moved far beyond that core. As it turns out, we wrote an entirely new book. Nonetheless, I learned Struts 2 from reading WebWork in Action, so my indebtedness to that book is nontrivial.
Things moved pretty fast, narratively speaking, from that time. We spent the better part of the next year writing, revising, gathering feedback from reviewers and Manning Early Access Program participants, and revising again. At some point, we realized the book would never get done if we didn’t get some help. We were lucky to find Scott Stanlick, a metalhead drummer and Struts 2 activist, to make a contribution of several strong chapters that helped wrap the project up.
Now the book is done and you have it in your hot little hands. Enjoy. I hope the work we put in pays off by easing your entry into the world of Struts 2. Please visit the Manning Author Online forum to give us feedback and share with the community.
CHAD DAVIS