On Fri, March 18, 2005 10:32 am, Rick Reumann said:
> Ok, then how about using separate ActionForms and after each submits
> copy the properties (BeanUtils) to a POJO that you are using in Session
> scope to hold the values you finally need. This way you have the
> flexible separate ActionForms but still have a Master record holding
> what you need along each step. (Heck, you could even take the lazy way
> out and make the master session object a Map so you wouldn't even have
> to care about creating the pojo ahead of time.. although I still prefer
> a nice POJO over a Map for stuff like this.)

That's not a bad idea.  Can't say I ever thought of it :)  The one thing
that would turn me off is the reflection involved.  Reflection used to be
a Very Bad Thing(tm), but over the years its become not much of a problem.
 Still though, I prefer to avoid it where possible to minimize scalability
impacts (any extra overhead affects scalability of course).

Still though, what you suggest is not at all bad!

> Well, remember those 2000 lines of code are simply getters and setters
> which are easily auto-generated. It's not really complex lines of code.
> Really you are only maintaining field names. I do see  your point though
> about how it's nice having the ActionForms separate for a more resuable
> approach. I'd opt for the option I mentioned above first, if you want to
> keep the forms all separate.

True.  But even still, simply looking through more lines of code and
finding what you need, regardless of how simple or complex the code is, is
a pain the more code there is.

I'm not a believer in auto-generated code under any circumstance, even
something as clearly mundane as getters and setters.  I know that isn't
the majority position these days, and I understand the other side's
opinion, but I'm not there yet myself, so that argument doesn't fly with
me :)

> Actually you can validate on an action mapping basis and not on the form
> name, so only the fields you are interested in for the action mapping
> get checked.

Can you explain that?  Are you talking about using declarative validation?
 That is something I haven't used yet, but yes, I can see where that would
remove the point I made.

Certainly you would agree that if you choose to do validations in
validate(), you would have the problem I mentioned, right?  Or is there
something here for me to learn? :)

> Rick

Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to