[aerogear-dev] Pipe Builder

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[aerogear-dev] Pipe Builder

Daniel Passos-2
Hey Guys,

What do you think about draft of Pipe Builder? => https://gist.github.com/3973193

-- 
Daniel Passos


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Matthias Wessendorf
Look great!

minor things:

* newPipe() ==> pipe();
* withFoo(arg) ==> foo(arg);


-M

On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <[hidden email]> wrote:

> Hey Guys,
>
> What do you think about draft of Pipe Builder? =>
> https://gist.github.com/3973193
>
> --
> Daniel Passos
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Bruno Oliveira
Agreed with matzew and some suggestions.

Try to enforce the chain if the **order** of the method call matters to you, returning 'this' user could call:

Pipe<Bar> barPipe = pipeline.newPipe()
        .withName("bar")
        .useClass(Bar.class)
        .withType(REST)
        .withEnpoint("my-crazy-endpoing")
        .build();

Or

Pipe<Bar> barPipe = pipeline.newPipe()
        .useClass(Bar.class)
        .withEnpoint("my-crazy-endpoing")
        .withName("bar")
        .withType(REST)
         .build();

-- 
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile

On Monday, October 29, 2012 at 10:18 AM, Matthias Wessendorf wrote:

Look great!

minor things:

* newPipe() ==> pipe();
* withFoo(arg) ==> foo(arg);


-M

On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <[hidden email]> wrote:
Hey Guys,

What do you think about draft of Pipe Builder? =>

--
Daniel Passos


_______________________________________________
aerogear-dev mailing list



--
Matthias Wessendorf

_______________________________________________
aerogear-dev mailing list


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Matthias Wessendorf
One more note on the 'build()'

Does it add the pipe to the pipeline? Assuming yes, why not 'buildAndAdd()'

-M

On Mon, Oct 29, 2012 at 1:24 PM, Bruno Oliveira <[hidden email]> wrote:

> Agreed with matzew and some suggestions.
>
> Try to enforce the chain if the **order** of the method call matters to you,
> returning 'this' user could call:
>
> Pipe<Bar> barPipe = pipeline.newPipe()
>         .withName("bar")
>         .useClass(Bar.class)
>         .withType(REST)
>         .withEnpoint("my-crazy-endpoing")
>         .build();
>
> Or
>
> Pipe<Bar> barPipe = pipeline.newPipe()
>         .useClass(Bar.class)
>         .withEnpoint("my-crazy-endpoing")
>         .withName("bar")
>         .withType(REST)
>          .build();
>
> --
> "The measure of a man is what he does with power" - Plato
> -
> @abstractj
> -
> Volenti Nihil Difficile
>
> On Monday, October 29, 2012 at 10:18 AM, Matthias Wessendorf wrote:
>
> Look great!
>
> minor things:
>
> * newPipe() ==> pipe();
> * withFoo(arg) ==> foo(arg);
>
>
> -M
>
> On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <[hidden email]> wrote:
>
> Hey Guys,
>
> What do you think about draft of Pipe Builder? =>
> https://gist.github.com/3973193
>
> --
> Daniel Passos
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
qmx
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

qmx
Administrator

On Oct 29, 2012, at 10:27 AM, Matthias Wessendorf wrote:

> One more note on the 'build()'
>
> Does it add the pipe to the pipeline? Assuming yes, why not 'buildAndAdd()'
it sounds even better if you just call it add() :)

