PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: saad on May 03, 2012, 07:06:15



Title: PureMVC with SWFAddress
Post by: saad on May 03, 2012, 07:06:15
Further to the approach mentioned in here:
http://pixelmelon.com/index.php?option=com_content&view=article&id=8:swfaddress-with-puremvc-single-core&catid=8&Itemid=25&showall=1&limitstart=

I'm trying to figure out the right approach.

1) As per the above article-> MenuComponent dispatch events, handled by MenuMediator which in turns sends a Notification handled by a UriAddressCommand, UriAddressCommand then retrieves the UriAddressProxy, call function to performs uri operations for browser which then sends a Notification handled by ViewMediators to display the related view.

2) In my approach, I'm not using Command, MenuMediator directly retrieves the UriAddressProxy, call function to perform uri operations for browser and which then sends a Notification handled by ViewMediators to display the related view.

It's the shortest way to go but I'm not sure if it's the right way to do. Please advise.


Title: Re: PureMVC with SWFAddress
Post by: puremvc on May 03, 2012, 11:30:48
You don't have to fire off a command just to turn around and make a Proxy call. You can do that from the mediator as you've chosen. It is a personal choice. In strict 'three tier design' all view to model and model to view communications have to go through the controller region. However in MVC, we really have a triangle rather than tiers, and so the view can update the model and the model can notify the view.

-=Cliff>


Title: Re: PureMVC with SWFAddress
Post by: saad on May 07, 2012, 06:07:24
thanks... :)