"Geir Magnusson Jr." wrote:
> Will Struts formalize a 'contract' with those resources, or is it "Use our
> tool or you are screwed..."

I don't actually see how we could do that, even if we wanted to -:o)



> Also, what happens if I want to use the struts controller outside of a
> webapp?  Will that be possible?

As a practical matter, I'm not sure that it's really possible now. A
non-http action was defined at the beginning, but I'm not sure that
anyone is using it, or how well it would work in practice.



> I agree 100%.  I just don't think it necessarily has to be a single API
> object, but more like a definition about where things will be that all users
> can get to.  

The definitiosn are laid out in the Action class. 

http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.html

via the *_KEY statics.

The RequestUtil class taps these defintions directly, but I think we
agree that a better way to go is to define an actual API object to
encapsulate these definitions. 

One approach would be to define an API object for each servlet context,
and have them progressively reveal each other. The Session-scope API
would extend Application-scope API, and the Request-scope API would
extend the Session-scope API. 

If another platform used something other than Request-scope, they could
extend the Session-scope API their own way. It's just that there are
framework elements, like messages, that are user or user-locale
specific, and so live in the Request scope. These have to be handled
some way. But, looking at the forest, what we are really talking about
is global-scope objects, user-scope objects, and presentation-scope
elements, which can each be presented on their own "layer" of the
controller's API. The standard HTTP implementation of the
presentation-scope layer would look to the HttpRequest, but another
implementation could look elsewhere.

Sound like plan?


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to