>
> -M
>
> On Mon, Oct 29, 2012 at 1:24 PM, Bruno Oliveira <[hidden email]> wrote:
>> Agreed with matzew and some suggestions.
>>
>> Try to enforce the chain if the **order** of the method call matters to you,
>> returning 'this' user could call:
>>
>> Pipe<Bar> barPipe = pipeline.newPipe()
>>        .withName("bar")
>>        .useClass(Bar.class)
>>        .withType(REST)
>>        .withEnpoint("my-crazy-endpoing")
>>        .build();
>>
>> Or
>>
>> Pipe<Bar> barPipe = pipeline.newPipe()
>>        .useClass(Bar.class)
>>        .withEnpoint("my-crazy-endpoing")
>>        .withName("bar")
>>        .withType(REST)
>>         .build();
>>
>> --
>> "The measure of a man is what he does with power" - Plato
>> -
>> @abstractj
>> -
>> Volenti Nihil Difficile
>>
>> On Monday, October 29, 2012 at 10:18 AM, Matthias Wessendorf wrote:
>>
>> Look great!
>>
>> minor things:
>>
>> * newPipe() ==> pipe();
>> * withFoo(arg) ==> foo(arg);
>>
>>
>> -M
>>
>> On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <[hidden email]> wrote:
>>
>> Hey Guys,
>>
>> What do you think about draft of Pipe Builder? =>
>> https://gist.github.com/3973193
>>
>> --
>> Daniel Passos
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

-- qmx


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Kris Borchers

On Oct 29, 2012, at 8:00 AM, Douglas Campos <[hidden email]> wrote:

>
> On Oct 29, 2012, at 10:27 AM, Matthias Wessendorf wrote:
>
>> One more note on the 'build()'
>>
>> Does it add the pipe to the pipeline? Assuming yes, why not 'buildAndAdd()'
> it sounds even better if you just call it add() :)
+1 … like JS :)

>
>>
>> -M
>>
>> On Mon, Oct 29, 2012 at 1:24 PM, Bruno Oliveira <[hidden email]> wrote:
>>> Agreed with matzew and some suggestions.
>>>
>>> Try to enforce the chain if the **order** of the method call matters to you,
>>> returning 'this' user could call:
>>>
>>> Pipe<Bar> barPipe = pipeline.newPipe()
>>>       .withName("bar")
>>>       .useClass(Bar.class)
>>>       .withType(REST)
>>>       .withEnpoint("my-crazy-endpoing")
>>>       .build();
>>>
>>> Or
>>>
>>> Pipe<Bar> barPipe = pipeline.newPipe()
>>>       .useClass(Bar.class)
>>>       .withEnpoint("my-crazy-endpoing")
>>>       .withName("bar")
>>>       .withType(REST)
>>>        .build();
>>>
>>> --
>>> "The measure of a man is what he does with power" - Plato
>>> -
>>> @abstractj
>>> -
>>> Volenti Nihil Difficile
>>>
>>> On Monday, October 29, 2012 at 10:18 AM, Matthias Wessendorf wrote:
>>>
>>> Look great!
>>>
>>> minor things:
>>>
>>> * newPipe() ==> pipe();
>>> * withFoo(arg) ==> foo(arg);
>>>
>>>
>>> -M
>>>
>>> On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <[hidden email]> wrote:
>>>
>>> Hey Guys,
>>>
>>> What do you think about draft of Pipe Builder? =>
>>> https://gist.github.com/3973193
>>>
>>> --
>>> Daniel Passos
>>>
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>>
>>>
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
> -- qmx
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Daniel Passos-2
2 votes to add, 2 votes for pipe. What do you think of addPipe? : p

--
Daniel Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Matthias Wessendorf
On Mon, Oct 29, 2012 at 4:25 PM, Daniel Passos <[hidden email]> wrote:
> 2 votes to add, 2 votes for pipe. What do you think of addPipe? : p

nope - no need to have addPipe() - add() is good enough, since you are
already typing on a pipe(builder)

-M

>
> --
> Daniel Passos
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Daniel Passos-2
In reply to this post by Bruno Oliveira
Bruno,

The compiler is already ensuring the name and the class will be defined before the build to be called. That is the only thing that is important to me because both are mandatory.

--
Daniel Passos


On Monday, October 29, 2012 at 10:24 AM, Bruno Oliveira wrote:

