O'Reilly logo

Professional Cairngorm™ by Jeremy Wischusen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

23.5. Summary

In this chapter you examined alternative methods for notifying views of the results of procedure calls. These included using the ViewHelper and ViewLocator classes included with Cairngorm and using the Responder class found in the mx.rpc package.

You then updated the registration feature to use the Responder class to act as an IResponder to do what you previously did by binding to a variable indicating the registration status on the ModelLocator.

This method of notifying views can reduce the number of properties in the ModelLocator that are simply there to notify views about the status of procedure calls.

Revising the other features that are currently binding to status indicators on the ModelLocator is simply a matter of updating the events, commands, and views associated with those features, as you did for the registration feature.

Let's take a moment to review some key points from this chapter.

The ViewHelper and ViewLocator classes have been deprecated, and their use is generally considered bad practice. One possible reason for their deprecation, and the primary argument against their use, is that they increase the coupling between classes (contrary to the claims made in the documentation). However, you may find older Cairngorm projects that use them, so it is worth knowing what they are and what their intended use is.

The Responder class allowed views to behave as IResponders without having to directly implement the IResponder interface. This allows your views ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required