<?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: MVC Pattern in AS3</title>
	<atom:link href="http://inspiredrobot.com/blog/2009/10/31/mvc-pattern-in-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://inspiredrobot.com/blog/2009/10/31/mvc-pattern-in-as3/</link>
	<description>Coding for the robotic soul</description>
	<lastBuildDate>Sat, 30 Apr 2011 14:02:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Steve Perrie</title>
		<link>http://inspiredrobot.com/blog/2009/10/31/mvc-pattern-in-as3/comment-page-1/#comment-266</link>
		<dc:creator>Steve Perrie</dc:creator>
		<pubDate>Sun, 27 Feb 2011 18:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://inspiredrobot.com/blog/?p=49#comment-266</guid>
		<description>It&#039;s interesting to see MVC patterns applied to client side software, which traditionally resides completely in the presentation layer. Creating a true and strict MVC pattern outside of a native framework that takes care of some of the basic model binding is a tough road. It takes a lot of work to completely abstract a view from data, and it&#039;s often not worth the trouble when you have deadlines and the chance of reuse is slim.

The difficulty comes when you&#039;re using a model in multiple places. The temptation is high to store logic right in your model because it&#039;s a centralized location. Then when new requirements come it you can quickly find your model bending to fit multiple purposes. 

I get into those themes a little in my post on MVC (shameless plug). http://www.mindstorminteractive.com/blog/?p=399

You&#039;ll hopefully get to experience the joys of the ASP.NET MVC world soon enough. Once you learn linq and entity framework you won&#039;t miss your cute little xml parser.</description>
		<content:encoded><![CDATA[<p>It&#8217;s interesting to see MVC patterns applied to client side software, which traditionally resides completely in the presentation layer. Creating a true and strict MVC pattern outside of a native framework that takes care of some of the basic model binding is a tough road. It takes a lot of work to completely abstract a view from data, and it&#8217;s often not worth the trouble when you have deadlines and the chance of reuse is slim.</p>
<p>The difficulty comes when you&#8217;re using a model in multiple places. The temptation is high to store logic right in your model because it&#8217;s a centralized location. Then when new requirements come it you can quickly find your model bending to fit multiple purposes. </p>
<p>I get into those themes a little in my post on MVC (shameless plug). <a href="http://www.mindstorminteractive.com/blog/?p=399" rel="nofollow">http://www.mindstorminteractive.com/blog/?p=399</a></p>
<p>You&#8217;ll hopefully get to experience the joys of the ASP.NET MVC world soon enough. Once you learn linq and entity framework you won&#8217;t miss your cute little xml parser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Pencola</title>
		<link>http://inspiredrobot.com/blog/2009/10/31/mvc-pattern-in-as3/comment-page-1/#comment-68</link>
		<dc:creator>John Pencola</dc:creator>
		<pubDate>Tue, 17 Nov 2009 04:35:32 +0000</pubDate>
		<guid isPermaLink="false">http://inspiredrobot.com/blog/?p=49#comment-68</guid>
		<description>Hi there, good post! I totally agree on your comment about abuse/over-use of MVC. I think that force-fitting an application into the MVC pattern ( or any pattern for that matter ) as a default solution is the first mistake a lot of engineers make. I&#039;ve especially seen this happen in the Flash community! What I do like about the MVC pattern is the emphasis on code separation and organization and not so much about implementing exactly how MVC patterned code ( as defined ) &quot;should&quot; operate. It&#039;s all about the task at hand and the objects we are working with. 

That said, if serializing and deserializing your model directly in your View classes works in your application, than so be it. Although, to me, and my limited understanding of what you are specifically working on, that raises a red flag. For example, what if the data source ( whether it be an RSS, a Web Service, etc. ) returned a data structure that was a far cry from the true object models in which you software operates on? And what if there are multiple services that we need to work with?

Generally speaking, I like to handle this in the Model layer of the software. The various Views and Controllers only know of specific OO Model types. What you end up with is an intermediary object that does the serializing and deserializing and interfaces directly with the data service. If you want to collect data from various sources ( as mentioned above ) you can then write additional intermediary objects that de/serialize those structures. But the important part is that the response from those data services is funneled back through those methods into a common set of Model objects. These objects are understood by the softwares VC&#039;s and are not coupled with the data services that their properties are populated from. In a nutshell, while it may be easy to parse the XML straight in the View it will ultimately lead to tighter coupling. Just think of it this way, &quot;What is the the responsibility of the View?&quot;.

Again, great thoughts! I&#039;ll check back here more often. Take care man.

JP</description>
		<content:encoded><![CDATA[<p>Hi there, good post! I totally agree on your comment about abuse/over-use of MVC. I think that force-fitting an application into the MVC pattern ( or any pattern for that matter ) as a default solution is the first mistake a lot of engineers make. I&#8217;ve especially seen this happen in the Flash community! What I do like about the MVC pattern is the emphasis on code separation and organization and not so much about implementing exactly how MVC patterned code ( as defined ) &#8220;should&#8221; operate. It&#8217;s all about the task at hand and the objects we are working with. </p>
<p>That said, if serializing and deserializing your model directly in your View classes works in your application, than so be it. Although, to me, and my limited understanding of what you are specifically working on, that raises a red flag. For example, what if the data source ( whether it be an RSS, a Web Service, etc. ) returned a data structure that was a far cry from the true object models in which you software operates on? And what if there are multiple services that we need to work with?</p>
<p>Generally speaking, I like to handle this in the Model layer of the software. The various Views and Controllers only know of specific OO Model types. What you end up with is an intermediary object that does the serializing and deserializing and interfaces directly with the data service. If you want to collect data from various sources ( as mentioned above ) you can then write additional intermediary objects that de/serialize those structures. But the important part is that the response from those data services is funneled back through those methods into a common set of Model objects. These objects are understood by the softwares VC&#8217;s and are not coupled with the data services that their properties are populated from. In a nutshell, while it may be easy to parse the XML straight in the View it will ultimately lead to tighter coupling. Just think of it this way, &#8220;What is the the responsibility of the View?&#8221;.</p>
<p>Again, great thoughts! I&#8217;ll check back here more often. Take care man.</p>
<p>JP</p>
]]></content:encoded>
	</item>
</channel>
</rss>

