Datasheet
Chapter 1: Introducing Cairngorm
10
To avoid any confusion as to where a particular type of class should be located, I am suggesting the
following package structure:
commands (stores command classes)
controllers (stores the FrontController class)
delegates (stores service delegate classes)
events (stores event classes)
models (stores ModelLocator classes)
services (stores the ServiceLocator class)
valueobjects (stores value object classes)
views (stores MXML views)
In the above package structure, each type of class is contained in a package that describes the type of
classes it contains. This is the package structure that you will use when creating the sample application
in this book.
However, as we explore the various parts of the Cairngorm framework, the various locations that the
classes can be located in will be pointed out, using the Cairngorm Store and FStop applications as
examples. This knowledge can be useful if you inherit a project from another developer.
Benefits of Using Cairngorm
Now that you have a basic idea of the structure, components, and application logic flow of a Cairngorm
project, it ’ s time to examine some of the benefits the framework provides.
In the “ Flex 3: Introducing Cairngorm ” article cited earlier, the following purposes of Cairngorm
are defined:
Cairngorm is an approach to organizing and partitioning:
Code and packages
Component functionality and roles
Cairngorm is a “ best practice ” methodology for Flex software design and development.
Cairngorm encourages developers to identify, organize, and separate code based on its roles/
responsibilities.
Many of these points have already been mentioned in the quoted descriptions of Cairngorm earlier in
this chapter, but what has not been discussed are the benefits that arise from this organization and best -
practices methodology.
❑
❑
❑
❑
❑
❑
❑
❑
❑
❏
❏
❑
❑
c01.indd 10c01.indd 10 10/20/09 12:26:43 PM10/20/09 12:26:43 PM