Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Java Books Media Programming Book Reviews

Struts Kick Start 134

Simon P. Chappell writes "I started learning how to use the Struts framework in late in 2001, after I became fed-up with hacking web applications together with the digital equivalent of "Duct-tape Engineering". At that time there were no books available for the budding Struts developer, "Read The Fine Manual" was not an option ... you read the website, you read the code or you asked questions on the mailing list. This situation finally changed this fall with the release of a flurry of titles dedicated to Struts. I present here my thoughts on one of the latest: "Struts Kick Start". The rest of Simon's review follows.
Struts Kick Start
author James Turner and Kevin Bedell
pages 481 (29 page index)
publisher Sams
rating 9
reviewer Simon P. Chappell
ISBN 0672324725
summary You need this book

What is Struts?

Struts is a framework for developing web applications. It is a distilation of the current set of known best practices into a working code set that can be extended to meet almost any web application requirements. It part of the Jakarta Project at the Apache Software Foundation.

What do I know about Struts?

I have been developing web applications, using Java, for four years and using struts for over a year, and am a regular participant on the Struts mailing list. I was also a technical reviewer for one of the other Struts Books released this fall and was recently invited to speak at the University of Wisconsin, Eau Claire on the use of Struts.

What's good about this book?

There are many excellent things that I could point to. I particularly like the obvious depth of research that accompanies this book. There is a very interesting history of the development of the MVC design pattern and they even name the inventor. Do you know who invented MVC? If you want to know, buy the book! The chapters cover everything that you will need to know, in the order you are most likely to need to know it. There's even a chapter explaining the "struts-config.xml" file's DTD! (You may want to skip that on the first few readings :-)

There is good coverage of the Struts taglibs. I see a lot of questions about these on the mailing lists, so this information is very timely and it looks very well explained.

I like the coverage of other open source tools that work well with Struts. This is an important point because Struts does not do everything for you (by design), so there will be areas that will benefit from other tools. I'm looking forward to trying out some of their recommendations and easing my own Struts development lifecycles.

What's not so good?

Just one niggle, and it's more of a programming style issue, but in their example code they have references to their business objects. They explain that it is important to separate out business logic from action logic, which it is, but then proceed to use their business object within the action.

Now, I realise that example code is not the same thing as robust, production-ready code, but when people are first learning a language or framework, they tend to copy exactly what they see in the book they are learning from. Even though example code should be light on error checking, it should be heavy on correctness and good style.

Should you rush out and buy it?

If you are about to use Struts on a project, are new to Struts and need dead tree documentation for those RTFM moments or are evaluating Struts for future projects, then you absolutely need this book.

If you are an intermediate Struts user, then this book would still be very useful to you and I can certainly recommend it.

If you are an experienced Struts user, then you've almost certainly exchanged emails with James or Kevin, on the Struts mailing list, so you can make your own mind up!

Table of Contents

  1. Struts in Context
  2. The Model-View-Controller Design Pattern
  3. Hello World!
  4. HTTP Protocol
  5. JSP, Taglibs and JSTL
  6. The Sample Application
  7. View Components
  8. The Controller
  9. Model Components
  10. The struts-config.xml File
  11. How the Struts Tag Libraries Work
  12. Struts HTML Tags
  13. Struts Bean Tags
  14. Struts Logic Tags
  15. The Nested and Template Struts Tag Libraries
  16. The Struts Tiles Tag Library
  17. DynaForms and the Validator
  18. Using Struts with Enterprise Java Beans
  19. Using Struts with Web Services
  20. Building, Deploying and Testing Struts Applications


You can purchase Struts Kick Start from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Struts Kick Start

