struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Hickey" <bhic...@r-effects.com>
Subject Re: DB hit from ActionForm Validate method
Date Fri, 06 Sep 2002 13:44:25 GMT
Sean,

<SNIP> --  My question is whether it is acceptable or common practice to
> access the DB from the validate method or should DB access only be done in
> the LogonAction class (which means I'd move the perform functionality to
the
> LogonAction class)?
-- <SNIP>

IMHO, the answer is: logins are DB functions. Your role as a Struts
developer is to simply request the login and read the results of the
request. Understand that when you drag DB functionality into your Struts
app, you risk complexification (how about that word?) of your app and your
code. You may make maintenance a nightmare down the road.

Any DB worth a hoot has the capability of locking out users after X number
of attempts. It's a DBA thing as to how many and then how to reset.

Just a suggestion, but don't go there. You request the Login and wait for
the response. If it's bad news, report it to the user. Struts is all about
separation of Model - View - and Controller.

B


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message