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

Pages: [1]
Print
Author Topic: Benefits and Disadvantages of Un-typed Notification Bodies  (Read 3371 times)
swidnikk
Courseware Beta
Jr. Member
***
Posts: 13


View Profile Email
« 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.

Logged
Joel Hooks
Courseware Beta
Sr. Member
***
Posts: 146


baby steps

 - 46288188  - passport@provinsal.com  - joeltuff
View Profile WWW Email
« Reply #1 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.
Logged

http://joelhooks.com - my ramblings about developing with actionscript and python using pureMVC and django respectively.
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 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>
« Last Edit: October 13, 2008, 03:48:15 by puremvc » Logged
Pages: [1]
Print