<?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: Flex&#8217;s Data Transfer Pattern (Class Adapters)</title>
	<atom:link href="http://natescodevault.com/?feed=rss2&#038;p=28" rel="self" type="application/rss+xml" />
	<link>http://natescodevault.com/?p=28</link>
	<description>from the dark recesses of an anxious mind</description>
	<lastBuildDate>Mon, 30 Aug 2010 15:12:10 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nate</title>
		<link>http://natescodevault.com/?p=28&#038;cpage=1#comment-42</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Thu, 15 Jan 2009 23:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://nateross.wordpress.com/?p=28#comment-42</guid>
		<description>I will be checking that out. In fact, maybe I&#039;ll write a post about it once I try it out. Thanks.</description>
		<content:encoded><![CDATA[<p>I will be checking that out. In fact, maybe I&#8217;ll write a post about it once I try it out. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://natescodevault.com/?p=28&#038;cpage=1#comment-40</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Thu, 15 Jan 2009 22:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://nateross.wordpress.com/?p=28#comment-40</guid>
		<description>@gwoo

You have some good points. Here are my responses to your arguments...

1. High Coupling. As for your arguments, first when I say high coupling, I am referring to coupling between the front-end and back-end.  If there are multiple front-end solutions that use the same CakePHP backend, then for every change that is made to the database an overhaul will ripple out to the front-end implementations.  For Flex applications, this means that you need to rebuild (and redistribute) the SWF.  In AIR applications, this is even more problematic as it would require an update to be pushed out to every installed AIR application.

If the modeling due to the database change were handled on the backend, this wouldn&#039;t have to happen. In my opinion, this is not a good thing.  However, the same can be said if your front-end application has several different back-end implementations.  I think this is less frequently used, hence my reasoning for doing it on the back-end.

2. Less of a chance of refactoring. I agree with you that schema changes in the database will more often than not require a change to the front-end.  However, what if you decide that the schema you are using for the backend is inefficient for some reason.  Maybe you are using too many joins, or your back-end is overly taxed?  This might be a reason to refactor that database schema which would require you to change the front-end and rebuild.  If all of this were handled on the back-end, we wouldn&#039;t have to deal with the front-end in these cases.

3. SWF Size. True, SWF size isn&#039;t that big of a deal since the object modeling classes wouldn&#039;t add too much overhead, but I feel it is a matter of principle that you should always try to keep the size down.

4. Utilize the server. You can always add server space and computer power as you see fit. This part can be perfectly scalable (according to your budget). The client&#039;s computer, on the other hand, you have no control over. This is probably not that big of a deal because the computing power required to model objects is probably negligible.

As a side note, I would be interested in hearing your ideas for Fake. If this is something you could share, let me know.

Thanks for your thoughts.</description>
		<content:encoded><![CDATA[<p>@gwoo</p>
<p>You have some good points. Here are my responses to your arguments&#8230;</p>
<p>1. High Coupling. As for your arguments, first when I say high coupling, I am referring to coupling between the front-end and back-end.  If there are multiple front-end solutions that use the same CakePHP backend, then for every change that is made to the database an overhaul will ripple out to the front-end implementations.  For Flex applications, this means that you need to rebuild (and redistribute) the SWF.  In AIR applications, this is even more problematic as it would require an update to be pushed out to every installed AIR application.</p>
<p>If the modeling due to the database change were handled on the backend, this wouldn&#8217;t have to happen. In my opinion, this is not a good thing.  However, the same can be said if your front-end application has several different back-end implementations.  I think this is less frequently used, hence my reasoning for doing it on the back-end.</p>
<p>2. Less of a chance of refactoring. I agree with you that schema changes in the database will more often than not require a change to the front-end.  However, what if you decide that the schema you are using for the backend is inefficient for some reason.  Maybe you are using too many joins, or your back-end is overly taxed?  This might be a reason to refactor that database schema which would require you to change the front-end and rebuild.  If all of this were handled on the back-end, we wouldn&#8217;t have to deal with the front-end in these cases.</p>
<p>3. SWF Size. True, SWF size isn&#8217;t that big of a deal since the object modeling classes wouldn&#8217;t add too much overhead, but I feel it is a matter of principle that you should always try to keep the size down.</p>
<p>4. Utilize the server. You can always add server space and computer power as you see fit. This part can be perfectly scalable (according to your budget). The client&#8217;s computer, on the other hand, you have no control over. This is probably not that big of a deal because the computing power required to model objects is probably negligible.</p>
<p>As a side note, I would be interested in hearing your ideas for Fake. If this is something you could share, let me know.</p>
<p>Thanks for your thoughts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gwoo</title>
		<link>http://natescodevault.com/?p=28&#038;cpage=1#comment-41</link>
		<dc:creator>gwoo</dc:creator>
		<pubDate>Thu, 15 Jan 2009 21:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://nateross.wordpress.com/?p=28#comment-41</guid>
		<description>Fake is currently located on google code:
http://fake-as3.googlecode.com

There are some examples and also test cases for how the as3 conversion is done via the ResultSet class.

A few of us hang out in #fake-as3 on irc.freenode.net

Bottom line, Coupling is no fun and has to be dealt with. You are not avoiding it by using a DTO.

As far as the server goes, You hit the nail on the head. Conversion is light and therefore will have very little if any noticeable affect on the client. Whereas, if you do it on the server, for a couple hundred users, I am sure you will notice it. Of course, you could cache, but that just creates more work and potential for problems.

For me the biggest thing is having the same controllers for amf, xml, json, html, without the need for extra logic.</description>
		<content:encoded><![CDATA[<p>Fake is currently located on google code:<br />
<a href="http://fake-as3.googlecode.com" rel="nofollow">http://fake-as3.googlecode.com</a></p>
<p>There are some examples and also test cases for how the as3 conversion is done via the ResultSet class.</p>
<p>A few of us hang out in #fake-as3 on irc.freenode.net</p>
<p>Bottom line, Coupling is no fun and has to be dealt with. You are not avoiding it by using a DTO.</p>
<p>As far as the server goes, You hit the nail on the head. Conversion is light and therefore will have very little if any noticeable affect on the client. Whereas, if you do it on the server, for a couple hundred users, I am sure you will notice it. Of course, you could cache, but that just creates more work and potential for problems.</p>
<p>For me the biggest thing is having the same controllers for amf, xml, json, html, without the need for extra logic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gwoo</title>
		<link>http://natescodevault.com/?p=28&#038;cpage=1#comment-39</link>
		<dc:creator>gwoo</dc:creator>
		<pubDate>Thu, 15 Jan 2009 15:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://nateross.wordpress.com/?p=28#comment-39</guid>
		<description>I have to disagree. If any bending needs to be done it should happen on the front end. This offloads the work to the client, which we all know is a nice benefit of the flex/flash platform.

As the developer of CakeAMF, I made this decision a while ago. To compensate on the front-end I have been working on a sister project called Fake, which makes working with Cake objects in a native Flex environment trivial.

In fact, Fake uses a single model as the VO and RO which to me simplifies development in Flex even further.

Now onto your pros:
&quot;lack of high coupling&quot; - you are dreaming here. There is still a high degree of coupling no matter what you do.
&quot;less of a chance of refactoring&quot; - Any time you make a schema change you are going to need to update both ends. Really no way around it if you want to maintain strong typing.
&quot;decrease swf size&quot; - we are talking bytes here, not MB. Flex used to add 400kb and we still used it so really this pro is weak.
&quot;utilize the server&quot; - ALWAYS a con. simple as that.
&quot;maintains style&quot; - you can still have that if your resultset class formats things the way you want.
&quot;maintains flex standard&quot; - the most valid pro, but really is that a good standard we should even follow?
&quot;take adavantage of object mapping&quot; - you can still have this, as we do in Fake.

The Cons are both valid and are actually big Pros that outweigh the Cons when you decide to push the job onto the front end.

Anyway, its a good question for discussion. I hope i have added to it.

Good Luck.</description>
		<content:encoded><![CDATA[<p>I have to disagree. If any bending needs to be done it should happen on the front end. This offloads the work to the client, which we all know is a nice benefit of the flex/flash platform.</p>
<p>As the developer of CakeAMF, I made this decision a while ago. To compensate on the front-end I have been working on a sister project called Fake, which makes working with Cake objects in a native Flex environment trivial.</p>
<p>In fact, Fake uses a single model as the VO and RO which to me simplifies development in Flex even further.</p>
<p>Now onto your pros:<br />
&#8220;lack of high coupling&#8221; &#8211; you are dreaming here. There is still a high degree of coupling no matter what you do.<br />
&#8220;less of a chance of refactoring&#8221; &#8211; Any time you make a schema change you are going to need to update both ends. Really no way around it if you want to maintain strong typing.<br />
&#8220;decrease swf size&#8221; &#8211; we are talking bytes here, not MB. Flex used to add 400kb and we still used it so really this pro is weak.<br />
&#8220;utilize the server&#8221; &#8211; ALWAYS a con. simple as that.<br />
&#8220;maintains style&#8221; &#8211; you can still have that if your resultset class formats things the way you want.<br />
&#8220;maintains flex standard&#8221; &#8211; the most valid pro, but really is that a good standard we should even follow?<br />
&#8220;take adavantage of object mapping&#8221; &#8211; you can still have this, as we do in Fake.</p>
<p>The Cons are both valid and are actually big Pros that outweigh the Cons when you decide to push the job onto the front end.</p>
<p>Anyway, its a good question for discussion. I hope i have added to it.</p>
<p>Good Luck.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
