Struts 2 in Action

  • ISBN13: 9781933988078
  • Condition: NEW
  • Notes: Brand New from Publisher. No Remainder Mark.

Product Description
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 c… More >>

Struts 2 in Action

5 thoughts on “Struts 2 in Action”

  1. I had to learn Struts2 quickly since I recently changed jobs and my new team has several web application projects built using Struts2.

    Overall, I thought the book was done very well if you are looking for a good introduction to Struts2. The first 8 chapters are very good.

    The main negative is the source code for the book’s examples. The authors provide one very large war file with all the source code embedded into the war file along with an overall web application divided into sub-applications for each chapter.

    This packaging of the source code into the war file made it difficult for me to create individual projects in my development IDE that demonstrated just the material in a specific chapter. I had to spend quite a bit of time breaking down the source code into individual web projects and then figuring out on my own what jars needed to go into each project, what the struts.xml file needed to have, and what ever else was necessary to separate out just that chapter’s sub-application so I could run that example and play with it.

    Where this really became a problem was in chapters 9 and 10. Chapter 9 is a very advanced introduction to integrating Spring and Hibernate/JPA into Struts2. I never could get this chapter’s example to work correctly.

    However, chapter 10 on the validation framework then uses the same code as chapter 9, so you really cannot separate out the code for either chapter 9 and 10.

    The validation framework is likely something even beginning Struts2 developers will want to use, while Spring/JPA/Hibernate is for more advanced developers and should have been well after the chapter on how to use the validation framework.

    Also, the authors really don’t give you a good understanding of what Struts2 jars you need to have to build a basic Struts2 application. There is some information about this in chapter 13 (setting up your IDE) but this information should really be at the beginning of the book. Also I don’t think the list the authors provide is accurate since my basic HelloWorld (get the user to enter a name, call an Action class, and then display Hello userName in new jsp) worked with far fewer jars. Note there is apparently a new example war that just is a basic Hello World so there may be some information in that war file. That war was not on the manning web site when I purchased the book.

    This book is good but be prepared to struggle working with the code examples if you want to work on the examples in your own development environment.

    I recommend the authors create separate complete war files for each chapter’s example to make it easier for users to just get that chapter’s example code into their development IDE.

    Lastly, the book does get 4 stars because the author’s explanations of the basics of Struts2 (chapters 1-8) is very easy to follow for experienced Java developers. I’m now ready to tackle the Struts2 applications in my new job.

    Rating: 4 / 5

  2. I took a chance and pre-ordered this book because I have recently started a Struts2 project and wanted to learn more about the framework. The book did not disappoint.

    The authors explained the concepts behind the framework clearly and used examples that were immediately useful. The book is a little too short and in many cases a few more details would have been appreciated but it seemed to be a deliberate decision to leave out some of the less common use cases to avoid cluttering up the book. Thus, this book is ideal if you are new to Struts 2 but have some prior experience with Java web development.

    I like the fact that an entire chapter was dedicated to integrating Spring and Hibernate into the framework. It brings all the bits and pieces from the online documentation together in a cohesive and comprehensive package.

    Chapters were also dedicated to validation, internationalization, best practices and migration from Struts classic. The authors spent several chapters on how the Value Stack and the ActionContext worked and how OGNL fits into this framework.

    All in all there is enough information in this book to start and to produce a complete Struts 2 application.
    Rating: 5 / 5

  3. This is a proper “In Action” book. I do strongly recommend it. If you plan to buy only one reference in the subject, look no further this is it! Down Brown is a Struts PMC member and an authoritative voice, among others he is the author of the Struts 2 REST plugin which is a superb addition to the framework from version 2.1.2

    The book is very well written and easy to follow. I personally found the explanations very concise and appreciated the most their unique and clear way of breaking down and explaining all code snippets. This is really a great reference.

    The first two chapters are a very good introduction to the framework. I am a pure version 2 user and had to learn most of these concepts from online documentation and from the Struts mailing lists.

    Among all the topics covered I enjoyed and appreciated the most the coverage of:

    – Interceptors

    – OGNL and Type Conversion

    – Validation! before this book, you could only find the relevant coverage of this topic scattered online in e.g. WebWork articles outdated

    ..for Struts 2. The authors did an excellent job explaining validation in chapter 10

    – Really unique was the coverage of:

    ….. Unit testing actions

    ….. Tiles plugin

    ….. execAndWait interceptor “processing your request, please wait ..”

    ….. UI component templates

    ….. Writing Struts 2 plugins

    On the big plus side, the authors did a superb job keeping the book agnostic to minor versions of Struts 2 i.e. there were several differences from 2.0.x to 2.1.x and I was very happy to see that the examples and explanations were not outdated for the later.

    On the down side and as a trade off I can only complain that the book left the Ajax topics out; maybe also because there have been many changes on this topic from minor versions of Struts 2 e.g. the ajax theme of Struts 2.0.x was converted to the dojo plugin in version 2.1.x. In any case, I somehow find the Ajax topic in Struts 2 to be one of the best documented online.

    I believe that the Practical Apache Struts 2 Web 2.0 Projects (Practical Projects) book from Ian Roughley is a very good complement to this one. If you want to find coverage on topics like Security and Ajax in Struts 2 you will want that one too. The only issue there is that the coverage of the ajax theme is partially outdated for the newest version 2.1.2 of the framework
    Rating: 5 / 5

  4. This is the only book on Struts u need to ever buy. You can be on your own after using this. (I say using this instead of reading because it is best utilized by trying the examples included)

    The balance between theory and examples is excellent. I wish designers of other frameworks (like Hibernate) could publish a book like this one.

    Some of the sections like interceptors, integration with other frameworks, dynamic action mapping etc. are highlights of the book … as u don’t find such clearly written material anywhere else.

    The example of Create-Update-Delete (CrUD) using dynamic mappings is the best part of the book … I wish the entire example was available for download … and it was built up a little more with multiple model entities.

    Ironically the last 20% of the book (advanced topics) contains 80% of the USP … info u won’t find elsewhere easily ….

    Issues:

    The section on UI Tags/controls is very weak. The problem is the online documentation is also very weak for Struts2 in this area. It almost feels like the designers are bored with the UI part …

    Suggestions:

    1. Why not elaborate on those advanced topics in another volume or a larger version? (like JPA integration, AJAX, etc.)

    2. The theory in the interceptor section is great … need more examples for various interceptor types … will help
    Rating: 5 / 5

  5. 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
    Rating: 5 / 5

Leave a Reply

Your email address will not be published. Required fields are marked *