Hi Jerome,

Jerome Louvel <contact <at> noelios.com> writes:

> Thanks for detailing your requirements with concrete code. I think you can
> already cover your need for application level state (shared by all Resources
> and Restlets) by leveraging Context's attributes:

I considered that and looked for a better way. Passing application data 
via context is a dangerous practice:
- Namespace collisions
- Tight coupling through convention
- Not type safe
- Difficult to maintain
- Difficult to debug
This is one of the reasons we don't use JSP. Restlet is a strong project that
promotes good practices. I think it would be wise to continue that in all
respects. Promoting the use of contexts for data passing is counter to that.
That's not to say there isn't utility in contexts. I just think 
Restlet application developers should be discouraged from using contexts
and, whenever possible, be provided with a safe alternative.

Sean

Reply via email to