Java Struts: Book Recommendation?

Discussion in 'Java' started by Steve, Nov 17, 2010.

  1. Steve

    Steve Guest

    I'm an experienced Java/JSP programmer.

    I don't know anything about struts. I was poking around on Amazon.
    Most of the books seemed to be very old and very large/bloated.....as
    well as not being free of significant complaints.

    I'm looking for a good introductory book, preferably not to large/
    bloated.

    Care to recommend a title?

    Thanks in advance
    Steve, Nov 17, 2010
    #1
    1. Advertising

  2. Steve

    Arne Vajhøj Guest

    On 17-11-2010 16:39, Steve wrote:
    > I'm an experienced Java/JSP programmer.
    >
    > I don't know anything about struts. I was poking around on Amazon.
    > Most of the books seemed to be very old and very large/bloated.....as
    > well as not being free of significant complaints.
    >
    > I'm looking for a good introductory book, preferably not to large/
    > bloated.
    >
    > Care to recommend a title?


    Given that Struts is old (I am assuming Struts 1 here!), then
    an old book should not be a problem.

    I like "Struts in Action".

    Arne
    Arne Vajhøj, Nov 18, 2010
    #2
    1. Advertising

  3. Steve

    David Segall Guest

    Steve <> wrote:

    >I'm an experienced Java/JSP programmer.
    >
    >I don't know anything about struts. I was poking around on Amazon.
    >Most of the books seemed to be very old and very large/bloated.....as
    >well as not being free of significant complaints.
    >
    >I'm looking for a good introductory book, preferably not to large/
    >bloated.
    >
    >Care to recommend a title?


    I cannot recommend it but I am happy to give you "Struts The Complete
    Reference" if you pay the postage. It covers Struts 1.2 and is the
    first edition of this <http://www.jamesholmes.com/StrutsTCR/>. It is
    large (over 500 pages) and paying the postage may too expensive
    because I am in Australia. The reason I can't recommend it is because
    I had a brief look at the book and fled to JSF.

    Email me at david at segall . net if you feel like it.
    David Segall, Nov 18, 2010
    #3
  4. Steve

    Lew Guest

    David Segall wrote:
    > I cannot recommend it but I am happy to give you "Struts The Complete
    > Reference" if you pay the postage. It covers Struts 1.2 and is the
    > first edition of this<http://www.jamesholmes.com/StrutsTCR/>. It is
    > large (over 500 pages) and paying the postage may too expensive
    > because I am in Australia. The reason I can't recommend it is because
    > I had a brief look at the book and fled to JSF.


    Fair dinkum, mate. JSF is superior IMO also.

    --
    Lew
    Lew, Nov 18, 2010
    #4
  5. Steve

    Steve Guest

    Re: Java Struts: Book Recommendation?

    On Nov 17, 7:43 pm, Arne Vajhøj <> wrote:
    > Given that Struts is old (I am assuming Struts 1 here!), then
    > an old book should not be a problem.
    >
    > I like "Struts in Action".


    I'm concerned that an older book may not cover new developments in
    struts. Is this a valid concern with "Struts in Action"?

    Also is the proper name "Jakarta Struts" versus "Java Struts"?

    Thanks Arne

    Steve
    Steve, Nov 18, 2010
    #5
  6. Steve

    Steve Guest

    Re: Java Struts: Book Recommendation?

    On Nov 18, 9:01 am, David Segall <> wrote:

    > I cannot recommend it but I am happy to give you "Struts The Complete
    > Reference" if you pay the postage.


    LOL! :) Thanks. I feel you pain. I have a few textbooks like that
    myself. Some of them are being used to boost up my monitor. One of
    these days I will schlep them to a recycling center so I don't have to
    feel guilty for throwing out a book :).



    > I had a brief look at the book and fled to JSF.


    What is JSF? Java Sever F____ ?

    Thanks

    Steve
    Steve, Nov 18, 2010
    #6
  7. Steve

    Arne Vajhøj Guest

    Re: Java Struts: Book Recommendation?

    On 18-11-2010 16:09, Steve wrote:
    > On Nov 17, 7:43 pm, Arne Vajhøj<> wrote:
    >> Given that Struts is old (I am assuming Struts 1 here!), then
    >> an old book should not be a problem.
    >>
    >> I like "Struts in Action".

    >
    > I'm concerned that an older book may not cover new developments in
    > struts. Is this a valid concern with "Struts in Action"?


    Still assuming Struts 1, then 1.2.x is from 2004 and 1.3.x is
    from 2006.

    Not much new development.

    > Also is the proper name "Jakarta Struts" versus "Java Struts"?


    Apache Struts

    http://struts.apache.org/

    Arne
    Arne Vajhøj, Nov 18, 2010
    #7
  8. On 18-11-2010 09:07, Lew wrote:
    > David Segall wrote:
    >> I cannot recommend it but I am happy to give you "Struts The Complete
    >> Reference" if you pay the postage. It covers Struts 1.2 and is the
    >> first edition of this<http://www.jamesholmes.com/StrutsTCR/>. It is
    >> large (over 500 pages) and paying the postage may too expensive
    >> because I am in Australia. The reason I can't recommend it is because
    >> I had a brief look at the book and fled to JSF.

    >
    > Fair dinkum, mate. JSF is superior IMO also.


    It is a lot newer, so if it were not, then somebody would
    really have fucked up.

    But there is still a lot of Struts code out there that need
    to be maintained.

    Arne
    Arne Vajhøj, Nov 18, 2010
    #8
  9. Steve

    Lew Guest

    Re: Java Struts: Book Recommendation?

    Steve wrote:
    > What is JSF? Java Sever F____ ?


    <http://lmgtfy.com/?q=JSF+Java+Server>

    --
    Lew
    Lew, Nov 19, 2010
    #9
  10. Steve

    Steve Guest

    Re: Java Struts: Book Recommendation?

    On Nov 19, 12:32 am, Lew <> wrote:
    > Steve wrote:
    > > What is JSF?   Java Sever F____ ?

    >
    > <http://lmgtfy.com/?q=JSF+Java+Server>


    Funny!, I'm totally using that site and I'm not giving you credit.
    Who would of thought, an elegant way of RTFMing people :)


    It looks like the same idea, just a different implementation.

    I worked for a company that sort of rolled their own. A dispatcher
    servlet, taking requests, reading a database table, then deciding to
    send the user to a java class, JSP or HTML page as a response.

    That is what struts and JSF seem like.
    Steve, Nov 19, 2010
    #10
  11. Steve

    Lew Guest

    Re: Java Struts: Book Recommendation?

    Steve wrote:
    > I worked for a company that sort of rolled their own. A dispatcher
    > servlet, taking requests, reading a database table, then deciding to
    > send the user to a java [sic] class, JSP or HTML page as a response.
    >
    > That is what struts and JSF seem like.


    I've "hand-rolled" a number of those so-called "Model 2" sites also. JSF is
    rather different. Unlike Struts, it doesn't use a single front-controller
    model, but uses a multiplicity of controllers - loosely speaking, one per
    screen. It also imposes a component model on the screens, sort of like Swing
    or other GUI frameworks, but of course different in order to work on the Web.

    The expansion of JSF into facelets and XHTML makes it even groovier.

    I came from the front-controller world of Model 2 and Struts into JSF myself.
    It took some getting used to, but now I find it very useful.

    --
    Lew
    Lew, Nov 20, 2010
    #11
  12. Steve

    Tom Anderson Guest

    Re: Java Struts: Book Recommendation?

    On Fri, 19 Nov 2010, Lew wrote:

    > Steve wrote:
    >
    >> I worked for a company that sort of rolled their own. A dispatcher
    >> servlet, taking requests, reading a database table, then deciding to
    >> send the user to a java [sic] class, JSP or HTML page as a response.


    As an aside, Lew, do you think the [sic] is necessary in blocks quoted
    using the > convention? Doesn't that already imply literal,
    copy-and-paste, quotation? Isn't using both a bit like writing "java [sic]
    [sic]", which implies that someone actually wrote "java [sic]"? I
    appreciate that if you were quoting inline, the [sic] would be
    appropriate, but here it seems not just redundant but erroneous.

    >> That is what struts and JSF seem like.

    >
    > JSF is rather different. Unlike Struts, it doesn't use a single
    > front-controller model, but uses a multiplicity of controllers - loosely
    > speaking, one per screen. It also imposes a component model on the
    > screens, sort of like Swing or other GUI frameworks, but of course
    > different in order to work on the Web.


    I've never used JSF. I knew about the component model stuff, but i hadn't
    heard about the multiple controllers. Would you say that either is a
    bigger part of JSF than the other? Is it possible to use the multiple
    controllers with plain JSP, should you want to? Would it be possible for
    you to write or direct me to a brief explanation of how the multiple
    controllers work?

    > I came from the front-controller world of Model 2 and Struts into JSF
    > myself. It took some getting used to, but now I find it very useful.


    Have you had any contact with Stripes at all? My knowledge of web
    frameworks is embarrassingly limited, and this is something i am slowly
    trying to address. I worked with plain old J2EE back in the day, and since
    coming back to programming have been working with something called ATG
    Dynamo, which is a bit of a beast [1], but does have a flexible and
    tractable web framework. I've started playing with Stripes in my own time;
    it was written by people who'd used Struts 1 but weren't happy with it, so
    i assume it is similar but superior to that. It's not a million miles from
    what ATG does, which is helpful, but i'm curious as to whether there are
    frameworks which use a radically different model.

    Anyway, Stripes, i would say, has a single controller with no
    intelligence. You set up its filter and dispatcher servlet in your
    web.xml, which don't really take any app-specific configuration, then in
    your JSP, you write:

    <stripes:form beanclass="com.initech.smslottery.PlayActionBean">
    <stripes:text name="mobilePhoneNumber"/>
    <stripes:submit name="play" value="Play!"/>
    </stripes:form>

    And in your code you write:

    package com.initech.smslottery;
    public class PlayActionBean implements ActionBean {
    // a few minor details omitted
    private String mobilePhoneNumber;
    public String getMobilePhoneNumber() {return mobilePhoneNumber;}
    public void setMobilePhoneNumber(String mobilePhoneNumber) {this.mobilePhoneNumber = mobilePhoneNumber;}
    public Resolution play() {
    enterNumberIntoLottery(mobilePhoneNumber);
    return new ForwardResolution("/lottery/thanks.jsp");
    }
    }

    When you submit the form, the controller finds the class named in the
    beanclass attribute of the stripes:form element, creates an instance, then
    for each stripesified input in the form, calls the corresponding setter on
    it, then calls the handler method named in the stripes:submit element.
    That does what it needs to do, then returns a Resolution which indicates
    what the response to the browser should be (usually a redirect to a page
    or another form; Stripes is built around the redirect-after-post pattern
    of request handling, although i think you can serve a page back directly),
    which the controller duly puts into action.

    However, it's possible my terminology is wrong here - it might be that the
    ActionBeans are controllers, in which case there is one per page (ish).

    tom

    [1] It's also the Snake Plissken of app frameworks; whenever i mention to
    people, the response, if they've heard if it, is "I thought that was
    dead".

    --
    It takes at least 17 habbos to make a visible swastika.
    Tom Anderson, Nov 20, 2010
    #12
  13. Steve

    Lew Guest

    Re: Java Struts: Book Recommendation?

    Steve wrote:
    >>> I worked for a company that sort of rolled their own. A dispatcher
    >>> servlet, taking requests, reading a database table, then deciding to
    >>> send the user to a java [sic] class, JSP or HTML page as a response.


    Tom Anderson wrote:
    > As an aside, Lew, do you think the [sic] is necessary in blocks quoted
    > using the > convention? Doesn't that already imply literal,
    > copy-and-paste, quotation? Isn't using both a bit like writing "java
    > [sic] [sic]", which implies that someone actually wrote "java [sic]"? I
    > appreciate that if you were quoting inline, the [sic] would be
    > appropriate, but here it seems not just redundant but erroneous.


    OK.

    Don't you think that people using the Java language should at the very
    freaking least spell the name of the language correctly? I do.

    I take such carelessness as symptomatic or emblematic of the crappy code I
    often inherit on projects at work.

    Lew wrote:
    >> JSF is rather different. Unlike Struts, it doesn't use a single
    >> front-controller model, but uses a multiplicity of controllers -
    >> loosely speaking, one per screen. It also imposes a component model on
    >> the screens, sort of like Swing or other GUI frameworks, but of course
    >> different in order to work on the Web.


    Tom Anderson wrote:
    > I've never used JSF. I knew about the component model stuff, but i [sic]


    :)

    > hadn't heard about the multiple controllers. Would you say that either
    > is a bigger part of JSF than the other? Is it possible to use the


    "Part"? Ok, in the sense of "aspect", they're as big a part of JSF as the
    fact that it uses tags or works in web-based applications.

    > multiple controllers with plain JSP, should you want to? Would it be


    Of course. You can hand-code anything a framework provides.

    > possible for you to write or direct me to a brief explanation of how the
    > multiple controllers work?


    <http://st-www.cs.illinois.edu/users/smarch/st-docs/mvc.html>

    The front-controller pattern is a simplified form of the MVC pattern.

    Lew:
    >> I came from the front-controller world of Model 2 and Struts into JSF
    >> myself. It took some getting used to, but now I find it very useful.


    tom:
    > Have you had any contact with Stripes at all? My knowledge of web


    Only the movie starring Bill Murray, et al.

    [snip]
    > [1] It's also the Snake Plissken of app frameworks; whenever i mention


    Great reference! Good ol' one-eyed Snake!

    > to people, the response, if they've heard if it, is "I thought that was
    > dead".


    In the sequel Peter Fonda's character prepares to ride the impending tsunami.
    You know what it means when you're conversing with a tsunami surfer? It
    means they haven't done it yet.

    --
    Lew
    "Psychic medium" is a redundant term.
    Lew, Nov 20, 2010
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Hellberg

    Book recommendation - Application Architecture!

    Stefan Hellberg, Jul 9, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    420
    Kevin Spencer
    Jul 9, 2003
  2. John Smith Jr.

    Book recommendation

    John Smith Jr., Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    403
    Alvin Bruney
    Jan 15, 2004
  3. jesse

    java book recommendation

    jesse, Jan 4, 2004, in forum: Java
    Replies:
    6
    Views:
    2,418
    TechBookReport
    Jan 7, 2004
  4. Jason
    Replies:
    0
    Views:
    340
    Jason
    Sep 25, 2006
  5. Martijn Mulder
    Replies:
    2
    Views:
    422
    Simon Brooke
    Jul 28, 2010
Loading...

Share This Page