Your review is Submitted Successfully. ×

Summary

Programming Jakarta Struts - Chuck Cavaness
Kalil Rahman@kalil.rahman
May 27, 2004 09:13 PM, 1580 Views
(Updated May 27, 2004)
Nice book covering Jakarta STRUTS - A Developer's


For every complex problem there is an answer that is clear, simple, and wrong.


-H L Mencken



INTRODUCTION


I used Struts for a J2EE based application development in the near past. The idea was to use MVC model (introduced by Smalltalk), as the project team had a bunch of Smalltalk experts. As the application was to run a J2EE framework, we chose STRUTS as our MVC framework. J2EE is a great server side technology utilized by large enterprises. If you want to implement a large multi-tier enterprise application with extensibility and portability, Enterprise Java comes into picture and STRUTS is a great candidate for implementation of your Model-View-Controller Framework


First thing I did was to buy this book. It certainly helped us to kick-start. Though there are many books available for STRUTS, this is one of the best out there, as far as I am concerned.


Let me go chapter by chapter


Chapter 1 - Introduction


Talks about the evolution of the WWW, Basics of Servlets, JSP and delves into the architectures of JSP 1 & JSP 2. It also tells you the advantages of MVC. Then you learn what is a framework and how to write one. Finally you get to know about the creation of Struts and what are the alternates for the same. This chapter is a history lesson for experienced ones.


Chapter 2. Inside the Web Tier


This is another history lesson for most part with overview of STRUTS framework, how HTTP Request/Response works, Scope of STRUTS and about the various parameters passed for a URI. You get an important insight about the differences between Forward & Redirect.


Chapter 3. Overview of the Struts Framework


It starts of with an example for a bank. Then it explains the big-picture of Struts, components of MODEL VIEW and CONTROLLER. It summarizes the examples with an insight on how to use it for multiple applications at the same time.


Chapter 4. Configuring Struts Applications


Starts with another example and explains how you can develop a web application. Tells about various components of the directory structure, Tells about the importance of web application deployment descriptor, web.xml configuration and the struts config files. How the digesters work, how the package is setup, for configuration, how to use the console, how to do reloading of the configuration files


Chapter 5. Struts Controller Components


Talks in detail about the controller mechanisms and the utilities classes. Nice chapter to look into. There was some information that we utilized in our project fruitfully


Chapter 6. Struts Model Components


Talks about the MODEL, business objects, data/object persistence and the advantages of STRUTS Model and an example


Chapter 7. Struts View Components


Talks about the VIEW, Action Forms, Errors, Validations, DynaActionForm and the insight to JSF. I skipped part of it, as it was not necessary for me


Chapter 8. JSP Custom Tag Libraries


It talks about all the JSP Taglibs available with Struts and how to use Javabeans with STRUTS. JSTL is also explained to some extent


Chapter 9. Extending the Struts Framework


Tells you how you can extend the basic Struts framework and the plus points and minus points of the same. They talk about all the extension points for Model View and Controller


Chapter 10. Exception Handling


This is a very important chapter and this is very much helpful. You can get to know about Java Exception Handling specific to Struts, System Exceptions, Application Exceptions, Chained Exceptions and all. You get to know about some exception handling tips specific to Struts and how to tighten the code.


This is a very useful chapter


Chapter11. The Validator Framework


Tells you if you need a validation framework. After telling you how to install & configure the framework, you get to know about how to use an ActionForm(We used it exrensively). You get to know about the custom rules that you can write, tags for JSP and how to internationalize your custom validations. You also get to know about how you can use it outside struts


Chapter 12. Internationalization and Struts


This was of not use for me as we never needed Internationalization or I18N support. This chapter tells you in detail about these features in Struts and how to handle exceptions


Chapter 13. Struts and Enterprise JavaBeans


This is the chapter I love the most in this entire book. This is the sole reason for my purchase also. I read this chapter in a book store (Borders in Minneapolis) and bought it immediately.


This talks about implementation of the nice example they gave (Storefront) and how to implement it using an EJB (This more or less helped me to implement my own, using my clone which then got into a template mode)


Chapter 14. Using Tiles


Though we didn’t use Tiles in our project, I got a brief introduction. I more or less skimmed through this chapter. It talks about Tiles Templates, installation, configuration and finally giving an overview, introduction to taglibs and definition. Fairly useful, if you plan on using Tiles


Chapter 15. Logging in a Struts Application


Logging is an important need for effective application development, for many reasons. This is a nice chapter with nice explanation and simple examples for the same. Found it to be very effective. You get to know how to do logging in a web application, how to use the servlet container for logging, Jakarta Commons, log4j, JSP taglib based logging, performance impacts of logging, extensions and finally about JDK 1.4 based logging API. All of them is very useful information


Chapter 16. Packaging Your Struts Application


This is a very important chapter and found it to be useful. This is because all, your work is useless if you cannot package things properly. You may work for 10 days on development effort and 20 days for deployment. It shouldn’t be the case. This chapter clearly tells you what to package or not to package, how to package, WAR file packaging, ANT based builds, Automated build setups and how you can restart your application remotely


Great chapter!!


Chapter 17. Addressing Performance


This chapter talks in general about what is good performance? , Comparison of performance to Load testing, Stress testing & performance testing tools and how to test the examples in the book. It also ends with a cheatsheet of gotchas about performance and scalability


CONCLUSION


All in all, I found this book a nice buy and felt I got the value for money through my purchase. I felt it could have been better as I love nice examples. An author cannot possibly satisfy all readers for sure. I felt I got a lot of take away from this book.


It is a NICE BUY. GO FOR IT!!



ISBN Information: Programming Jakarta Struts By Chuck Cavaness ISBN: 0-596-00328-5




I Hope you liked the review. Please Comment as time permits.


Thanks


Kalil




’’There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.’’


-- C.A.R. Hoare


(8)
VIEW MORE
Please fill in a comment to justify your rating for this review.
Post
Question & Answer