> Agreed with matzew and some suggestions.
>
> Try to enforce the chain if the **order** of the method call matters to you, returning 'this' user could call:
>
> Pipe<Bar> barPipe = pipeline.newPipe()
> .withName("bar")
> .useClass(Bar.class)
> .withType(REST)
> .withEnpoint("my-crazy-endpoing")
> .build();
>
>
> Or
>
> Pipe<Bar> barPipe = pipeline.newPipe()
> .useClass(Bar.class)
> .withEnpoint("my-crazy-endpoing")
> .withName("bar")
> .withType(REST)
> .build();
>
>
> --
> "The measure of a man is what he does with power" - Plato
> -
> @abstractj
> -
> Volenti Nihil Difficile
>
>
>
> On Monday, October 29, 2012 at 10:18 AM, Matthias Wessendorf wrote:
>
> > Look great!
> >
> > minor things:
> >
> > * newPipe() ==> pipe();
> > * withFoo(arg) ==> foo(arg);
> >
> >
> > -M
> >
> > On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <[hidden email] (mailto:[hidden email])> wrote:
> > > Hey Guys,
> > >
> > > What do you think about draft of Pipe Builder? =>
> > > https://gist.github.com/3973193
> > >
> > > --
> > > Daniel Passos
> > >
> > >
> > > _______________________________________________
> > > aerogear-dev mailing list
> > > [hidden email] (mailto:[hidden email])
> > > https://lists.jboss.org/mailman/listinfo/aerogear-dev
> >
> >
> >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > twitter: http://twitter.com/mwessendorf
> > _______________________________________________
> > aerogear-dev mailing list
> > [hidden email] (mailto:[hidden email])
> > https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email] (mailto:[hidden email])
> https://lists.jboss.org/mailman/listinfo/aerogear-dev



_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Pipe Builder

Daniel Passos-2
What do you thing about builder an internal class of pipeline? => https://gist.github.com/3976545


--
Daniel Passos


On Monday, October 29, 2012 at 7:05 PM, Daniel Passos wrote:

> Bruno,
>
> The compiler is already ensuring the name and the class will be defined before the build to be called. That is the only thing that is important to me because both are mandatory.
>
> --
> Daniel Passos
>
>
> On Monday, October 29, 2012 at 10:24 AM, Bruno Oliveira wrote:
>
> > Agreed with matzew and some suggestions.
> >
> > Try to enforce the chain if the **order** of the method call matters to you, returning 'this' user could call:
> >
> > Pipe<Bar> barPipe = pipeline.newPipe()
> > .withName("bar")
> > .useClass(Bar.class)
> > .withType(REST)
> > .withEnpoint("my-crazy-endpoing")
> > .build();
> >
> >
> > Or
> >
> > Pipe<Bar> barPipe = pipeline.newPipe()
> > .useClass(Bar.class)
> > .withEnpoint("my-crazy-endpoing")
> > .withName("bar")
> > .withType(REST)
> > .build();
> >
> >
> > --
> > "The measure of a man is what he does with power" - Plato
> > -
> > @abstractj
> > -
> > Volenti Nihil Difficile
> >
> >
> >
> > On Monday, October 29, 2012 at 10:18 AM, Matthias Wessendorf wrote:
> >
> > > Look great!
> > >
> > > minor things:
> > >
> > > * newPipe() ==> pipe();
> > > * withFoo(arg) ==> foo(arg);
> > >
> > >
> > > -M
> > >
> > > On Mon, Oct 29, 2012 at 1:16 PM, Daniel Passos <[hidden email] (mailto:[hidden email])> wrote:
> > > > Hey Guys,
> > > >
> > > > What do you think about draft of Pipe Builder? =>
> > > > https://gist.github.com/3973193
> > > >
> > > > --
> > > > Daniel Passos
> > > >
> > > >
> > > > _______________________________________________
> > > > aerogear-dev mailing list
> > > > [hidden email] (mailto:[hidden email])
> > > > https://lists.jboss.org/mailman/listinfo/aerogear-dev
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > >
> > > blog: http://matthiaswessendorf.wordpress.com/
> > > sessions: http://www.slideshare.net/mwessendorf
> > > twitter: http://twitter.com/mwessendorf
> > > _______________________________________________
> > > aerogear-dev mailing list
> > > [hidden email] (mailto:[hidden email])
> > > https://lists.jboss.org/mailman/listinfo/aerogear-dev
> >
> >
> >
> >
> >
> > _______________________________________________
> > aerogear-dev mailing list
> > [hidden email] (mailto:[hidden email])
> > https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev