<?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"
	>
<channel>
	<title>Comments on: Writing private attributes to a database using AMF in AS3 (IExternalizable)</title>
	<atom:link href="http://www.actionscriptfreelancer.com/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.actionscriptfreelancer.com/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/</link>
	<description>Professional and reliable Actionscript development</description>
	<pubDate>Fri, 12 Mar 2010 00:52:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://www.actionscriptfreelancer.com/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-325</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 29 Sep 2009 23:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-325</guid>
		<description>Although it's painfully lame, here's what I came up with:

&lt;code&gt;
class MyDataModel {

     private var myInt:uint;
     private var myString:String;

     public function get dbMyInt():uint {
         return myInt;
     }
     public function set dbMyInt(val:uint):void {
         throw new Error("dbMyInt can't be set");
     }

     public function get dbMyString():String {
         return myString;
     }
     public function set dbMyString(val:String):void {
         throw new Error("dbMyString can't be set");
     }
}
&lt;/code&gt;

I'm willing to live with runtime errors in order to have typed objects over associative arrays.</description>
		<content:encoded><![CDATA[<p>Although it&#8217;s painfully lame, here&#8217;s what I came up with:</p>
<p><code><br />
class MyDataModel {</p>
<p>     private var myInt:uint;<br />
     private var myString:String;</p>
<p>     public function get dbMyInt():uint {<br />
         return myInt;<br />
     }<br />
     public function set dbMyInt(val:uint):void {<br />
         throw new Error("dbMyInt can't be set");<br />
     }</p>
<p>     public function get dbMyString():String {<br />
         return myString;<br />
     }<br />
     public function set dbMyString(val:String):void {<br />
         throw new Error("dbMyString can't be set");<br />
     }<br />
}<br />
</code></p>
<p>I&#8217;m willing to live with runtime errors in order to have typed objects over associative arrays.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash Tips &#187; AS3 and AMFPHP roundup</title>
		<link>http://www.actionscriptfreelancer.com/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-176</link>
		<dc:creator>Flash Tips &#187; AS3 and AMFPHP roundup</dc:creator>
		<pubDate>Tue, 18 Nov 2008 03:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-176</guid>
		<description>[...] Writing private attributes to a database using AMF in AS3   Possibly related posts: (automatically generated) [...]</description>
		<content:encoded><![CDATA[<p>[...] Writing private attributes to a database using AMF in AS3   Possibly related posts: (automatically generated) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: devdave</title>
		<link>http://www.actionscriptfreelancer.com/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-151</link>
		<dc:creator>devdave</dc:creator>
		<pubDate>Tue, 19 Aug 2008 09:05:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-151</guid>
		<description>I guess the logic is that the default AMF class serialization is assuming that the classes are value objects, which traditionally have a bunch of public attributes and not much else.  As for AMF/PHP5 issues - I suspect the problem is to do with the AMF deserialization rather than anything to do with PHP itself.  If you implement IExternalizable I'd think that from the perspective of the server its getting a bunch of 'public' attributes anyway.  Hopefully this is something that the AMFPHP developers will fix soon.  I'm sure I read somewhere that Adobe were getting involved in AMFPHP (although I can't find any articles on it right now), so perhaps that will give it a boost.

Dave</description>
		<content:encoded><![CDATA[<p>I guess the logic is that the default AMF class serialization is assuming that the classes are value objects, which traditionally have a bunch of public attributes and not much else.  As for AMF/PHP5 issues - I suspect the problem is to do with the AMF deserialization rather than anything to do with PHP itself.  If you implement IExternalizable I&#8217;d think that from the perspective of the server its getting a bunch of &#8216;public&#8217; attributes anyway.  Hopefully this is something that the AMFPHP developers will fix soon.  I&#8217;m sure I read somewhere that Adobe were getting involved in AMFPHP (although I can&#8217;t find any articles on it right now), so perhaps that will give it a boost.</p>
<p>Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danny Miller</title>
		<link>http://www.actionscriptfreelancer.com/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-150</link>
		<dc:creator>Danny Miller</dc:creator>
		<pubDate>Tue, 19 Aug 2008 02:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-150</guid>
		<description>Yeah, we all encounter this problem.
What is really strange is that the get functions aren't recognized... I don't understand why that's ignored...

But anyway, I'm very surprised that AMF and PHP 5 won't support sending private attributes since private is supported in PHP 5... I could understand if it was an earlier version.</description>
		<content:encoded><![CDATA[<p>Yeah, we all encounter this problem.<br />
What is really strange is that the get functions aren&#8217;t recognized&#8230; I don&#8217;t understand why that&#8217;s ignored&#8230;</p>
<p>But anyway, I&#8217;m very surprised that AMF and PHP 5 won&#8217;t support sending private attributes since private is supported in PHP 5&#8230; I could understand if it was an earlier version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tutorials &#124; AS3 and AMFPHP Roundup &#171; Flash Enabled Blog</title>
		<link>http://www.actionscriptfreelancer.com/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-121</link>
		<dc:creator>Tutorials &#124; AS3 and AMFPHP Roundup &#171; Flash Enabled Blog</dc:creator>
		<pubDate>Wed, 30 Jul 2008 23:43:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionscriptdeveloper.co.uk/writing-private-attributes-to-a-database-using-amf-in-as3-iexternalizable/#comment-121</guid>
		<description>[...] Writing private attributes to a database using AMF in AS3      No Comments   Leave a Commenttrackback addressThere was an error with your comment, please try again. name (required)email (will not be published) (required)url [...]</description>
		<content:encoded><![CDATA[<p>[...] Writing private attributes to a database using AMF in AS3      No Comments   Leave a Commenttrackback addressThere was an error with your comment, please try again. name (required)email (will not be published) (required)url [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
