Title: Benefits and Disadvantages of Un-typed Notification Bodies Post by: swidnikk on October 12, 2008, 08:54:52 I've been working on a PureMVC/AS3 port multi-core Flex application for about a year and the project has been winding down, so at a recent interview, I touted PureMVC as a great MVC framework.
The company I will possibly be hired to consult is still teetering between PureMVC and Cairngorm. I found myself having to defend and explain several of the architectural elements withing PureMVC. I wasn't completely satisfied with some of my answers... Can someone explain what are the benefits of un-typed notification bodies and how to combat dis-advantages? How do others deal with runtime related errors, for example, if a developer passes the wrong object in the body of a notification. Title: Re: Benefits and Disadvantages of Un-typed Notification Bodies Post by: Joel Hooks on October 12, 2008, 10:36:40 You can of course extend Notification or write new INotification classes.
The advantage to me is that I can push around notifications with the convenient sendNotification method. I also don't have to create 40 or 50 different Notification classes to cover the entire model. It is nice to know that I could if necessary though. I type check my notification bodies on the receiver side and throw an Error if it is wrong. Not as convenient as compile time type checking, but it is effective. Title: Re: Benefits and Disadvantages of Un-typed Notification Bodies Post by: puremvc on October 13, 2008, 07:57:51 Hi folks,
This question looks like a FAQ candidate. For now, the canonical answer lies in the following post: http://forums.puremvc.org/index.php?topic=733 -=Cliff> |