Some time back there was a version of the frontcontroller, which registered
command instances instead of the command class. I guess the current sequence
command is leftover from this version.
Cheers,
Ralf.


On 12/19/06, thegiffman <[EMAIL PROTECTED]> wrote:

  I'm building a live charting application which uses the Cairngorm
design pattern. I'm running into a bit of an issue which I thought a
SequenceCommand might be just the ticket. However, further
investigation has lead me to question not just the use of
SequenceCommands in this case, but their usefulness in general.

For me to create a new data set for the chart (which actually involves
two charts - one zoomed out fully and one zoomed in on an area), I
need to do several commands in sequence:

1 - create a data set with a unique id from the back end.
2 - query the back end for the coarse grain data.
3 - query the back end for the fine grain data.
4 - add the data set to the document model.

Basically these are four different commands that should be executed in
sequence. And it makes sense from an architectural standpoint for
them to be separate - I can see wanting to query for fine data in
other situations than data set creation (like an update).

But here's the kicker - sequence commands don't really seem set up to
do this. I can't really get at the commands themselves to set the
next event with the constructor, since the front controller handles
all this. As such, the sequence command can really just do one action
- querying the back end for fine grain data will ALWAYS trigger an
event to add the data set.

To avoid this, I might include a flag in the event whether to stop or
go on to the next command. But this raises the question - can't I do
this anyway with a call to the event dispatcher? The value of having
sequence commands seems to be the ability to move to the next sequence
without the sequence being hardcoded. Yet this functionality doesn't
really exist - it is hidden by the front controller.

Could someone set me straight here?




--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany

Reply via email to