Hi all,
 
I've just found time to read this thread and enjoyed it very much. It's hard
to find the best balance between so much points of views and ways to deal
with instantiations, wiring of objects, etc. so it's nice to hear that the
current design has more advantages than drawbacks.
 
As Tal mentioned, we are redesigning the Resource API to support client-side
resources and focused use of annotations. I didn't intend to change the way
resources are instantiated though. But, if we can adjust the new design to
accommodate more use cases, I would be interested to explore. 
 
Currently, we are working on Restlet 1.2 M2 which will give you a chance to
play with the new resource API and provide feed-back.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/>
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/>
http://www.noelios.com
 

  _____  

De : Tal Liron [mailto:tal.li...@threecrickets.com] 
Envoyé : jeudi 26 mars 2009 08:49
À : discuss@restlet.tigris.org
Objet : Re: Resource factories



Thanks to all who replied on this. After a discussion on the code list, it
became clear that the Restlety solution to configuring resources is to use
the Context. The Context has a ConcurrentMap of attributes, described as so:

"This is a convenient mean[s] to provide common objects to all the Restlets
and Resources composing an Application."





So, that's it! The nice thing about contexts, too, is that they pass through
restlets along the way. So, even if you configure your Application context
in a certain way, you can apply filters or whatnot along the way to adapt
the configuration. For example, a DebuggingFilter might enable all the
configuration aspects that have to do with debugging. It's then easy to
add/remove such a filter, even on-the-fly, without reconfiguring the whole
application.




-Tal

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1429304

Reply via email to