RE: RE: Fluent API and StructureBuilder

2006-05-25 Thread Jerome Louvel
; À : discuss@restlet.tigris.org > Objet : Re: RE: Fluent API and StructureBuilder > > > Hi Jerome, > > It is not a big deal, as I mentioned before, and the latest solution > does the job nicely. Having special builders to do the > configuration job is > much less inva

Re: RE: Fluent API and StructureBuilder

2006-05-24 Thread Yuri de Wit
ly as I'm relying on a tree of specialized builders instead. Let = >me >know how we can improve this further. I know I need to provide a = >specialized >builder for HostMaplets in order to easily add allowed domains, ports, = >etc. > >Best regards, >Jerome > >>

RE: Fluent API and StructureBuilder

2006-05-20 Thread Jerome Louvel
stMaplets in order to easily add allowed domains, ports, etc. Best regards, Jerome > -Message d'origine- > De : news [mailto:[EMAIL PROTECTED] De la part de Yuri de Wit > Envoyé : jeudi 18 mai 2006 17:43 > À : discuss@restlet.tigris.org > Objet : Re: Fluent API and Structu

Re: Fluent API and StructureBuilder

2006-05-18 Thread Yuri de Wit
One thing that I forgot to mention is that using new XXX() as the new "stack" instead of up()/back() still allows you to comment/uncomment what you want and you get some auto indentation for free when using IDEs. :-) regards, -- yuri Yuri de Wit<[EMAIL PROTECTED]> wrote: > >Hi Lars, > >fair en

Re: Fluent API and StructureBuilder

2006-05-18 Thread Yuri de Wit
Hi Lars, fair enough. The back() (or up() as proposed by Jerome) is indeed more flexible (even though I am not sure how an IDE will auto format that - minor detail) and I'll be happy to use it as soon as Jerome incorporate it instead of what I have been using. regards, -- yuri Lars Heuer <[E

Re: Fluent API and StructureBuilder

2006-05-18 Thread Lars Heuer
Hi Jerome, [...] >> What I do not understand: How does the toMaplet() method help for code >> completion? If you return a specialized Maplet here (that keeps a >> reference to the builder) the code assistent would assume that only >> "attach(String, Restlet)" and "attach(String, Class)" are allowe

RE: Fluent API and StructureBuilder

2006-05-18 Thread Jerome Louvel
Hi Lars, > As long as the generic attach methods are also provided I like the > proposal. :) Absolutely, the other attach*() methods are just shortcut methods. But the generic attach() methods would only be available for ChainletBuilder, MapletBuilder and RestletContainerBuilder nodes. > What I

Re: Fluent API and StructureBuilder

2006-05-18 Thread Lars Heuer
Hi Yuri, > Interesting... > The approach I was taking was to use Java itself as the stack by using a > "new XXX()" to create/"push" a new entry to the "stack". > .attach("/a", new Maplet() > .attach("/b", new Maplet()) > .attach("/c", > new Restle

Re: Fluent API and StructureBuilder

2006-05-18 Thread Lars Heuer
Hi Jerome, [...] > The attach*() methods will move the focus to the attached/created node. > Other methods will keep the focus on the current node. > The up() and root() will change the focus in the tree of builder nodes. > The to*() methods will allow the cast the builder to the best type (maybe

RE: Fluent API and StructureBuilder

2006-05-18 Thread Jerome Louvel
be upMaplet() and rootComponent() are even better?). Any thought? Thanks, Jerome > -Message d'origine- > De : news [mailto:[EMAIL PROTECTED] De la part de Yuri de Wit > Envoyé : mercredi 17 mai 2006 19:50 > À : discuss@restlet.tigris.org > Objet : Re: Fluent API and St

Re: Fluent API and StructureBuilder

2006-05-17 Thread Yuri de Wit
Interesting... The approach I was taking was to use Java itself as the stack by using a "new XXX()" to create/"push" a new entry to the "stack". .attach("/a", new Maplet() .attach("/b", new Maplet()) .attach("/c", new Restlet() )

Re: Fluent API and StructureBuilder

2006-05-17 Thread Lars Heuer
Hi, [...] > I can attach the code to the issue. Tomorrow. Attached. Today. ;) http://restlet.tigris.org/nonav/issues/showattachment.cgi/8/StructureBuilder.java Best regards, Lars -- http://semagia.com

Re: Fluent API and StructureBuilder

2006-05-17 Thread Lars Heuer
Hi all, [...] > I think this may be a better way to support your fluent design pattern. We > could > implement more complex things like multiple extractions, etcs. Let me think > more > about this. [...] To explain a bit further: The StrutureBuilder holds an internal stack of Restlets and pushes

Re: Fluent API and StructureBuilder

2006-05-17 Thread Yuri de Wit
Added some comments to http://restlet.tigris.org/issues/show_bug.cgi?id=3D87 Yuri de Wit<[EMAIL PROTECTED]> wrote: > >For all my configuration cases right now, I only need fluent methods for >the methods that configure the base Restlets (i.e. Maplets, and >Chainlets). For custom chainlets and mapl

Re: Fluent API and StructureBuilder

2006-05-17 Thread Yuri de Wit
For all my configuration cases right now, I only need fluent methods for the methods that configure the base Restlets (i.e. Maplets, and Chainlets). For custom chainlets and maplets I have been using the constructor to pass additional parameters. At this point, I have a combination of a Configurat

Fluent API and StructureBuilder

2006-05-17 Thread Jerome Louvel
Hi all, Following a comment from Yuri and a separate email from Lars, there seems to be a need to support the fluent design pattern described here: http://www.bofh.org.uk/articles/2005/12/21/fluent-interfaces http://martinfowler.com/bliki/FluentInterface.html On one side, Yuri has pushed for dir