>From my viewpoint, it's important to distinguish between the StrutsContext and >the application's context.
Right now, the Commons Chain package implies a different approach, where a WebContext might be passed up to the application layer under the Context interface. In my own work, I like to allow the application layer to have its own speciality Contexts, that are easy to populate from another Context, or from other members. In my own work, I'm in the process of building on a request-response business layer framework based on Commons Chain. It has its own POO (plain old object) Context that can be used with any presentation layer, including a testing environment or command line program. The idea is that the Action (or code-behind or backing bean) collects whatever values are needed for a request (or Command) and submits a Context to the business layer. All of the processing takes place in the Command (or Chain of Commands), including authorization, validation, and message resolution. What's left for the presentation tier is to decide what page to display, and then emit the markup that puts pixel to screen. As to the all-seeing Web context, all of those objects already exist. The StrutsContext does not create them, but simply provides a facade. -Ted. On Fri, 17 Dec 2004 10:58:44 +0000, Pilgrim, Peter wrote: > When I reread this note, it occurred to me that this is > similar to the way Expresso Controllers are implemented, > except the ``Context'' is split into ``ControllerRequest'' > and ``ControllerResponse''. The design was inspired by the > Java Servlet API specification `ServletRequest', > `ServletResponse'. > > So I'd agree with this `bigger' all-seeing-context design > in principle. I'd factor out some interfaces for Struts > web environment so that people in theory could re-sig > the implementation. > > 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 > > class FooCommandAction { > public Context createKiddieOnContext() { > ... > > PhotoImage image = new PhotoImage( 2048, 2048 ); // > 4Mega Pixel grabPhotoFromPersistence( > "mallorca0001.jpg", image ) context.put( "myPhoto", > image ); ... return context; > } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]