Struts 2 in Action

Struts 2 in Action
Authors
Don Brown, Chad Davis, Scott Stanlick
ISBN
193398807X
Published
01 May 2008
Purchase online
amazon.com

The original Struts project revolutionized Java web development and its rapid adoption resulted in the thousands of Struts-based applications deployed worldwide. Keeping pace with new ideas and trends, Apache Struts 2 has emerged as the product of a merger between the Apache Struts and OpenSymphony WebWork projects, united in their goal to develop an easy-to-use yet feature-rich framework. Struts 2 represents a revolution in design and ease of use when compared to classic Struts.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Raad Yacu said
This is an awesome book about a dying breed, Struts 2. Struts 2 still has the mentality of acting on Requests, so the reason for the extinction.
But to their credit, the authors did a great job in explaining Struts 2. Its a great leap of change from Struts 1.x crap.

if you are considering moving to Struts 2, then this book is a must. There are materials out there to search, but none like what the book reveals.

Enjoy

U. Namgyel said
I read this book after having read Budi Kurniwaran's Struts 2 design and programing:tutorial series. While the Kurniwaran book was really good at getting me started quickly with struts 2, this book had a lot more details and explanation of what happens behind the scene, and how the framework is built.It does a great job of tying in explaination on topics such as ajax and spring integration into the overall discussion about the different components, of the framework and best practices.

I think if you want to get up and running quickly with struts 2, Kurniawaran's tutorial book is the way to go. However once you've started coding, I think you should read this book to get a thorough understanding of the framework. These two books go together.

Developpez.com writers said
The book is divided in 5 parts.

In the first part, the authors give us a quick overview of the Struts 2 framework architecture (MVC pattern, interceptors, ValueStack, OGNL) and start with an Hello World sample. The 2 types of configuration are detailed : configuration through XML-based files (struts.xml) and configuration through Java annotations.

In the second part, the authors cover the action in Struts 2. It is relatively well detailed and well explained. Then a chapter deals with interceptors : their principle, the declaration, the advantages, the existing interceptors and how to create an interceptor if none of the existing ones meets the requirements. The OGNL language, which makes it possible to use the objects stored in the ValueStack, is presented for the first time in the book.

The third part deals with the different tags. I appreciated the rational indentation of paragraphs and chapters based on the 4 categories of tags : data tags, control-flow tags, UI tags and miscellaneous tags. Then I did like the presentation of each tag: first an explanation, then a small array describing the attributes, types, (...), and finally a small snippet of code to illustrate a concrete usage. Then the authors discuss again about OGNL and its utilisation to access data items not only coming from the ValueStack (included in te ActionContext) but also from a different object from the ActionContext, which "contains all the data that makes up the context in which an action occurs". I also liked the quick presentation of JSP alternatives such as Velocity and Freemarker, for the rendering of the result pages.

The fourth part shows how to integrate Struts 2 applications with the Spring plug-in and JPA. An entire chapter is dedicated to the very useful validation framework that comes with Struts 2, with XML files and annotations. The chapter is well written, with abundance of code. Same thing about the next chapter regarding internationalization.

Finally the last and fifth part is a bit more catch-all since it covers various subjects which, as the authors put it, "help us work smarter." Such as the use of plug-ins (like the classic Tiles framework for the presentation, or JFreeChart for the creation of graphs), unit tests with JUnit, how to migrate from Struts 1.X to Struts 2, how to prevent duplicate form submits ...

What I liked about this book : The source code of each chapter is appropriately packaged in the archive (war file) of the final application, except for the last chapters.

What I liked the least in this book :I found the book maybe a bit too verbose for my taste, regarding a few passages. I mean I would have preferred that the authors went directly to the main points, especially when the reader lacks time to go through all the details and learn or when the reader only wants the minimum knowledge in order to develop. The lack of chapter dedicated to the integration of Javascript libraries and Ajax components in Struts 2.

L. Sembera said
I have absolutely no experience with S1, so i was kind of unsure if start directly with Struts 2, or learn at least basics of S1. Now, after reading this book and finishing one smaller project with S2, I've to say, that this book will give you really great foundation of web development using S2. Chapters are very well written and easily understandable.

I especially want praise authors for chapter nine(spring integration part). This was one of the most useful book chapters, I've ever read. Not only it has thought me how to let spring manage creation of beans, but also the motivation for using dependency injection pattern).

Simply great book, which I strongly recommend.

M. Goodell said
In my view, this book is an excellent introduction to the Struts 2 framework. The authors approach to the reader is well thought out and the book is actually a "good read". The conversational tone with which the book was written lends itself tremendously to the reader grasping a firm hold of the technical information. It's not "dumbed" down at all, it's just explained very well. Each chapter builds on previous information presented to provide a clear picture of how the framework operates.

According to the authors, there is foundational knowledge that must be understood before Struts 2 can really become a useful tool in a developers hands. (See chapter 4: Adding workflow with interceptors.)

They do an outstanding job of taking the reader though the key concepts of the frameworks architecture. At the end of each chapter, I understood what they were saying and I had a clear idea of the concepts they were attempting to get across. Not many technical books do this very well, however, this one does.

As far as Struts 2 being the "best" framework? I won't go there. However, Struts 2 looks to be more than capable of handling the requirements when developing both simple and complex web applications. It appears there have been lessons learned from Struts 1.

In summary, it is the opinion of this reader that if you want to learn and *understand* the Struts 2 framework this book will get your there and you will enjoy the journey as well.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“You can stand on the shoulders of giants OR a big enough pile of dwarfs, works either way.”