George Franciscus and Danilo Gurovich
2004 | 520 pages
|Out of Print|
A large collection of practical solutions complete with detailed code listings that will save you time and money. You will be delighted by what you will learn.
"The real issues faced by developers while building Struts applications are seldom compiled in one place. This book is unique, in that it addresses the real-life issues, scenarios, and challenges faced by developers and provides satisfactory solutions...an excellent addition to the Struts literature."
-- Computing Reviews
This book is for developers and architects with real Struts work to do. It offers a broad collection of practical solutions complete with detailed code listings that will save you time and money. Each recipe clearly defines the problem it solves, gives you the background you need, and discusses the practical implications of adopting the solution. Many recipes point out little-known "gotchas" which will save you from needless grief. This book introduces you to Struts best practices so you can make your applications secure, robust, and maintainable.
Techniques presented in this book have gone through the trial by fire of real-life enterprise development and deployment you can rely on them with confidence.
A Sampling of What's Inside
- How to automate your projects using Ant builds
- Cross validate your forms with a pluggable validator
- Unit test your app for function, performance, and coverage
- Make your application secure
- How to deal with exceptions
- Generate alternate views using PDF and XSL
- Refine your UI with Struts-Layout
- How to design a layered Struts application
- Understand the ins and outs of the Tiles Controller
- Use a DB in your message-resource
- Integration with Hibernate
ABOUT THE AUTHORS
George Franciscus is a J2EE consultant and Struts authority. He is a coauthor of Manning's Struts in Action.
Danilo Gurovich is a Manager of Web Engineering at an eCommerce Company. He has designed eCommerce and ERP/EAI Struts applications, and led teams who built them.
Struts Best Practices
Automate the build process 13
Heavily parameterize Ant build scripts 13
Identify interfaces when creating modules 20
Use multiple resource files 21
Validate your XML 21
Do not use wild cards in Ant scripts 28
Set <message-resources/> null attribute to true in production, and false in development 31
Prefer classes over interfaces to store constants 35
Avoid using the <html:messages> header and footer attributes 49
Prefer <html:messages> to <html:errors> 50
Use consistent naming when relating message properties to field names 53
Choose unique queue names when creating custom queues 56
Limit upload file sizes 95
Prefer Struts tags over any HTML counterpart 109
Keep to a single image directory in most circumstances 111
Beware of sending unfiltered information to the browser 115
Set the type and scope attribute when using <bean:define/> 119
Logic tags do not implement try, catch, finally 129
Beware of null values 138
Use Separate directories for file types when implementing Tiles 162
When to use Tiles 163
Don't waste timestart with XML-based Tiles as soon as possible 169
Choose a navigation strategy that is scalable for your application 207
Implement crumbs in the proper places 224
Keep tabs on your Tabs! 225
Keep your Actions as short as possible 236
Always create a global exception tag to catch java.lang.Exception 261
Apply high cohesion to DispatchAction 276
Use Validator constants to increase maintainability 281
Prefer keyed tag properties 304
Use SSL judiciously 335
Use the container to protect resources 338
Consolidate resource references 357
Create solutions independent of View implementation 377
Enforce navigation where required 417
Use Design by Contract to design module tests 454
Create a performance test plan 461
Employ continuous coverage testing 468
WHAT REVIEWERS ARE SAYING
"The real issues faced by developers while building Struts applications are seldom compiled in one place. This book is unique, in that it addresses the real-life issues, scenarios, and challenges faced by developers, and provides satisfactory solutions to most of these problems...Security in Struts, which is an important topic, is described in chapter 7 very nicely. I admire the authors' simple pproach to addressing this complex issue.Overall, the authors have done an excellent job of compiling real-life scenarios and best practices. ...this book is an excellent addition to the Struts literature. It is practical, and has been long awaited by Struts practitioners. The authors have successfully presented their content, with full meanings and purpose, in a reasonable number of pages. I strongly recommend this book to Struts practitioners, and to the whole Struts user community."
-- Computing Reviews
"This is a no-nonsense well written set of solutions to common Struts issues. It is certainly not an introduction to Struts and does not intend to be. This is a reference work for Struts users who are looking for canned solutions to problems like Tomcat security, Internationalization, or bread crumb trails. Each solution has a short descriptionof the problem (with some background supplied), then the solution recipe and a discussion of the solution.
This is an easy to use, and read, reference format that works well for situations where you have a loosely organized set of common problems. Check the table of contents to make sure that you are getting solutions to the problems you face. If you find topics that interest you rest assured that they are covered well in the book."
-- Jack Herrington, author of Code Generation in Action
"A goldmine of useful information."
-- Patrick Peak, Chief Technology Officer, BrowserMedia
"Sooner or later you are going to need every recipe-keep it by your side."
-- Cedric Dumoulin, Struts Project Management Committee Member
"... presents best practices that will turn every developer on your team into an expert."
-- Hemesh Surana, Senior Software Engineer, SeeBeyond Corporation
"... solves real-life Struts problems for you ... takes your applications to the next level."
-- Vivek Awasthi, CTO & Head of Research, ISTS Infotech Solutions