Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 156A59680 for ; Mon, 19 Sep 2011 15:18:45 +0000 (UTC) Received: (qmail 41073 invoked by uid 500); 19 Sep 2011 15:18:44 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 40968 invoked by uid 500); 19 Sep 2011 15:18:44 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 40959 invoked by uid 99); 19 Sep 2011 15:18:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2011 15:18:44 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paulus.benedictus@gmail.com designates 209.85.212.41 as permitted sender) Received: from [209.85.212.41] (HELO mail-vw0-f41.google.com) (209.85.212.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2011 15:18:39 +0000 Received: by vwm42 with SMTP id 42so11051575vwm.0 for ; Mon, 19 Sep 2011 08:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=SRfOkS/Au8V5vCLwV12BEwgDxedmGgGIo8DDtb9lpV0=; b=KzEcGpanwKXx6YXTMfvDHqEgWgzjAMlgONRx2pwqFqoMMQVNR/8+I7yc4kpjrJ42I5 gdFSQJdGVxRToZ9VuipYl+Rk/qga4SL2j5UI7BDap1NTmmQBXZmq/UQIqxBGM/w/PlVf 2FA2rTqDe96fPgH5PaybrDCwTImGG2fBosqZY= MIME-Version: 1.0 Received: by 10.220.172.7 with SMTP id j7mr613239vcz.246.1316445498339; Mon, 19 Sep 2011 08:18:18 -0700 (PDT) Sender: paulus.benedictus@gmail.com Received: by 10.220.183.6 with HTTP; Mon, 19 Sep 2011 08:18:18 -0700 (PDT) In-Reply-To: References: Date: Mon, 19 Sep 2011 10:18:18 -0500 X-Google-Sender-Auth: ZJzCkJBiH2F1n0xA4TW6SH31lhg Message-ID: Subject: Re: [chain][v2] clever context - follow-up From: Paul Benedict To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Should the context in the command be parametrized? I don't think that's such a good idea. Isn't one of the benefits of Chain is that you don't know which context you might be getting? Paul On Mon, Sep 19, 2011 at 10:12 AM, Simone Tripodi wrote: > Hi Elijah, > I had e deeper look at your patch and raw more carefully your message, > I just have a BIG trouble: when changing the Context interface to > > public interface Context extends Map { > > } > > you can easily note that, in Command interface (just to mention one) > compiler complains: > > =A0 =A0"Context is a raw type. References to generic type Context > should be parametrized" > > and we can not just ignore it... that's why I thought that adopting > the signature Command> in the command > interface is not nice but needed. > More thoughts? > Simo > > http://people.apache.org/~simonetripodi/ > http://www.99soft.org/ > > > > On Mon, Sep 19, 2011 at 10:01 AM, Simone Tripodi > wrote: >> Hi Elijah! >> great report, thanks for your effort! :) >> I'll have a look at your patch as soon as I get a spare time slot, >> I'll let you know ASAP! >> Have a nice day, all the best! >> Simo >> >> http://people.apache.org/~simonetripodi/ >> http://www.99soft.org/ >> >> >> >> On Mon, Sep 19, 2011 at 3:52 AM, Elijah Zupancic = wrote: >>> I just submitted a patch to jira as CHAIN-58. This changes Context to >>> Context. >>> >>> Thanks, >>> -Elijah >>> >>> On Fri, Sep 16, 2011 at 2:16 PM, Simone Tripodi wrote: >>> >>>> Hi Paul! >>>> yes it can be done, of course :) I'm not convinced anyway by the heavy >>>> notation that, modifying the Context, would impact the Command and >>>> Filter classes. I think it is because just a matter of taste :P >>>> Feedbacks/suggestions/patches are welcome, if you want to provide a >>>> solution feel free to fill an issue and attach a patch!! >>>> TIA, all the best! >>>> Simo >>>> >>>> http://people.apache.org/~simonetripodi/ >>>> http://www.99soft.org/ >>>> >>>> >>>> >>>> On Fri, Sep 16, 2011 at 11:05 PM, Paul Benedict >>>> wrote: >>>> > The basic context should be Context and then use interface >>>> > composition to define other things like: >>>> > >>>> > public interface PropertyContext extends Context, >>>> > Map >>>> > >>>> > It can be done... I think :-) >>>> > >>>> > Paul >>>> > >>>> > On Fri, Sep 16, 2011 at 3:40 PM, Simone Tripodi >>>> > wrote: >>>> >> Hi Elijah, >>>> >> I spent some spare time trying to figure out how to improve the >>>> >> Context design, I didn't have a lot of success anyway :( >>>> >> >>>> >> =A0* dropping the Map inheritance makes not easy maintaining the cl= asses >>>> >> in the 'generic' package; >>>> >> =A0* adding generics in the Context to specify K,V types, makes all= the >>>> >> rest of the notation not so nice (IMHO), take a look as a sample a >>>> >> Command> :? >>>> >> >>>> >> Do you have more ideas? >>>> >> Many thanks in advance, all the best! >>>> >> Simo >>>> >> >>>> >> http://people.apache.org/~simonetripodi/ >>>> >> http://www.99soft.org/ >>>> >> >>>> >> >>>> >> >>>> >> On Wed, Sep 14, 2011 at 4:12 AM, Elijah Zupancic >>>> wrote: >>>> >>> Hi Everyone, >>>> >>> >>>> >>> I don't have any votes as I'm not a commiter, but I would still li= ke to >>>> add >>>> >>> in my suggestion. >>>> >>> >>>> >>> After our previous exchange, I'm of the mind that we should use th= e >>>> second >>>> >>> option - that is be collection agnostic and work by composition. I= may >>>> be >>>> >>> biased towards defined getters and setters, but I really like to b= e >>>> able to >>>> >>> use auto-complete, automatic code refactoring tools and static cod= e >>>> analysis >>>> >>> tools. If we used only a Map, then the contract for a context beco= mes a >>>> >>> black box of anything. I like the way it is now where you have to >>>> implement >>>> >>> a Map on your context or extend ContextBase. I may be biased out o= f >>>> habit - >>>> >>> if so, please convince me (by proxy everyone else). >>>> >>> >>>> >>> Thanks, >>>> >>> -Elijah >>>> >>> >>>> >>> On Mon, Sep 12, 2011 at 12:04 AM, Simone Tripodi >>>> >>> wrote: >>>> >>> >>>> >>>> Hi all guys, >>>> >>>> after mails and mails of discussions, I don't think there is a ge= neral >>>> >>>> agreement on how Context API should look alike. >>>> >>>> At the end of the discussions I figured out that, briefly resumin= g, we >>>> >>>> have following proposals: >>>> >>>> >>>> >>>> =A0* be replaced by Map; >>>> >>>> =A0* be Collection agnostic and work by composition. >>>> >>>> >>>> >>>> Please add what is missing and correct what is wrong; we need to = find >>>> >>>> a general agreement before to continue working toward the 2.0 rel= ease >>>> >>>> :) >>>> >>>> >>>> >>>> TIA, all the best!!! >>>> >>>> Simo >>>> >>>> >>>> >>>> http://people.apache.org/~simonetripodi/ >>>> >>>> http://www.99soft.org/ >>>> >>>> >>>> >>>> -----------------------------------------------------------------= ---- >>>> >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>> >>>> For additional commands, e-mail: dev-help@commons.apache.org >>>> >>>> >>>> >>>> >>>> >>> >>>> >> >>>> >> -------------------------------------------------------------------= -- >>>> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>> >> For additional commands, e-mail: dev-help@commons.apache.org >>>> >> >>>> >> >>>> > >>>> > --------------------------------------------------------------------= - >>>> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>> > For additional commands, e-mail: dev-help@commons.apache.org >>>> > >>>> > >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>> For additional commands, e-mail: dev-help@commons.apache.org >>>> >>>> >>> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org