Hi!
Building a website with PureMVC.
My question regards best practices.
Due to size requirements I need to put code regarding a section of the website in the swf that corresponds to that section. If someone wants to see the news everything related to news is in the called on the news.fla
When the news.swf is loaded into the main Application I call the facade and instantiate Mediators, Proxies and Commands.
I all works beautifuly.
If I navigate into another portion of the website and return to news the commands are executed twice (or the number of times I have loaded the news.swf)
I managed to remove the mediators and proxies on unload of the news swf but I cannot remove the commands without digging into the framework.
Solutions I've come up with:
1. I could register the commands on the facade but it seems reasonable that the main swf does not need to instantiate everything when only a portion is needed.
2. I can also create a util singleton and flag the commands registered so they don't get registered again.
3. I also noted that Controller has a method removeCommand but I don't see it beeing used anywhere and through the facade I don't have access to it. Maybe one could be implemented
Any help on how this should be done would be greatly appreciated.
Thank you very much for PureMVC