From: Rickard <ri...@mi...> - 2002-03-11 13:38:11
|
Jim...@do... wrote: > -1 > I'm against hardcoding validation on every command action=20 > indescriminately. But then again, I'm against hardcoding validation che= ck=20 > in doExecute. From a practical standpoint, many of us who use the=20 > CommandDriven design, do so in order to "setup" a page. This is a very=20 > common step with no need for validation. Putting an extraneous check in= =20 > these cases does not feel like good design. I personally use commands for CRUD operations (i.e. one action with=20 modifying 3 commands plus execute() for Read). In my case validation is=20 hence used for the commands but not necessarily for execute(). How are others using commands? > I think the action designer can choose to call doValidation (or validat= e)=20 > when they feel it is appropriate. If they want the blanket validation, = it=20 > is trivial to add to an ActionSupport subclass, however if it is embedd= ed=20 > as the default behavior, then the options narrow.=20 Ok, so in your view we should remove the call to validate() entirely=20 from execute()? I.e. it should always be explicit whether validation is=20 used or not? I can see your point.. it would make things much more explic= it. This is a big decision... what are other's opinion on this? /Rickard --=20 Rickard =D6berg Author of "Mastering RMI" Chief Architect, TheServerSide.com The Middleware Company - We Build Experts! |