Hi Mark,

I'm not sure I understand your question but just in case:

Mediators are not part of the pattern used by Cairngorm or Parsley, the
reason is the view dependency of the mediator doesn't allow easy testing,
instead, they use the Command and Presentation Model [1] [2] patterns.

Basically, a class will act as the model for the view, this model will be
injected into the view, each user action in this view that needs to alter
the data model will dispatch a specific event which will trigger a command,
the command will then alter the model, doing so, visual code and non-visual
code are well separated and all the non-visual code can be unit tested
easily.

For an example of the usage, you can have a look at
https://github.com/apacheflex/whiteboard_fthomas_developerToolSuite/blob/dev
elop/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/fle
x/org/apache/flex/utilities/developerToolSuite/presentation/graphic/menu/App
licationMenu.mxml

And its model:
https://github.com/apacheflex/whiteboard_fthomas_developerToolSuite/blob/dev
elop/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/fle
x/org/apache/flex/utilities/developerToolSuite/presentation/behavior/menu/Ap
plicationMenuPM.as

HTH
-Fred

[1] http://sourceforge.net/adobe/cairngorm/wiki/CairngormGuidelines/
[2] http://www.dehats.com/drupal/node/48

Reply via email to