You don't like if statements?

There is another thread around here about sequencing events/commands
and there is also Cairngorm's SequenceCommand (though personally I am
not a fan of that). As for the Callbacks class you see, that is just a
convenient way to wrap a result handler and fault handler- it is still
your handler functions that get called, and they receive a ResultEvent
or FaultEvent.

I am really confused by the last part of your message. The Command
pattern is simply the practice of encapsulating functionality in a
class and providing a consistent and generic way to execute it (the
execute() method). This pattern is at the very core of Cairngorm.
Things like undo and wizards are specific implementations/behaviors
that can often be implemented using the Command pattern but are not
part of the pattern itself. Consequently, I think it would be
inappropriate for any framework to provide these behaviors. If I
encountered one that did I would consider it a warning sign that the
framework is probably not generic enough and/or is bloated.

Just my 2 cents,
Ben



--- In [email protected], "ACE" <[EMAIL PROTECTED]> wrote:
>
> It is not so much of using If/new callbacks, it is more of a generic
> approach. I personally do not like If(s), not a fan at all.
> 
> What I find missing is an easy way of sequencing events as i would
> have done in traditional threaded applications. If I was do a
> callback, i would prefer to pass a function than a class as you know
> then what is going to come back where.
> 
> On a slightly different note, I find that both Cairngorm/UM extensions
> have not really provided ways to use the Command pattern, like no ways
> to do Undo, wizards etc. What they have with them is a very bare-bones
> framework, that I believe has miles to go.
> 
> Nevertheless, good stuff - we have a beginning. 
> 
> Thanks for the help.
>


Reply via email to