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

21.1. The Application So Far

Thus far you have created the following features in the sample application:

  • Main application file (for testing other components and to hold a reference to the FrontController)

  • User registration

  • Login and logout

  • Adding of new posts

  • Loading of existing posts

  • Commenting system

  • Search capabilities (keyword and category).

While the particular feature has varied for each chapter, the basic process for building it has been essentially the same each time:

  1. You identified and created any value objects for situations in which collections of data needed to be passed around the application or to the backend.

  2. You created event classes to trigger the logic for the feature. If data needed to be passed to commands, you commonly used value objects that could be passed in via the constructor and stored in public variables.

  3. You created delegate classes for procedures that required interaction with the backend.

  4. You added properties to the ModelLocator that your command classes would update.

  5. You created corresponding command classes for each event. These used the delegate classes to interact with the backend.

  6. When you finished creating corresponding event and command classes, you added them to the FrontController.

  7. You created views that collected the necessary data expected by the event classes (often this involved constructing value objects) and then dispatched the appropriate events.

The logic behind this order is that you tend first to create objects that are referenced by other ...

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