struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "PILGRIM, Peter, FM" <Peter.PILG...@rbos.com>
Subject RE: [struts-chain] Some ideas
Date Thu, 13 Nov 2003 11:55:20 GMT

> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: 12 November 2003 02:06
> To: Struts Developers List
> Subject: Re: [struts-chain] Some ideas
> 
> 
> Quoting Konstantin Shaposhnikov <k8n@tut.by>:
> 
> > Thank you for quick response and your ideas about the
> > implementation. 
> > 
> > But can I ask you why I can't use the second
> > approach with struts 1.1. I explore struts-chain code once
> > again and found that I only need to change 1 Command in
> > servlet-standard chain. 
> > 
> 
> You can certainly customize the chain if you want to use it 
> with Struts 1.1, but
> that means you are playing with unreleased code and having to 
> live with
> whatever restrictions exist (for instance, file upload is not 
> currently
> supported in the existing chain definitions).
> 
> I am imagining a day where we'd build the standard 
> RequestProcessor for Struts
> 1.2 on top of the chain implementation.
> 

That would be best.

> > And what means "provided for backwards compatibility with
> > Struts 1.1" ? Will the next release replace Actions with
> > something else?
> > 
> 
> One of the key things people would look for from Struts 1.2 
> is a relatively easy
> migration of existing Struts-based apps.  Therefore, it would 
> seem best for us
> to be able to call an app's existing Action classes (as the current
> struts-chain implementation does).
> 
> In a future world solely based on chain, you wouldn't need 
> the idea of an Action
> class at all.  Instead, you'd map the <action> element in 
> struts-config.xml to
> the name of a chain, which could either be a single Command 
> or a series of
> Commands -- Struts would not care.  In this environment, 
> there would still be a
> standard set of commands in the standard chain, to do all the 
> standard stuff
> (like populating a form bean, performing validation, and so 
> on).  But the
> thinking is that the app's business logic would be built out 
> of chains as well,
> which can (of course) be arbitrarily complex in their 
> internal structure.
> 

At the moment Expresso Framework is leveraging off the Struts MVC.
Our `Controller' classes are extension of the Struts `Action' 
class. If the Action class is going I would like to know about it.

I may have asked this question before is the `Action' going to
be `Command' eventually.

> Among other things, this would allow people to not have to 
> attempt to use
> "action chaining", which today causes surprising results.  
> Instead, you could
> build little two-Command chains -- the first would process 
> the form submit, and
> the second would do the appropriate setup for the next page 
> to be displayed. 
> Because these two behaviors would be separated, you could 
> reuse either or both
> of them (for example, cases you need to forward to a 
> particular page from more
> than one place, and perform the same setup behavior each 
> time, could share the
> second command.

When people like myself have been using Action Chaining
we have been setting up the second action dynamically.
It is kind of a dynamic multiplexing. What Craig has
written above describe static chaining, I presume with
the XML configuration file. I suppose what I would
want is like having a `Command' add the next command to 
end of the `Catalog' at run-time. I need to really delve
into the chain code myself and check if such a thing
is possible.

Of the top my head, for this scenario, it does not make
sense for an `Action' to be a `Command'. Instead a 
specialised Command should exist that can invoke any 
`Action' in current `ModuleConfig'. I am sure such a beast 
already exists anyway. 

> 
> > best regards,
> > Konstantin
> > 
> 
> Craig
> 

--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923


***********************************************************************************
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
             Regulated by the Financial Services Authority

            Visit our website at http://www.rbs.co.uk/CBFM/
***********************************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message