Comments Filter:
  • by dnoyeb ( 547705 ) on Tuesday December 31, 2002 @12:44PM (#4988754) Homepage Journal
    I still have NO IDEA what struts does. the struts website is not helpful in a brief overview. Saying it helps develop web applications is a joke. What does it replace because I can develop web apps without struts.

    Should I be using it? Im too unknowledgeable to even know what question to ask. I use EJB, and I have a webapp. I'm just baffled.
  • java server faces (Score:2, Insightful)

    by rhyd ( 614491 ) on Tuesday December 31, 2002 @12:52PM (#4988825)
    i thought these [sun.com] were going to replace struts sometime soon...
  • ok folks (Score:2, Insightful)

    by Anonymous Coward on Tuesday December 31, 2002 @01:00PM (#4988886)
    say it with me now ...

    "web-work is monkey-work"
    "web-work is not amazing"
    "web-work takes a pea sized brain"

    i should know - i do web work. because it pays.
    because some bunch of fools decided to pay me for
    it does not make it clever. because some bunch of
    fools decided to pay You for it definitely doesn't
    make it clever. step back and look at what you
    do and then tell yourself there is anything
    remotely complex in there. there isn't. its
    crap. its not scottish its crap. quit selling
    me books about crap. quit pushing your crap on
    everyone else. crap crap crap crap crap.
  • Re:ok folks (Score:2, Insightful)

    by fraxas ( 584069 ) on Tuesday December 31, 2002 @01:16PM (#4989012)
    The majority of web-work -- as you put it -- is crap.

    Lucky for us, most of web application development isn't web work -- it's application development. So we're not so crapful after all.

  • Is it just me...? (Score:3, Insightful)

    by Malic ( 15038 ) on Tuesday December 31, 2002 @01:21PM (#4989065)
    ...or is it that Struts, JavaServer Faces and MVC methodologies merely enforce good coding techniques/styles that one should be using anyway? Regardless of if you are using PHP, Perl, etc.

    Or is there something more here?

    Sometimes I think Java, OO and other development technologies are like grammer school teachers hovering over our heads saying, "Now, we *know* you are going to be sloppy if left on your own, so are going box you in so that you CAN'T do those sloppy things."

    Except that you still can. VERY easy to understand and maintain applications can be coding procedual languages. VERY difficult to understand and maintain applications can be written in OO languages.

    But I digress... by nature.
  • by xdrone ( 597762 ) on Tuesday December 31, 2002 @01:54PM (#4989296)
    his looks like the abstraction used in asp.net which changes the interaction of web pages to an event based model rather than just posting back forth and checking user values. (correct me if i'm wrong)

    it's a big step forward cleaning up web programming. i'm sure it will come to php sooner or later, although i'm happy with old stylee.
  • by javabandit ( 464204 ) on Tuesday December 31, 2002 @03:08PM (#4989837)
    I have used Struts, and personally, I really don't see anything special about it. While I agree that having "scriptlets" in your HTML is generally bad form, I have similar problems with putting Java-centric tags in presentation code as well.

    Struts, Java Server Faces, Servlets... All of these tools do not solve a real issue at hand, which is that when it comes to internet/HTML applications, the presentation layer should not tie you to any language, or to any language-specific framework.

    I should be able to write a "View" that simply Looks at a standard XML-based model, and construct my page from that. Without having to put any kind of Java or Java-based tags in my code. XSLT comes far in doing that, but has a few shortcomings.

    The missing piece is a standardized interface upon which posts/gets etc... can be performed without regard to the View, or to the language used in the application server. This interface should of course handle necessary things such as session management, authentication, and the like. This way, we could change out our underlying backend without having to change the presentation code at all.

    This is where I give CORBA a lot of props. It definitely had some problems, but it was a wonderful intermediate interface that didn't care who its client was. As long as the client spoke IIOP... life was good.

    The same should be done for web interfaces. The presentation layer should not care beans about the backend... expect that the container is aware of a common/neutral interface. No vendor specific tags. No language-specific tags. No proprietary garbage that ties you to any particular container.

    XML, XSLT, XSD are great. Java is great. All these technologies are great. But the lack of a common interface/framework which seamlessly ties them together for web applications is the real problem.
  • by rutledjw ( 447990 ) on Tuesday December 31, 2002 @04:28PM (#4990359) Homepage
    No, no, no. As you get going in Java you'll be the logic in it. As a novice programmer, it SHOULD take you a lot longer to use a tool like struts than use (whatever). You're still getting used to the syntax, flow and appropriate use of Java.

    As you get going, there becomes a more elegant technique to using teh language. Tools like struts fill the need.

    Learn what you can now and don't worry about it, the usefullness of struts will become evident as you progress.

  • by CorwinOfAmber ( 39299 ) on Tuesday December 31, 2002 @05:04PM (#4990518) Homepage
    I haven't gotten into it a lot, but it seems to take me a whole lot longer to get a project done with struts than if I just used scriplet code.

    Well of course it's going to be faster and easier (for you) to just put all of the code in scriptlets. But I sure wouldn't want to have to maintain your code. You don't separate your business logic from your display code because it's faster to develop it; you separate your code to make it easier to maintain, and more robust. Writing maintainable code is always going to be a bit more work in the short term, but it pays off over the long term.

Say "twenty-three-skiddoo" to logout.

Working...