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 / Architecture / Re: Mediator notification handling on: August 23, 2007, 12:36:22
I have to concur with Sean.  The use of a switch statement to de-mux the mediator notifications takes me back to my early Windows programming days - and not in a good way.  I agree that a mediator should be a "get in, get out" type of object, but the case statement has a "smell" to it for me.  If you can have a hardcoded callback (handleNotification), you can have a customized callback.  Internally, I think it requires one additional level of indirection more than what's there now.  From an API perspective I'd prefer to see a registerNotificationInterest( noteName, callbackMethod) type method.

Dan
Pages: [1]