[Opensource] prePerform(), postPerform() Template Methods
Peter A. Pilgrim
peterp at xenonsoft.demon.co.uk
Mon Nov 17 17:46:05 PST 2003
Michael Rimov wrote:
> At 12:49 PM 10/29/2003, you wrote:
>
>> great! ...what methods? ...don't see any obviously-named methods
>> that Controller.java inherits...
>
>
>
> I never answered this. And it turns out that I was wrong :( The key is
> the Struts RequestProcessor... and that's getting seriously modified by
> the Struts community. [Enough so that Craig M warns that backwards
> compatibility issues for custom request processors will definitely occur]
>
> So! Back to +1 for prePerform()/postPerform() :D
>
The class that need changing is `com.jcorporate.expresso.core.controller.Controller'.
This is where you add the `prePerform()' and `postPerform()'.
Yet it does not make quite sense for the Controller class itself.
The preprocessing method would be executed before any state method is called,
and postprocessing method would be executed after any state method.
Is this what you really want? Two global hooks across all the StateMethods
in the call. What is the design case here?
If you do modify it, then consider the security implications.
A subclass could gain access to a guarded state method that is blocked
in a superclass. The information in the request scope is available to
the pre-hook method and thus sensitive information could be usurped.
Also what happens to the exception handling?
If an exception is raised in the pre-hook does that abort the process.
The Struts Request Processor is getting changed to Common Chains.
The Common Chains may be way for Expresso Framework to hand out
low level `Controller', which is subclass of the Struts Action class.
We could have Expresso Commands to handle business operation just
like we have in the Controllers but instead these `Expresso Commands'
would be must more standalone, independent, and lighter in weight.
They could be chained together to business flow-like applications.
Just thoughts.
--
Peter Pilgrim
__ _____ _____ _____
/ //__ // ___// ___/ + Serverside Java
/ /___/ // /__ / /__ + Struts
/ // ___// ___// ___/ + Expresso Committer
__/ // /__ / /__ / /__ + Independent Contractor
/___//____//____//____/ + Intrinsic Motivation
On Line Resume
||
\\===> `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
More information about the Opensource
mailing list