Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Apache Struts 2 Web Application Development Paperback – June 15, 2009
|New from||Used from|
Customers who viewed this item also viewed
What other items do customers buy after viewing this item?
About the Author
Dave Newton, a Struts PMC member, has been a professional developer for over twenty years, getting his start in Lisp and Smalltalk development, moving on to a lengthy stint in embedded system, game, and device driver development, before (confusingly) finding himself writing Java-based web applications for a variety of clients.
He is a strong proponent of agile practices and tool creation and use, particularly in relationship to documentation generation and testing. He's a regular (if crabby) fixture on the Struts user mailing list, prodding people to read the documentation and think outside the box.
If you buy a new print edition of this book (or purchased one in the past), you can buy the Kindle edition for only $2.99 (Save 76%). Print edition purchase must be sold by Amazon. Learn more.
For thousands of qualifying books, your past, present, and future print-edition purchases now lets you buy the Kindle edition for $2.99 or less. (Textbooks available for $9.99 or less.)
If you’re the author, publisher, or rights holder of this book, let ACX help you produce the audiobook.Learn more.
If you are a seller for this product, would you like to suggest updates through seller support?
Top Customer Reviews
I wish his second book will have better content flow and layout.
Overall I will rate this book 3 stars in the beginners level. I believe he has written this for beginners.
I completed reading and working through the code for Apache Struts 2 Web Application Development (Packt Publishing, 2009, ISBN 978-1847193-39-1) by Dave Newton. I was looking forward to reading this book as published books on learning Struts 2 are few, especially since the 2.1.X release of Struts 2.
I've been developing Java web applications using Struts 2 for approximately 18 months, so I'm not a Struts 2 beginner. Since the book's target audience is Java developers new to Struts 2 [page 3] I tried to read the book with a newbie mindset.
Overall, I give this book 3 stars out of 5. If you're brand new to Struts 2, I'd recommend you first read Struts 2 in Action ([...]) and then pick up Apache Struts 2.
My main criticism of Apache Struts 2 (and why I don't think it's the best book for newbies) is that this book quickly skims over some critical foundation subjects such as XML configuration, convention plugin, and annotations. Without a thorough understanding of how and when to use those key Struts 2 techniques, it will be difficult for someone new to Struts 2 to actually build a web application that uses the framework and even more important trouble-shoot a problem.
The introduction to using the convention plugin and annotations is only 4 pages long. If I did not already have prior experience with those techniques I would have been lost trying to understand the examples in the following chapters. The book does provide external references at the end of each chapter where the user can go to learn more. The online documentation on the Struts convention plugin and annotations was updated in August so readers of Apache Struts 2 will find referring to that web page ([...]) very helpful.
The problem with Apache Struts 2 not providing a more complete coverage of how to configure a Struts 2 application is compounded by the code examples. In one chapter the code examples use extensive annotations, other examples just use the convention plugin, and even other examples use an XML configuration.
Another criticism I have is that (as of early September 2009) the code examples are not easy to run after you download them from the book's web site. There were some issues in the Maven configuration and the application's start page that I had to fix before I could run the projects using Maven (even though each project uses Maven and Jetty).
Also the code examples in later chapters that are focused on the continued theme of each chapter (designing a recipe web application) don't work because of a problem with the recipe form and its model and Action classes. The publisher is aware of these problems and hopefully an improved code download will be available. But again as someone new to Struts 2, being able to have trouble-free code examples out-of-the-box is important since most Struts 2 newbies are not going to have the knowledge to fix any problems.
Additionally, in some of the code examples the author uses the bang operator (!) to dynamically call a method in a Struts 2 Action class. However, I couldn't find anywhere in the text where the author explains the dynamic method invocation (which uses the bang operator). Also using the dynamic method invocation isn't a good practice for Struts 2 developers to follow ([...]). The author might have better explained and shown examples for the wildcard method selection technique.
The book could really use an appendix on using Maven to build and run the example applications. Each chapter's example is a Maven project that also uses the Jetty Servlet container. For someone who hasn't used Maven or Jetty, an appendix on how to use them to build and run the chapter examples would be important. The author states he "takes a non-committal approach to its source" [page 15]. I'm not sure what he means by that, but the easier you make for someone to get your code running (and using Maven and Jetty make that pretty easy if you're familiar with those tools) the more learning that person can accomplish.
For developers who already have experience with Struts 2, the book does provide several useful techniques. Examples of how to use the Struts 2 configuration plugin were very helpful and something I quickly applied to my own Struts 2 applications. The code examples provide insights into how to use Struts 2 annotations (though you'll need to refer to the Struts 2 online documentation to get more background).
The chapter on validation explains how to use OGNL to include dynamic information in your error messages which was something I hadn't seen before. The chapter on comprehensive testing provides an example of how to unit test a custom interceptor. I found the code hard to follow but with further study I may be able to use it to create my own unit tests.
Lastly, the code examples and book's discussion focus on the latest release of Struts (2.1.6) as of early September. That's very helpful as there are many changes from early Struts 2 releases and the post 2.1.X releases. The Struts 2 in Action book provides a good foundation, but it is getting more and more out-of-date. Additionally, if you know Maven and Jetty then running the code examples (provided the other issues I mention above are corrected) is easy.
Apache Struts 2 Web Application Development is a good book for developers already familiar with Struts 2. For Java developers brand-new to Struts 2, I recommend first reading the Struts 2 in Action book (and the latest documentation on the Struts 2 web site [...]) prior to reading Apache Struts 2.
If you've read my previous reviews of Packt books, you'll know I tend to like their shorter books better. This book kept the attributes of a short book that I like since it's like the book was only 200 pages. The longest code example was 1.5 pages and even that length was rare. There were the collection of typos I've seen in most Packt books though which unfortunately precludes a higher rating.
The first/main part covers Struts 2 clearly and succinctly. It is fast moving, includes gotchas/tips and provides opportunities for further exploration. I particularly liked the discussion of tradeoffs with techniques when it comes to maintenance. There are notes for Struts 1 developers.
Overall, I did learn Struts 2 from the book and was entertained throughout.
And to make the FTC happy: I received a copy of this book from the publisher in exchange for writing this review on behalf of JavaRanch.
I would have preferred a detailed treatment on XML configuration as a foundation of my understanding of Struts 2. I could have learned the other configuration options after I felt comfortable with XML. I don't recommend this book for anyone trying to learn Struts 2. Instead, I recommend reading Struts 2 in Action.