Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / Re: Data Binding Vs. Notification on: November 09, 2008, 03:48:41
Well, I should have searched more.  This exact question has been answered: http://forums.puremvc.org/index.php?topic=60.0
2  Announcements and General Discussion / General Discussion / Data Binding Vs. Notification on: November 09, 2008, 03:08:06
Is the use of Flex's data binding something that's encouraged or discouraged?  It's quite convenient to use data binding for simple fields so that when one UI updates the data, all the other UI elements are updated as well.  This, however, seems to tie my code closer to Flex than what would be necessary.  I can see how I can accomplish the same thing with notifications but it can easily get out of control if everytime a field or variable is updated I have to send out a notification.  While I appreciate how PureMVC is not necessarily tied into Flex, the reality of my situation is that my code is tied into Flex and it would be silly for me to not use what is already there.

What are people's opinion on this? 
3  Announcements and General Discussion / General Discussion / Re: Purpose of registerMediator? Also, how to handle multiple mediator instances? on: November 01, 2008, 05:24:57
Another thing I've been considering is to make the mediator able to monitor multiple instances of the popup window, effectively making it a singleton.  This does get around the multiple instances problem but I'm still curious as to how one can handle that case should it ever arise.
4  Announcements and General Discussion / General Discussion / Purpose of registerMediator? Also, how to handle multiple mediator instances? on: November 01, 2008, 05:18:15
What is the purpose of registerMediator other than to keep a reference to the mediator so it doesn't get garbage collected?

Also, I have a situation where my application generates a popup window and I attach a mediator to each of those popup windows.  Do each of these mediators need an unique name?  If not, what happens when I call removeMediator when the user closes the popup window?  It seems uniqueness in name is necessary.  However, since the popup creation is going to be done by a command, it's hard to ensure that each popup mediator has an unique name.

Is a command the wrong place to do this?  I figured that a command is the right thing because there can be many different situations when the application would want to invoke the popup window.  Furthermore, I can see there being a series of necessary steps to take prior to showing the popup window such as fetching some data first.

Thanks.
Pages: [1]