It would be nice to have a pluggable context-scope aliasing framework, which would allow retrieval of either absolute scopes ("Root") or relative scopes ("Parent", "Session") within the context-scope stack.
Here's how I envision this going:
- You have the option when setting up the execution context to supply a scope-naming package, which would interpret/access the scope stack and assign names to certain scope instances. This would allow the MSP (marmalade server pages) environment to specify a ServletNaming plugin, which would allow direct access to "Page", "Request", "Session", and "Application" scopes.
- If you don't supply a scope-naming plugin, one will be provided for you. The default naming plugin might simply have pointers to "Root" and "Parent"...
The implication is that we need two ways of referencing context scopes:
- absolute references (never changes, regardless of sub-scope creation and destruction)
- relative references ("Parent" will always be
- 1) and will adjust as the current context shifts.