Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-29 Thread David Kennedy
Rick Reumann wrote: David Kennedy wrote the following on 3/18/2005 9:01 PM: > [snip me talking about Layout] But the above has never been the role of struts - to create view components. Yes, I agree and understand the relationships between the projects better now. I must apologise, much of the pr

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-21 Thread Rick Reumann
David Kennedy wrote the following on 3/18/2005 9:01 PM: Totally agree. For example, I did some work with Struts Layout:Treeview for my nav bar prototype. I very much appreciate volunteer effort, and don't wish to knock anyone's efforts, but I have to say that for a standard solution advocated by

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-21 Thread Rick Reumann
Andrew Hill wrote the following on 3/20/2005 10:51 PM: As for dispatch actions... hehe Im not making *that* mistake again. urrrgh! Ill stick with a normal action and an 'if' statement in future thanks :-) How does using if logic in a regular Action make things better than using a DispatchAction?

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-20 Thread Andrew Hill
Yes. I always validate in Actions and not in the form itself (though I often delegate to a seperate helper class from the action (and configure the helper in a subclass of ActionMapping and have an abstract action superclass manage its lifecycle)). Validating in the form I find to be troublesom

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-20 Thread Joe Germuska
David, no worry about insulting anyone -- you raise good points. Jack wrote: Ted will tell you that only code matters. But, I think some things other than just code matter to some of the people involved. While Ted can speak for himself, I don't think that he'd tell you that. He himself is an avi

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Dakota Jack
I for one am more than interested in honest, informed, opinion such as yours, David. Thanks! To be fair, Struts presently is in a bit of a transition with things a bit in the air. On the one hand, the origional architect is hired on another competing project and is trying to pull a heist on the

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Dakota Jack
The thing, for me, Frank, is that I like to reuse code as much as possible. So, I treat most aspects of coding in Struts not unlike coding an application which is good for any environment, and any framework. This is also true of validation for me. I don't want to be tied to any particular soluti

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Diego Espada
I do all my validations in the action, and it works great for me. I built a layer upon the action that allows me to activate / deactivate validation for some actions. So i turned my actions into page controllers. I suppose some people would argue that this "resists" the framework, but i think that

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread David Kennedy
Sorry, this is going to be a fairly off-topic reaction post, but Lawrie's comments struck a chord with me. Lawrie Gallardo wrote: I'm relatively new to Struts and I have to say that I've found it to have a realtively steep learning curve. And the only reason for this is that there are so many d

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Frank W. Zammetti
Interesting approach Jack. It seems like a somewhat unnecassery layer though... But then again, as with all architectural decisions, if you had a reason for it, then it's a good solution (unless it's a bad solution! :) ) I suppose it comes down to what is actually in an Action... If it is abs

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Joe Germuska
However, even sticking to the current multithreaded Action model, why would this cause problems with validation? The ActionForm is currently passed by the ActionServlet as a parameter to the Action's execute() method - surely the ActionServlet could similarly pass the ActionFrom as a parameter

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Hubert Rabago
I was waiting for another period where tons of commits were happening. That's when I'd sneak in this one and see if anybody notices. :) Now before somebody thinks I was serious (about the sneaking in part) -- this actually is on my radar. I plan on digging up the arguments around it. Speaking

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Dakota Jack
You don't have to have a large file. I use the dispatching to organize in a sort of "controller" fashion delegating processing to other files. I do this when I have an AdministrativeAction, for example. I use separate classes not unlike the way you use instantiations of Action subclasses in your

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Joe Germuska
Hubert Rabago wrote: > >That certainly is one practice. Personally I don't use that. I >mostly use my own Action subclasses, or if I want dispatch >functionality, I used to use MappingDispatchAction. Now I use the > >ActionDispatcher class in >http://issues.apache.org/bugzilla/show_bug.cgi?

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Lawrie Gallardo
From: Joe Germuska <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Lawrie Gallardo" <[EMAIL PROTECTED]>, user@struts.apache.org Subject: Re: Wouldn't validation be better performed by Actions rather than ActionForms? Date: Fri, 18 Mar 2005 14:

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Hubert Rabago
ECTED]> > >Reply-To: Hubert Rabago <[EMAIL PROTECTED]> > >To: Struts Users Mailing List > >Subject: Re: Wouldn't validation be better performed by Actions rather than > >ActionForms? > >Date: Fri, 18 Mar 2005 11:39:33 -0600 > > > >Inline. > >

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Joe Germuska
At 7:35 PM + 3/18/05, Lawrie Gallardo wrote: Thanks for your detailed answers, Joe. Just a few queries though: Now, if my understanding is correct: 1. There is always a one-to-one mapping between an ActionForm and an ActionMapping, Often not true. Earlier today on the dev-list Ted H. describe

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Lawrie Gallardo
eel like I have a mountain ahead of me to learn all the necessary tips and tricks to do any serious development with it... Lawrie. From: Rick Reumann <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: Wouldn't validation

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Lawrie Gallardo
m doing this I'll have the thought at the back of my mind that I could be doing them much less painfully and efficiently with another framework...). Lawrie. From: Joe Germuska <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Lawrie Gallardo" <[EMAIL

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Rick Reumann
Lawrie Gallardo wrote the following on 3/18/2005 12:17 PM: Now if this is the case, would it not be better to have the ActionForm as basically a dum data holder and have the validation method in the Action classes instead? The strus-config.xml file could contain all the required declarative vali

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Hubert Rabago
post. > > Lawrie > > >From: Hubert Rabago <[EMAIL PROTECTED]> > >Reply-To: Hubert Rabago <[EMAIL PROTECTED]> > >To: Struts Users Mailing List > >Subject: Re: Wouldn't validation be better performed by Actions rather than > >ActionForms? > >D

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Frank W. Zammetti
I've always felt that class sizes should be reduced wherever possible. Even when the code is extremely simplistic, as should be the case in Actions generally, it's still more difficult to look through a higher volume of code (this is in fact a known metric that most code analysis tools use). Disp

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Dakota Jack
Where did you get this idea, Frank? This seems out of the blue on a thread about validation. I personally like the "new" dispatch action at http://www.michaelmcgrady.com/button/jsp/dispatch_action.jsp a lot. ///;-) Jack On Fri, 18 Mar 2005 12:25:00 -0500 (EST), Frank W. Zammetti <[EMAIL PROTEC

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Lawrie Gallardo
vely steep learning curve) and could reduce duplication when configuring applications. Lawrie From: "Frank W. Zammetti" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" CC: user@struts.apache.org Subject: Re: Wouldn'

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Frank W. Zammetti
On Fri, March 18, 2005 12:42 pm, Joe Germuska said: > I don't know if dispatch style is "best practice." It's my preferred > approach, but many experienced Struts developers don't like it much > at all. And then you've got wackos like Frank Z who like to write > more code just to show off their t

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Hubert Rabago
ROTECTED]> > >To: Struts Users Mailing List > >Subject: Re: Wouldn't validation be better performed by Actions rather than > >ActionForms? > >Date: Fri, 18 Mar 2005 11:27:11 -0600 > > > >You raise a lot of points, and I admit I won't be able to respond to

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Joe Germuska
At 5:17 PM + 3/18/05, Lawrie Gallardo wrote: I'm still relatively new to Struts, but I can't help but feel that validation would be better performed by Action classes rather than ActionForm classes. It seems to me that, ideally, you want 1. Validation, 2. Transformations (ie convert separate

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Hubert Rabago
Inline. On Fri, 18 Mar 2005 17:17:39 +, Lawrie Gallardo <[EMAIL PROTECTED]> wrote: > I'm still relatively new to Struts, but I can't help but feel that > validation would be better performed by Action classes rather than > ActionForm classes. > > It seems to me that, ideally, you want > 1. Va

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Lawrie Gallardo
s Mailing List Subject: Re: Wouldn't validation be better performed by Actions rather than ActionForms? Date: Fri, 18 Mar 2005 09:19:10 -0800 I don't think you want an Action doing the validation, but I am with you that validation does not belong to ActionForm. You don't have to do

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Hubert Rabago
You raise a lot of points, and I admit I won't be able to respond to all of them in one email (due mostly to time constraints). Besides, there are others who could respond, so I'll leave some out for them. :) There are/can be different levels of validation. Some validation you perform before oth

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Frank W. Zammetti
Is it really true that DispatchAction is now the accepted "best practice"? If so I have to say I disagree with that standard (if not, ignore me!) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Fri, March 18, 2005 12:17 pm, Lawrie Gallard

Re: Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Dakota Jack
I don't think you want an Action doing the validation, but I am with you that validation does not belong to ActionForm. You don't have to do it there, by the way. Jack On Fri, 18 Mar 2005 17:17:39 +, Lawrie Gallardo <[EMAIL PROTECTED]> wrote: > I'm still relatively new to Struts, but I can'

Wouldn't validation be better performed by Actions rather than ActionForms?

2005-03-18 Thread Lawrie Gallardo
I'm still relatively new to Struts, but I can't help but feel that validation would be better performed by Action classes rather than ActionForm classes. It seems to me that, ideally, you want 1. Validation, 2. Transformations (ie convert separate day, month and year HTML fields to Java Date ob