On Fri, 17 Dec 2004 10:58:44 -0000, Pilgrim, Peter
<[EMAIL PROTECTED]> wrote:
> [snip]
> Can a ``Context'' ever be too big? I mean, everytime a
> web user hits a submit then a naive implementation would
> create a big context object with a request, response,
> errors, etc. What if an naive Struts 1.3+ developer did this
> in his or her `FooCommandAction' for every web request

I think of "too big" as primarily a performance related constraint,
rather than a constraint on understandability.  Given that, the
potential peformance impacts can be dealt with (for a large number of
cases) by using lazy instantiation.

Just as an example, in JSF there is API to return you a Map of the
request parameters for a particular request
(FacesContext.getExternalContext().getRequestParameterMap()).  However
(in the JSF RI at least) this instance will *not* be created until the
first time it is requested -- and, after the first time for a
particular request, it will be cached.

The important issue is that the *framework* should not be a "naive"
implementation, in your termnology.

Craig

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

Reply via email to