I could buy using Map.. I agree, YAC (Yet Another Context) is a pain.. I often think that "Context" is in many ways a bad smell.. It means you don't know what to put into something, so you call it "Context" because it sounds better.. Instead, maybe just calling it a Map would be the way to go.. I hate all the VelocityContexts, JNDI contexts etc.. ServletContext...
Are there any limitations to what the PipelineContext would do? In other words, what would a PipelineContext have that a Map didn't have? Are there extra methods beyond a Map on a PipelineContext? I think Eric Dobbs has a good point here.. Eric > -----Original Message----- > From: Eric Dobbs [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 12, 2004 6:27 PM > To: Turbine List > Subject: Re: [Thoughts and proposal] RunData > > > Hi All. > Not sure why this thread snapped me out of my lurking... maybe it > was the introduction of yet another Context. ;-) > > On May 12, 2004, at 5:06 AM, Eric Pugh wrote: > > > Instead, what I would like to see is a > > > PipelineData or PipelineContext > > Instead of creating a new interface, why not just use a Map? > I like the idea of decoupling the pipeline from RunData, but I > don't think PipelineData, nor Peter's suggestion for > RequestData add very much descriptive power. > > > >> The other option is to create a new interface, say RequestData, with a > >> single purpose, that of passing objects along the pipeline. > > >> public interface RequestData { > >> > >> public void putObject(String key, Object obj); > >> > >> public Object getObject(String key); > >> > >> } > > This example is just a subset of what is offered by Map. If you > use Map you don't have to introduce any new concepts to the > programmer, you can get() and put(), and also benefit from the > rest of the Collections API. You also don't have to write any > code for the interface nor for the implementation. Less code is > A Good Thing. > > -Eric (the other one :-) > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
