Chapter 24. Sequencing Commands

In this chapter you will examine a method of triggering sequential commands. Sometimes you need a particular action to trigger a sequence of commands in which each command depends upon the success of the previous one. For example, when a user adds a comment in the sample application, you want the comment lists to be refreshed to display the new comment. Currently you arrange this directly by dispatching a new CommentEvent of type LOAD in the AddCommentCommand class. This works, but as you have seen in the last few chapters, there is often more than one way to accomplish the same result in Cairngorm. In this chapter you will examine another method of performing sequential operations, using the Cairngorm SequenceCommand class.

Get Professional Cairngorm™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.