Enabling / Disabling Modules

ego's Avatar


21 Jun, 2011 10:06 AM


I'm using RL modular utils from Joel. So all my modules are view based modules (for now).
My app has different states where different modules are visible or not.

As I want to save a bit of performance (context setup, etc) I want to keep my modules when not showing but kinda disable them from listening to module framework events.

Is there an "easy" way to do it? Or do I have to think of a custom solution?

I already have some kind of gateway mediator for incoming and outgoing module events for each module in place which I could manually remove or add when disabling / enabling the modules.

Any thoughts or advice?

  1. 1 Posted by neilmanuell on 21 Jun, 2011 12:23 PM

    neilmanuell's Avatar

    Don't remove your gateway, just disable it, so that it stops listening.
    Well, keep it listening for an enable event, of course.

  2. 2 Posted by ego on 21 Jun, 2011 12:58 PM

    ego's Avatar

    ok. so having a gateway mediator that somehow is disabled / enabled does the trick?!

    glad I got one for each module;)

  3. 3 Posted by ego on 21 Jun, 2011 03:49 PM

    ego's Avatar

    just curious.

    do you actually add / remove framework listeners in mediators while their existence? I'm not sure if this is a good practice

  4. Support Staff 4 Posted by Ondina D.F. on 02 Nov, 2011 03:06 PM

    Ondina D.F.'s Avatar

    Hi ego,
    I'm closing this discussion.
    Feel free to reopen it in case you have more questions or you need further assistance with this issue. Please open new threads for new issues.
    Thank you for posting

  5. Ondina D.F. closed this discussion on 02 Nov, 2011 03:06 PM.

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

Keyboard shortcuts


? 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