28.2. Notifying Callers
Many of the improvements made in the Cairngorm Extensions center on using the mx.rpc.IResponder interface to respond to asynchronous calls.
The typical method of handling a remote service call in Cairngorm can be seen in (Figure 28-1).
Figure 28.1. Figure 28-1
In this scenario, only the command class responds to the asynchronous call. This class then must update the ModelLocator to notify the rest of the application of any changes resulting from the call.
The Cairngorm Extension modifies this process, as shown in (Figure 28-2).
Figure 28.2. Figure 28-2
In the Cairngorm Extensions system, the async response is sent back to the delegate class. When the delegate receives this response, each calling class notifies its calling class of the response, forming a chain of responders potentially reaching back to the component that dispatched the event. The result of this system is that classes, including views, can now respond to async calls by registering as responders.
You saw examples of the basic principles underlying this process when you used the mx.rpc.Responder class in Chapter 23. In the Cairngorm Extensions, the responder methodology is actually built into the extensions. The extensions implement this responder methodology as follows:
Notifications are ...
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.