Hehe, I didn't know Ben was looking at introduction stuff on your site.
In light of that, I say ignore everything EXCEPT what Rick posted here :) KISS, until you know you need something more.
I do think it spawned a very worth-wild exchange though, so good job Ben! :) Who knows... if what I put together is received well, you may have contributed to improving Struts!!
-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com
Rick Reumann wrote:
Dakota Jack wrote the following on 3/7/2005 5:16 PM:
I am not sure what you mean by "page-centric", Rick. But, I don't
think you can use Struts in a "page-centric" way if you mean the way
Shale or JSF operate.
Sorry, I didn't mean by the way Shale or JSF operates (haven't even looked at Shale yet, but mean to:). What I meant was that typically most applications have forms that submit to an Action and fire off a dispatch method (or execute if just one Action). So in other words, most of the time you don't have several different versions of the an "employee form" and multiple places you can potentially go aftewards (yes I know there are exceptions). So by page centric I mean that there is typically a one-to-one correspondence between your view and the action that gets called from that view. This is all I meant by page-centric.
The only reason I mention this is because the intial question had to do with the "setup" method and I see the main drawback to that approach only being when you need to use the same dispatch/execute method and can forward to many different places when the event is completed. Typically, though, I'm saying this isn't usually the case. For a typical web app a setup or prep method isn't that much work (couple lines of code). Sure there are things more eloquent <inject cool IoC stuff here>, but since Ben was viewing the newbie tutorials I have on my site, I'm thinking many of the posts might have overwhelmed him. I think the simple answer was to just state to use a single Dispatch Action and add a prep() method in there that you can call to do any population of the view (My guess is he wasn't aware of the dispatch stuff yet and found it annoying to have to create a whole Action class just to handle the set up of a page.)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]