topleft
topright

OReilly PureMVC Book

PureMVC Book

PureMVC TV

PureMVC TV

PureMVC on the Web

PureMVC Blog-o-Sphere
PureMVC on LinkedIn
 
Image
 
Why can't Proxies hear Notifications?
Sunday, 05 October 2008

QUESTION: 

Brian at BrickaBracka asks:

 

 

Is there reason why Proxies can't handleNotification?  Seems like we are missing something.

 

QUESTION: 

From 'Best Practices and Implementation Idioms ':

 

Proxies Send, but Do Not Receive Notifications
 
For a Proxy to listen for Notifications is to couple it too tightly to the View and Controller tiers.
 
Those tiers must necessarily listen to Notifications from Proxies, as their function is to visually represent and allow the user to interact with the data Model held by the Proxies.
 
However View and Controller tiers should be able to vary without affecting the data Model tier.
 
For instance, an administration application and a related user application might share the same Model tier classes. If only the use cases differ they can be carried out by different View/Controller arrangements operating against the same Model.

 

Proxies may retrieve and act upon each other as need be, and since hierarchies naturally exist in most domain models, it isn't unreasonable to allow them to do this, since the Proxy serves to control access to the data and to maintain the integrity of the held model.

 

One might argue that Proxies need to send Notifications to each other, in order to decouple them from each other. And that's true, but it's decoupling across tiers that we're mostly concerned about with MVC, and particularly in the direction of Model to View.

 

If Proxies could hear Notifications, the unwary coder might be tempted to make a Proxy listen for Notification defined and sent from the View or Controller tier, thus coupling the Model to the View in such a way that extricating the Model tier for use in another application could be difficult.

 

So the decision to make Proxies 'deaf' to Notifications was to choose the lesser of two evil couplings.

 

-=Cliff>

Delicious
Technorati
Reddit
Furl it!
NewsVine
YahooMyWeb
Stumble
blogmarks
Digg
co.mments
connotea
 

PureMVC on the Web

João Pescada has produced a nice PureMVC / AS3 demo - a searchable image gallery. 
 
Photo Search with PureMVC - Article  -  Code  -  Demo

 

 
Jonathan Campos has put together a nice introductory PureMVC article with an example built around the Netflix API.
 
Netflix API with PureMVC Article

 
The guys over at Pyjamas (a Python port of GWT) have made their compiler so efficient that it can take virtually any Python library and it will compile to Javascript. They loved the look of PureMVC Python, and decided to do a couple of demos that use it.
 

Pyjamas Project

• EmployeeAdmin Demo: Original / Pyjamas  

Pyjamas PureMVC Timesheet Demo

 
Chandima Cumaranatunge, co-author of the O'Rielly book AS3 Design Patterns, and long-time PureMVC community member recently created a simple Flash/AS3 MultiCore demonstration application accompanied by an informative article that's an excellent introduction to the benefits of working with MultiCore.
 
Who Moved the Cheese? - Demo / Source / Article

ActionScript 3 Design Patterns

 

Ahmed Nuaman has published a well conceived and received AS3/PureMVC tutorial at FlashTuts.com. It's a good place for the learner to get their feet wet, and goes into the difference between using PureMVC with Flex as opposed to Flash or pure AS3.

 

Understanding the PureMVC Open Source Framework

FlashTuts Website
Ahmed's Website

 

 

Recent Project Activity

The PureMVC MultiCore framework for  Native JavaScript is now available. It has no dependency on other frameworks and provides its own optional namespace and class simulation.

 

 

 

PureMVC Standard Version for Perl 1.0  has been released, complete with unit tests and online documentation.

 

PureMVC Standard Framework for Perl

 

Release 1.3 of the AIR DesktopCitizen Utility which allows applications to remember their window size, position and maximized/minimized state each time it is launched. It also provides a facility for requiring confirmation (or executing some shutdown process) before the application window closes.

 

AS3 / AIR Desktop Citizen Utility

CodePeek Demo

 

The classic PureMVC EmployeeAdmin Demo has been ported to yet another language! Although PHP is usually thought of as a server language, using PHP-GTK, Sasa Tarbuk recreates th a desktop app. 

 

 
Version 1.0.8 of the PureMVC Java MultiCore port is now available. It supports JavaFX and handles threading properly.

 

 
Copyright (c) 2006-2012 Futurescale, Inc.