Nono.. im not saying the server is gonna crash on 1 little bean in session
scope. Im just talkin about theory really. In theory, i want to avoid using
the session, if it means i have to code a little bit more, and we are just
talking about a LITTLE bit, then so be it. Im not doing a 1 for 1 match on
form fields and params either. Id be doing a
request.setAtrribute("MyOBJ", myObj) after it had been partially filled. It
really only amounts to a few lines of "extra" code on reading the hidden
fields. I'm probably over thinking this, and im sure the session is a fine
approach for this.
-----Original Message-----
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Monday, April 04, 2005 12:21 PM
To: Struts Users Mailing List
Subject: Re: Multi Step Forms
Brian McGovern wrote the following on 4/4/2005 12:01 PM:
> I see your points but I disagree. I try to keep session use to an
> ABSOLUTE minimum, because each session is stored in server memory and
> with every current user filling out form there is a change, be it slight
> or not, that the server will slow down or crash. I know it might be less
> desireable from a maintenance perspective buy my time and effort in
> development is a lesser concern weighed against the performance of a
> productions system. I totally understand that this probably won't
> happen, but planning for the worst case is never a bad idea.
But that's my point, if you server is going to crash because of bean
stored in Session scope that is holding simple properties, than there
are some serious issues with your server set up. What's ironic is I bet
you'll end up with a slower performance (at least from the user's
perspective) doing the other tricks you'll need to do in order to get
all of this to work using only the Request.
I totally agree in not use the Session for unnecessary operations that
do you not need persist, but for what you are doing is the exact reason
you have the Session. Do you think shopping carts persist all their
contents into hidden properties on each page as the user browses a
shopping site?
> I don't use action forms because I dont like em. No real reason other
> than that. I think action forms don't provide any real benefit if you
> are proficient in html and want precise to the pixel control of style on
> the presentation layer. Just my personal preference.
I'm not a big fan of Action forms either but my point is that you should
be persisting the information across requests in 'some' object and in
this case a Session-scoped Action form makes perfect sense. Think how
little coding you need with this approach vs your approach. If you don't
use an Action form, you should be persisting the user captured info at
least some POJO that you can persisst across requests.
Do you plan to grab each request parameter and shove it manually back
into the Request each time?
Do you actually plan to do...
request.setAttribute("firstName", request.getParameter("firstName") );
and then on the ensuing page have:
<input type="hidden" value="${firstName}"/>
and do this for every property?
All of this to avoid using Session scope? I just don't get it. Do you
really think the performance impact is going to be that big using the
Session to persist a bean for the time a user is logged on to your
application? If you are that concerned about the performance of this
Session scoped bean, you can always make sure you remove the bean from
Session scope when it's no longer needed, this way it only persists for
the time the user is using the X number of pages you are concerned with.
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]