<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PureMVC actors and their responsibilities</title>
	<atom:link href="http://mariusht.com/blog/2009/05/28/puremvc-actors-and-their-responsibilities/feed/" rel="self" type="application/rss+xml" />
	<link>http://mariusht.com/blog/2009/05/28/puremvc-actors-and-their-responsibilities/</link>
	<description>A blog about Flex Development.</description>
	<lastBuildDate>Wed, 10 Mar 2010 17:53:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Arno</title>
		<link>http://mariusht.com/blog/2009/05/28/puremvc-actors-and-their-responsibilities/comment-page-1/#comment-110</link>
		<dc:creator>Arno</dc:creator>
		<pubDate>Wed, 24 Jun 2009 06:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://mariusht.com/blog/?p=621#comment-110</guid>
		<description>Thanks for the example and explanation. It is much clearer now</description>
		<content:encoded><![CDATA[<p>Thanks for the example and explanation. It is much clearer now</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mariush T.</title>
		<link>http://mariusht.com/blog/2009/05/28/puremvc-actors-and-their-responsibilities/comment-page-1/#comment-109</link>
		<dc:creator>Mariush T.</dc:creator>
		<pubDate>Tue, 23 Jun 2009 22:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://mariusht.com/blog/?p=621#comment-109</guid>
		<description>There are two ways of getting this data in Command:
1.You can retrieve proxy and get the data
   var usersProxy:UsersProxy = facade.retrieveProxy( UsersProxy.NAME ) as UsersProxy;
   var users:ArrayCollection = usersProxy.users;
2.Proxy can send data together within Notification,  Command gets data from the body of Notification 
   var users:ArrayCollection = notification.getBody() as ArrayCollection;

&lt;a href=&quot;http://mariusht.com/files/blog/puremvc_actors/DeleteUserCommand.as.html&quot; rel=&quot;nofollow&quot;&gt;DeleteUserCommand&lt;/a&gt;

Yes, You&#039;re right. Proxy sends Notification, interested mediators receive notification or commands are triggered. Commands are not allow to receive notification, they are instantiated and executed by the Controller. In order to trigger command, you need to register Command. registerCommand(CategoriesProxy.CATEGORIES_RECEIVED, ManipulateDataCommand).
public class ManipulateDataCommand extends SimpleCommand
{
	override public function execute(notification:INotification):void
	{
		var categories:ArrayCollection = notification.getBody() as ArrayCollection;
                .. manipulate data
	}
}
To better understand Commands, think about Commands as an object with only 1 second lifecycle, they are instantiated, executed and gone. There is no time for them to listen for notification in such a short period of life :)</description>
		<content:encoded><![CDATA[<p>There are two ways of getting this data in Command:<br />
1.You can retrieve proxy and get the data<br />
   var usersProxy:UsersProxy = facade.retrieveProxy( UsersProxy.NAME ) as UsersProxy;<br />
   var users:ArrayCollection = usersProxy.users;<br />
2.Proxy can send data together within Notification,  Command gets data from the body of Notification<br />
   var users:ArrayCollection = notification.getBody() as ArrayCollection;</p>
<p><a href="http://mariusht.com/files/blog/puremvc_actors/DeleteUserCommand.as.html" rel="nofollow">DeleteUserCommand</a></p>
<p>Yes, You&#8217;re right. Proxy sends Notification, interested mediators receive notification or commands are triggered. Commands are not allow to receive notification, they are instantiated and executed by the Controller. In order to trigger command, you need to register Command. registerCommand(CategoriesProxy.CATEGORIES_RECEIVED, ManipulateDataCommand).<br />
public class ManipulateDataCommand extends SimpleCommand<br />
{<br />
	override public function execute(notification:INotification):void<br />
	{<br />
		var categories:ArrayCollection = notification.getBody() as ArrayCollection;<br />
                .. manipulate data<br />
	}<br />
}<br />
To better understand Commands, think about Commands as an object with only 1 second lifecycle, they are instantiated, executed and gone. There is no time for them to listen for notification in such a short period of life <img src='http://mariusht.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arno</title>
		<link>http://mariusht.com/blog/2009/05/28/puremvc-actors-and-their-responsibilities/comment-page-1/#comment-107</link>
		<dc:creator>Arno</dc:creator>
		<pubDate>Tue, 23 Jun 2009 15:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://mariusht.com/blog/?p=621#comment-107</guid>
		<description>If the command&#039;s function is to manipulate data before display how does he get this data? When you receive the data in the proxy you send a notification that you receive in the mediator. Or do i get something wrong? Or are you allowed to receive notifications in the command?

thank you in advance</description>
		<content:encoded><![CDATA[<p>If the command&#8217;s function is to manipulate data before display how does he get this data? When you receive the data in the proxy you send a notification that you receive in the mediator. Or do i get something wrong? Or are you allowed to receive notifications in the command?</p>
<p>thank you in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://mariusht.com/blog/2009/05/28/puremvc-actors-and-their-responsibilities/comment-page-1/#comment-86</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 29 May 2009 10:07:03 +0000</pubDate>
		<guid isPermaLink="false">http://mariusht.com/blog/?p=621#comment-86</guid>
		<description>Well done :)</description>
		<content:encoded><![CDATA[<p>Well done <img src='http://mariusht.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cliff Hall</title>
		<link>http://mariusht.com/blog/2009/05/28/puremvc-actors-and-their-responsibilities/comment-page-1/#comment-84</link>
		<dc:creator>Cliff Hall</dc:creator>
		<pubDate>Thu, 28 May 2009 23:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://mariusht.com/blog/?p=621#comment-84</guid>
		<description>Excellent examples and presentation here, Mariush. The CarOwnersProxy is particularly well conceived.

-=Cliff&gt;</description>
		<content:encoded><![CDATA[<p>Excellent examples and presentation here, Mariush. The CarOwnersProxy is particularly well conceived.</p>
<p>-=Cliff&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
