title: Cairngorm Model Locator Pattern
body: <p>In Cairngorm (Flex Framework), there is Model Locator Pattern, which is similar to Global variables, is it a right pattern, Adobe is saying for flex its best pattern</p>
  
  <blockquote>
    <p><em>Adobe Consulting team conceived the Model Locator pattern as a best
    practice for Flex developers to adopt.
    The Model Locator pattern is unique
    because it is not a pattern we
    borrowed from the Core J2EE Pattern
    catalog. Instead, we created this
    pattern particularly for Flex
    application development. Our
    motivation was to have a single place
    where the application state is held in
    a Flex application and where view
    components are able to “locate” the
    client-side model that they wish to
    render. Our Model Locator pattern
    strategy encourages the use of data
    binding so that view components bind
    directly to the client-side state held
    in the single instance of the
    ModelLocator class. In this way,
    whenever the model is updated in
    ModelLocator, all view components
    binding to the model receive
    notifications (through the underlying
    data-binding mechanism) and update
    themselves to render the new model on
    the client.</em></p>
  </blockquote>