[aerogear-dev] AEROGEAR-593 - Builder pattern isn't consistent
Daniel Passos
daniel at passos.me
Thu Nov 1 07:15:08 EDT 2012
+1 to pipeline.add(Project.class)
On Thu, Nov 1, 2012 at 9:03 AM, Bruno Oliveira <bruno at abstractj.org> wrote:
> Good morning everyone! Lay out your costumes from halloween and let's
> talk about this jira (https://issues.jboss.org/browse/AEROGEAR-593).
>
> Passos did a great work creating a builder for Pipes and of course we can
> improve it more and more, it's all about software. Currently to create a
> Pipe we must do it:
>
> Pipeline pipeline = new Pipeline(ROOT_URL);
> pipeline.pipe().name("tasks").useClass(Task.class).buildAndAdd();
> pipeline.pipe().name("tags").useClass(Tag.class).buildAndAdd();
>
> Chatting with Matthias we agreed that would be better 2 alternatives:
>
> Pipeline pipeline = new Pipeline(ROOT_URL);
> pipeline.add(Project.class).build();
>
> Doing just this implicitly means that the name of the pipe will be
> "Project" and if you need 'extras':
>
> Pipeline pipeline = new Pipeline(ROOT_URL);
>
> pipeline.add(Project.class).endpoint("foo").name("bar").auth(myAuthMod).build();
>
> What do you guys think?
>
>
> --
> "The measure of a man is what he does with power" - Plato
> -
> @abstractj
> -
> Volenti Nihil Difficile
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20121101/eb7cee3c/attachment.html
More information about the aerogear-dev
mailing list