struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject Re: composable RequestProcessor
Date Thu, 29 May 2003 02:22:12 GMT
>If you're really composing, would it make more sense to have the 
>composition happen in a config file?  Unless I misunderstand you, there's 
>still a fair bit of work required to implement a RequestProcessor interface 
>by writing an implementation class that calls on delegates.  There's no 
>reason you couldn't do both, though.
>

Either way, you're still "really" composing.  IDEs greatly limit the work 
involved in writing a class that delegates behavior to another class.

>I was thinking something like this:
>
><controller>
>   <request-processor className="com.foo.bar.MyRequestProcessor">
>     <delegate stage="actionForm" type="com.foo.bar.MyFormProcessor" />
>     <delegate stage="forwardConfig" 
>type="org.apache.struts.tiles.TilesForwardConfigProcessor" />
>   </request-processor>
></controller>

Most apps will use the RequestProcessor that comes with Struts.  Others will 
simply subclass and modify a few methods.  The composition use case should 
be supported but I think it's an edge case that the interface idea supports 
nicely without messing with the config file.

David

>
>Of course, this is a substantial change to the DTD, but it might still fit 
>into Struts 1.2....
>
>Joe
>
>--
>--
>Joe Germuska            Joe@Germuska.com  http://blog.germuska.com    "If 
>nature worked that way, the universe would crash all the time." 	--Jaron 
>Lanier
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
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