Skip to Main Content
Professional Cairngorm™
book

Professional Cairngorm™

by Jeremy Wischusen
November 2009
Intermediate to advanced content levelIntermediate to advanced
357 pages
8h 20m
English
Wrox
Content preview from Professional Cairngorm™

23.3. The iResponder Interface and the Responder Class

Thomas Burleson of Universal Mind wrote an article titled "Cairngorm Secret Tip #3: Responders for View Notifications" (http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/), in which he puts forth a methodology for notifying views of the results of logical processes that does not require passing a reference to the view. This methodology hinges on using the IResponder interface and Responder class of the Flex framework.

Take note that the code examples in the article make use of specific Universal Mind classes (http://code.google.com/p/flexcairngorm/) that are not part of the standard Cairngorm framework. So you will be implementing the basic ideas expressed in the article, but you will not be implementing them exactly as described.

You've already used the IResponder interface in your command classes. This interface enables you to specify functions that will respond to the result and fault events of asynchronous calls such as HTTPServices and the like.

In this case you're going to have your views act as responders. However, you're not going to set this up in quite the same way as your command classes.

As pointed out in Burleson's article, having views act as IResponders raises a design question in regard to your views. Namely, if your views are going to act as responders, does this now mean that your views need to implement the IResponder interface? Burleson points out a couple of problems with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Java® JDK®, 6th Edition

Professional Java® JDK®, 6th Edition

W. Clay Richardson, Jeff Scanlon, Donald Avondolio, Mark W. Mitchell, Scot Schrager

Publisher Resources

ISBN: 9780470497265Purchase book