When do you think it is best to use Mediator and when ModuleMediator

yariv.gilad's Avatar

yariv.gilad

19 Oct, 2011 09:47 AM

Hi all

I use the modular utility in an app with a shell that loads other application swf files
each application has its own views & mediators
there is no question regarding the "main pages" mediators - I type those to ModuleMediator as they suppose to communicate with the shell and other modules
my question is regarding the "sub pages" mediators
I don't see why not each and every mediator everywhere shouldn't be a ModuleMediator and thus enabling it to communicate freely with other views, modules & the shell
what are the reasons to leave only the main mediator as ModuleMediator and have the rest of the views communicate through it with the shell & other modules?
isn't it creating an overhead of responsabilities & coding?

would love to get your opinions
cheers
Ajar
:)

  1. 1 Posted by Stray on 20 Oct, 2011 08:08 PM

    Stray's Avatar

    Hi Ajar,

    it all depends on how reusable you want your code to be - I personally only have my top level classes in a module know that they're in a module - everything else is coded as if it's just a normal app. This way I can run the module outside of the shell too.

    But if you know for certain that you won't need it outside of the shell then using ModuleMediator throughout might work better for you.

    Stray

  2. Ondina D.F. closed this discussion on 08 Dec, 2011 12:24 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac