Re: [picocontainer-dev] Making PWR terser

Mauro Talevi <[email protected]> Sat, 31 Jan 2009 17:46:21 +0000
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Paul Hammant wrote:
> OK, so PWR allows methods to be called directly.  The version shipped a couple of weeks ago, required explicit registration of every component, including transitory ones from query-string parameters.  Eg. the message ID for this method (bound by param name of course)
> 
>    public MessageData read(int msgId) { .. }
> 
> Some hours ago I committed a change that means that you don't have to register these, they'll instead be speculatively looked for in HttpServletRequest if a getComponent("msgId") does a miss.
> 
> There's a technology by Bill Burke of JBoss called Resteasy, that looks quite interesting :- http://www.jboss.org/file-access/default/members/resteasy/freezone/docs/1.0.0.GA/userguide/html_single/index.html 
> 
> I'm aiming to get close to its feature set, but have some of the 'convention over configuration'.  Specifically be a lot less needy with respect to annotations.
> 
> Anyways, PicoContainer itself has moved forward to better implement the noComponent() feature, and Web and PWR have also been changed to leverage it.
> 
> Interestingly James Strachan managed to get a blog entry very well read on a similar topic :- http://macstrac.blogspot.com/2009/01/jax-rs-as-one-web-framework-to-rule.html
> 

Hi Paul,

I'm all for a convention-based approach to work out default behaviour, 
but we should not hard-code any convention, and the default behaviour 
should always to overridable via configuration.

We could express the concept as

'Follow convention, with due consideration of the configuration' :-)

Cheers


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email