I've toyed (pardon the pun) with the idea of being more builderish with proxy, but not necessarily with the main API. I have ideas for introducing some of the proxying "patterns" (dare I say, they might ask me to write a book) from HiveMind, such as pipeline and whatever the other one was that picked the "target" of the invocation based on the type of one of the parameters.
On Jul 17, 2010 6:34 AM, "Jörg Schaible" <[email protected]> wrote: > Matt Benson wrote: > >> >> On Jul 16, 2010, at 5:40 PM, Jörg Schaible wrote: >> >>> James Carman wrote: >>> >>>> On Fri, Jul 16, 2010 at 5:09 PM, Matt Benson <[email protected]> >>>> wrote: >>>>> >>>>> But you can agree that making the first class a separate argument >>>>> preserves the usability of varargs while accomplishing the typed result >>>>> in a single method? >>>>> >>>> >>>> Most definitely! I like that idea. I would think that would be the >>>> best way to kill two birds with one stone. >>> >>> This move worked out for proxytoys quite well ... ;-) >>> >> >> Actually it looks as though proxytoys' ProxyFactory interface uses the >> trick I just wrote about a minute ago. >> >> And why did I never hear of proxytoys before? > > Well, Apache is much more prominent than Codehaus, although in terms of > project age, ProxyToys is older. However, both projects were created out of > extracted code from other projects; commons-proxy from Hivemind (IIRC) and > ProxyToys from various Thoughtworks OS projects, most prominent > PicoContainer. > > As James explained, the approach of both libraries is different, common- > proxy allows a better optimization, while ProxyToys come with a lot of > prebuild stuff called "toys". > > All I wanted to point out that we refactored the API when updating the > project to Java 5. Originally we used static methods as factories for the > various toys, but now we switched to builder patterns using a lot of > generics and varargs and that turned out quite well. c-p might benefit from > this experience. > > - Jörg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
