deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arne Limburg <arne.limb...@openknowledge.de>
Subject AW: [DISCUSS] [DELTASPIKE-7] ExpressionActivated
Date Tue, 03 Jan 2012 18:57:34 GMT
+1 for unifying all that stuff within one annotation.

In addition we should think about supporting stereotypes. @ProductionActivated then could
be a stereotype with @Veto(...) on it.

Cheers,
Arne

-----Urspr√ľngliche Nachricht-----
Von: Gerhard Petracek [mailto:gerhard.petracek@gmail.com] 
Gesendet: Dienstag, 3. Januar 2012 18:26
An: deltaspike-dev@incubator.apache.org
Betreff: Re: [DISCUSS] [DELTASPIKE-7] ExpressionActivated

+1 for using projectStage, notInProjectStage (if needed),... explicitly.

we can handle extensibility via the expression and custom implementations of ExpressionInterpreter
(like we are using it in myfaces codi already).

regards,
gerhard



2012/1/3 Mark Struberg <struberg@yahoo.de>

> Sitting together with Gerhard we had another idea.
>
> What do you think about unifying all this stuff
>
>
> @Veto
>
> @Veto(projectStage=UnitTest.class)
>
> @Veto(notInProjectStage=Production.class)
>
> @Veto(expression="myproperty=myValue")
>
>
> (independent on the final name of @Veto)
>
>
>
> Instead of having projectStage and notInProjectStage as explicit 
> annotation values, we could also move this to a string based 
> expression For example
> @Veto("projectStage=Production")
> The downside is that we would loose the type safety, thus I don't 
> really like it.
>
> WDYT?
>
> LieGrue,
> strub + os890
>
>
>
>
> ----- Original Message -----
> > From: Mark Struberg <struberg@yahoo.de>
> > To: "deltaspike-dev@incubator.apache.org" <
> deltaspike-dev@incubator.apache.org>
> > Cc:
> > Sent: Tuesday, January 3, 2012 2:48 PM
> > Subject: Re: [DISCUSS] [DELTASPIKE-7] ExpressionActivated
> >
> > Back then we also had a few discussions about this very topic.
> >
> >
> > We did choose @ProjectStageActivated and @ExpressionActivated, 
> > because
> the beans
> > are not 'actived by this expression' but 'only active on this 
> > expression'
> >
> > Any @Alternative @ActivatedByExtression public class MyBean will 
> > _not_ get automatically enabled, but _still_ needs the
> <alternatives>
> > entry in beans.xml!
> >
> > @ActivatedByExpression and @ActivatedByProjectStage (or the 
> > equivalent
> ..On...)
> > imo implies a bit too much.
> >
> > Actually it's rather the other way around. A bean will _not_ get
> _vetoed_ if
> > the underlying expression resolves to 'true' ;)
> >
> > So I'm +0.8 for @ExpressionActivated and -0.2 against 
> > @ActivatedByExpression. Imo the @ActivatedOnExpression is a bit 
> > better,
> so +0.2
> > for it.
> >
> > LieGrue,
> > strub
> >
> >
> >
> > ----- Original Message -----
> >>  From: Peter Muir <pmuir@redhat.com>
> >>  To: "deltaspike-dev@incubator.apache.org"
> > <deltaspike-dev@incubator.apache.org>
> >>  Cc: "deltaspike-dev@incubator.apache.org"
> > <deltaspike-dev@incubator.apache.org>
> >>  Sent: Tuesday, January 3, 2012 2:18 PM
> >>  Subject: Re: [DISCUSS] [DELTASPIKE-7] ExpressionActivated
> >>
> >>  I would prefer @activatedonexpression, it fits better with the spec.
> >>
> >>  As an alternative, what about @ActivatedByExpression which to me 
> >> reads
> > better.
> >>
> >>
> >>  --
> >>  Pete Muir
> >>  http://in.relation.to/Bloggers/Pete
> >>
> >>  On 2 Jan 2012, at 05:34, Jason Porter <lightguard.jp@gmail.com>
> > wrote:
> >>
> >>>   +1 for @ActivatedOnExpression. It reads better which goes a long 
> >>> way
> > for
> >>  easy to use, self documenting code.
> >>>
> >>>   Sent from my iPhone
> >>>
> >>>   On Jan 1, 2012, at 17:57, Gerhard Petracek
> >>  <gerhard.petracek@gmail.com> wrote:
> >>>
> >>>>   hi,
> >>>>
> >>>>   please send your opinion about the name (@ActivatedOnExpression vs
> >>>>   @ExpressionActivated).
> >>>>
> >>>>   thx & regards,
> >>>>   gerhard
> >>>>
> >>>>
> >>>>
> >>>>   2011/12/20 Christian Kaltepoth <christian@kaltepoth.de>
> >>>>
> >>>>>   +1
> >>>>>
> >>>>>   2011/12/20 Marius Bogoevici
> > <marius.bogoevici@gmail.com>:
> >>>>>>   +1
> >>>>>>
> >>>>>>   On 2011-12-19, at 8:28 AM, Gerhard Petracek wrote:
> >>>>>>
> >>>>>>>   hi @ all,
> >>>>>>>
> >>>>>>>   fyi: please check [1] before you answer.
> >>>>>>>
> >>>>>>>   [2] provides a short introduction as well as the basic
> >
> >>  usage.
> >>>>>>>
> >>>>>>>   the basic concept:
> >>>>>>>   via the annotation @ExpressionActivated it's
> > possible
> >>  to veto bean
> >>>>>>>   implementations based on the given expression.
> >>>>>>>   it's possible to change the supported syntax via
> > an
> >>  optional
> >>>>>>>   ExpressionInterpreter.
> >>>>>>>
> >>>>>>>   please send
> >>>>>>>   +1, +0 or -1 because...
> >>>>>>>   for the basic idea as well as the basic concept.
> >>>>>>>   if there are >basic< objections, please also add
> > them
> >>  to [3]
> >>>>>>>
> >>>>>>>   regards,
> >>>>>>>   gerhard
> >>>>>>>
> >>>>>>>   [1] http://markmail.org/message/7yefspfuvtz4jvmp
> >>>>>>>   [2]
> >>>>>>>
> >>>>>
> >>
> >
> https://cwiki.apache.org/confluence/display/EXTCDI/Core+Usage#CoreUsag
> e-@ExpressionActivated
> >>>>>>>   [3]
> >>>>>>>
> >>>>>
> >>
> https://cwiki.apache.org/confluence/display/DeltaSpike/SE+Feature+Rank
> ing
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>   --
> >>>>>   Christian Kaltepoth
> >>>>>   Blog: http://chkal.blogspot.com/
> >>>>>   Twitter: http://twitter.com/chkal
> >>>>>
> >>
> >
>

Mime
View raw message