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: CompressChainlet issue

2006-05-18 Thread Jerome Louvel
Hi Lars, According to the HTTP specs: "If no Accept-Encoding field is present in a request, the server MAY assume that the client will accept any content coding. In this case, if "identity" is one of the available content-codings, then the server SHOULD use the "identity" content-coding, unless i

CompressChainlet issue

2006-05-18 Thread Lars Heuer
Hi Jerome, I discovered that the CompressChainlet compresses the output even if the accepted-encoding header is empty. Actually I've not tested this scenario at the beginning of this week. I am not sure who is responsible for the failure (the compress chainlet or the preferences). I'll investigate

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
Hi all, Based on Lars's StructureBuilder and Yuri's fluent Configurator, I've started thinking about a solution that would take the best of both approaches. The goal is to provide an optional package in NRE ("com.noelios.restlet.ext.builder") implementing the fluent design pattern. I also want to