You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Beshai <pe...@gmail.com> on 2007/07/22 19:32:44 UTC

T5 - Suitable use for Chain of Command?

Hi everyone,
I am interested using something similar to the workflow in Mac OS X's
automator, and I'd like to know if the ChainBuilder provided in T5-IoC will
be a suitable tool for this.

That is, I would like to have several processes with different inputs and
outputs and have them feed each other in order.

For instance,

Files come in and enter a service, which outputs a path. The path can be
given to another service which will output a list. The list can be given to
another service which also outputs a list. And so on.

Is there anyway to have this kind of interaction using the chain of command
principles? It seems to me that they don't directly allow transfer between
subsequent commands. Is the way to do this with an external object (ASO?)
that would store the information between commands?

-- 
Peter Beshai

CS 134 Tutor
University of Waterloo

Re: T5 - Suitable use for Chain of Command?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Sounds  to me like several chains-of-command that share the same interface.

On 7/22/07, Peter Beshai <pe...@gmail.com> wrote:
> Thanks Howard, that works quite well.
> However, I would like the configuration (order of commands) to be setup in
> the web application. I would also like to have several different
> configurations and have the current one chosen via the web app.
>
> For instance, if the user selects option one, and submits a file, I will
> want to run a pre-configured chain of commands over the file and display a
> specific type of output. Whereas if the user selects option two and submits
> a file, I will want to run a different chain of commands and potentially a
> different kind of output.
>
> Does this mean that I can't do it through the IoC container? Can I still use
> ChainBuilder?
>
> Maybe it makes more sense to have an object that stores the configuration
> (list of commands), and have that particular object be instantiated
> depending on which option is selected. Then going through the list in a loop
> to run the sequence.
>
> On 7/22/07, Howard Lewis Ship <hl...@gmail.com> wrote:
> >
> > Tapestry uses this kind of structure quite a bit; the service
> > interface specifies a void method, and one of the parameters that is
> > passed to each command in the chain exists to store state about the
> > invocation. Very useful, powerful, extensible ... and very testable!
> >
> > On 7/22/07, Peter Beshai <pe...@gmail.com> wrote:
> > > Hi everyone,
> > > I am interested using something similar to the workflow in Mac OS X's
> > > automator, and I'd like to know if the ChainBuilder provided in T5-IoC
> > will
> > > be a suitable tool for this.
> > >
> > > That is, I would like to have several processes with different inputs
> > and
> > > outputs and have them feed each other in order.
> > >
> > > For instance,
> > >
> > > Files come in and enter a service, which outputs a path. The path can be
> > > given to another service which will output a list. The list can be given
> > to
> > > another service which also outputs a list. And so on.
> > >
> > > Is there anyway to have this kind of interaction using the chain of
> > command
> > > principles? It seems to me that they don't directly allow transfer
> > between
> > > subsequent commands. Is the way to do this with an external object
> > (ASO?)
> > > that would store the information between commands?
> > >
> > > --
> > > Peter Beshai
> > >
> > > CS 134 Tutor
> > > University of Waterloo
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Peter Beshai
>
> CS 134 Tutor
> University of Waterloo
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 - Suitable use for Chain of Command?

Posted by Peter Beshai <pe...@gmail.com>.
Thanks Howard, that works quite well.
However, I would like the configuration (order of commands) to be setup in
the web application. I would also like to have several different
configurations and have the current one chosen via the web app.

For instance, if the user selects option one, and submits a file, I will
want to run a pre-configured chain of commands over the file and display a
specific type of output. Whereas if the user selects option two and submits
a file, I will want to run a different chain of commands and potentially a
different kind of output.

Does this mean that I can't do it through the IoC container? Can I still use
ChainBuilder?

Maybe it makes more sense to have an object that stores the configuration
(list of commands), and have that particular object be instantiated
depending on which option is selected. Then going through the list in a loop
to run the sequence.

On 7/22/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> Tapestry uses this kind of structure quite a bit; the service
> interface specifies a void method, and one of the parameters that is
> passed to each command in the chain exists to store state about the
> invocation. Very useful, powerful, extensible ... and very testable!
>
> On 7/22/07, Peter Beshai <pe...@gmail.com> wrote:
> > Hi everyone,
> > I am interested using something similar to the workflow in Mac OS X's
> > automator, and I'd like to know if the ChainBuilder provided in T5-IoC
> will
> > be a suitable tool for this.
> >
> > That is, I would like to have several processes with different inputs
> and
> > outputs and have them feed each other in order.
> >
> > For instance,
> >
> > Files come in and enter a service, which outputs a path. The path can be
> > given to another service which will output a list. The list can be given
> to
> > another service which also outputs a list. And so on.
> >
> > Is there anyway to have this kind of interaction using the chain of
> command
> > principles? It seems to me that they don't directly allow transfer
> between
> > subsequent commands. Is the way to do this with an external object
> (ASO?)
> > that would store the information between commands?
> >
> > --
> > Peter Beshai
> >
> > CS 134 Tutor
> > University of Waterloo
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Peter Beshai

CS 134 Tutor
University of Waterloo

Re: T5 - Suitable use for Chain of Command?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Tapestry uses this kind of structure quite a bit; the service
interface specifies a void method, and one of the parameters that is
passed to each command in the chain exists to store state about the
invocation. Very useful, powerful, extensible ... and very testable!

On 7/22/07, Peter Beshai <pe...@gmail.com> wrote:
> Hi everyone,
> I am interested using something similar to the workflow in Mac OS X's
> automator, and I'd like to know if the ChainBuilder provided in T5-IoC will
> be a suitable tool for this.
>
> That is, I would like to have several processes with different inputs and
> outputs and have them feed each other in order.
>
> For instance,
>
> Files come in and enter a service, which outputs a path. The path can be
> given to another service which will output a list. The list can be given to
> another service which also outputs a list. And so on.
>
> Is there anyway to have this kind of interaction using the chain of command
> principles? It seems to me that they don't directly allow transfer between
> subsequent commands. Is the way to do this with an external object (ASO?)
> that would store the information between commands?
>
> --
> Peter Beshai
>
> CS 134 Tutor
> University of Waterloo
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org