<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Morphic Group &#187; Adobe Catalyst</title>
	<atom:link href="http://www.themorphicgroup.com/blog/tag/adobe-catalyst/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.themorphicgroup.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 22 Feb 2010 18:20:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Flash Camp St. Louis 2009 &#8211; This Friday</title>
		<link>http://www.themorphicgroup.com/blog/2009/09/08/flash-camp-st-louis-2009-this-friday/</link>
		<comments>http://www.themorphicgroup.com/blog/2009/09/08/flash-camp-st-louis-2009-this-friday/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 16:30:28 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Adobe Catalyst]]></category>
		<category><![CDATA[City Museum]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Flash Camp]]></category>
		<category><![CDATA[Flash Camp 2009]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Flex Conference]]></category>
		<category><![CDATA[FlexBuilder]]></category>
		<category><![CDATA[TMG]]></category>

		<guid isPermaLink="false">http://www.themorphicgroup.com/blog/?p=262</guid>
		<description><![CDATA[Two TMG employees presenting at Flash Camp St. Louis this Friday at the City Museum, Ben Bishop and Jason Hanson. Should be a good time. If you are in St. Louis and have any interest in Flash, Flex, or Catalyst think about coming. Tickets still available. www.flashcampstlouis.com]]></description>
			<content:encoded><![CDATA[<p>Two TMG employees presenting at Flash Camp St. Louis this Friday at the City Museum, Ben Bishop and Jason Hanson.</p>
<p>Should be a good time.  If you are in St. Louis and have any interest in Flash, Flex, or Catalyst think about coming.  </p>
<p>Tickets still available.</p>
<p><a href="http://www.flashcampstlouis.com/">www.flashcampstlouis.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themorphicgroup.com/blog/2009/09/08/flash-camp-st-louis-2009-this-friday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Chat About PHP with Adobe Flash Builder 4 and Flash Catalyst</title>
		<link>http://www.themorphicgroup.com/blog/2009/06/25/a-chat-about-php-with-flash-builder-4-and-adobe-catalyst/</link>
		<comments>http://www.themorphicgroup.com/blog/2009/06/25/a-chat-about-php-with-flash-builder-4-and-adobe-catalyst/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:45:42 +0000</pubDate>
		<dc:creator>Unknown Morphician</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe Catalyst]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Adobe Flash Builder 4]]></category>

		<guid isPermaLink="false">http://www.themorphicgroup.com/blog/?p=90</guid>
		<description><![CDATA[With all the hoopla that is going on with the Flash Platform... probably the biggest news comes from Flash Builder 4 (Flex) with Data Services. The new wizards that can introspect your data service and help you create code to build effortlessly (well at least it is a good start). You may use whatever flavor [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0in;">With all the hoopla that is going on with the Flash Platform... probably the biggest news comes from Flash Builder 4 (Flex) with Data Services. The new wizards that can introspect your data service and help you create code to build effortlessly (well at least it is a good start). You may use whatever flavor server-side technology you want - from Blaze DS, Cold Fusion, and PHP. This last technology is the focus of my little article. I also talk little bit about the work flow with Flash Catalyst and Flash Builder.</p>
<p style="margin-bottom: 0in;"><strong>ZEND Framework</strong></p>
<p style="margin-bottom: 0in;">First, I will briefly go over how to create a php data service using the wizard provided in Flash Builder. You first need to set up your project as you would for any service (Properties &gt; Flex Server). Once you have configure your php service Class and Package name, you are prompted to use Zend framework. The big hook here is the AMF support which also helps to introspect objects. I will say that the Zend framework has a lot of powerful features and is well know in the php community. The framework's size is 17 MB and needs to be uploaded to your web site whether you like it or not. You can't skip this step. This cause a couple of concerns. What if you Zend installed locally? What if in the future a new version of Zend is released won't this upload be a bit dated at some point?</p>
<p style="margin-bottom: 0in;"><img class="alignnone size-full wp-image-94" title="flexServer" src="http://www.themorphicgroup.com/blog/wp-content/uploads/2009/06/flexServer.jpg" alt="flexServer" width="470" height="435" /></p>
<p style="margin-bottom: 0in;"><img class="alignnone size-full wp-image-93" title="MyService_ZEND" src="http://www.themorphicgroup.com/blog/wp-content/uploads/2009/06/MyService_ZEND.jpg" alt="MyService_ZEND" width="480" height="482" /></p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		A:link { so-language: zxx } --></p>
<p style="margin-bottom: 0in;">From this point on your can get auto generated value objects, configure return types, bind to components just to name a few features. Here is a few great tutorials that illustrate these features and more with Zend:</p>
<ul>
<li><a href="http://devzone.zend.com/article/4705">Data-centric Adobe Flash Builder development with the Zend Framework </a></li>
<li><a href="http://www.adobe.com/devnet/flashcatalyst/articles/building_datacentric_app_flashcast_flashbuilder.html">Building a data-centric application using Flash Catalyst beta and Flash Builder 4 beta</a></li>
<li><a href="http://www.gotoandlearn.com/play?id=110">Lee Brimelow's Flash Builder 4 beta and Flash Catalyst beta video tutorial</a></li>
</ul>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;"><strong>AMFPHP</strong></p>
<p style="margin-bottom: 0in;">For the rest of this article, I will take a slightly different path as far as creating a PHP service. I will discuss how to implement a Flex project using PHP with AMFPHP (About a little over 700 KB).</p>
<p style="margin-bottom: 0in;">To illustrate this process, I will run through a simple example application – “CelebrationEvent”, a check list utility. The premise is to distribute a list of items needed  for a party or celebration for a group of friends. In this application, users will log in and sign up for items to be in charge of bringing to the event.</p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;">For this application, I went through the whole cycle from design to development with Illustrator CS3, Adobe Flash Catalyst, and Adobe Flash Builder 4.  I do have some comments on this work flow (trial and error) but my focus here is the actual service creation itself.</p>
<p style="margin-bottom: 0in;">Here is a screen shot of the work at beginning stage:</p>
<p style="margin-bottom: 0in;"><img class="alignnone size-full wp-image-95" title="CelebrationEventListLayout" src="http://www.themorphicgroup.com/blog/wp-content/uploads/2009/06/CelebrationEventListLayout.jpg" alt="CelebrationEventListLayout" width="480" height="362" /></p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;"><em><strong>Setup Process</strong></em></p>
<p style="margin-bottom: 0in;">Since there is no data service wizard, there is a manual setup process involved. In other words, create a remote object.</p>
<p style="margin-bottom: 0in;">Note: Download <a href="http://www.amfphp.org/" target="_blank">AMFPHP</a> if you haven't already done so already. Get familiar with folder structure and Setup. For “CelebrationEvent”, I'm 		using MySQL database with “phpMyAdmin”</p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;"><strong>Create Database and Tables Structure </strong></p>
<p style="margin-bottom: 0in;"><span style="font-weight: normal;">For this application I c</span>reated the EventCelebration database with these tables:</p>
<ul>
<li>
<p style="margin-bottom: 0in;">EventList – check list items for 	the event</p>
</li>
<li>
<p style="margin-bottom: 0in;">Users – User list</p>
</li>
<li>
<p style="margin-bottom: 0in;">EventListToUser – relationship 	of user to check list.</p>
</li>
</ul>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Create the backend service – PHP/AMFPHP</strong></p>
<ul>
<li>
<p style="margin-bottom: 0in;">Update globals.php under AMFPHP folder root</p>
<ul>
<li>
<p style="margin-bottom: 0in;">Change "DB_HOST", "DB_USER", "DB_PASS" and "DB_NAME" to the corresponding database setting for host address, database privilage user , password and database name ("EventCelebration")</p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;">The Service Class: 	CelebrationEventService.php</p>
<ul>
<li>
<p style="margin-bottom: 0in;">Class has four methods – 		createUser(), loginUser(), getList(), and signUpForItem()</p>
</li>
<li>
<p style="margin-bottom: 0in;">You would add this class file under the “services” folder of your AMF Folder</p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;">Value Objects: User.php and EventItem.php</p>
<ul>
<li>
<p style="margin-bottom: 0in;">Note: Make sure you reference the data type mapped to the corresponding actionscript value objects “explicitType”.</p>
</li>
<li>
<p style="margin-bottom: 0in;">You would add these class files under “services/vo/[folder package 	structure]</p>
</li>
<li>
<p style="margin-bottom: 0in;">Example folder: “services/vo/com/themorphicgroup/celebrateEvent”</p>
</li>
<li>
<p style="margin-bottom: 0in;">See Sample Code Below</p>
</li>
</ul>
</li>
</ul>
<div><strong>Code Sample - User VO</strong></div>
<div>
<div>&lt;?php<br />
class User {<br />
var $id;<br />
var $fullName;<br />
var $email;<br />
var $password;</p>
<p>// explicit actionscript package<br />
var $_explicitType = "com.themorphicgroup.celebrateEvent.User";</p>
<p>/**<br />
* Constructor with default values<br />
*/<br />
function User($id = -1, $fullName = "", $email = "", $password = ""){<br />
$this-&gt;id = $id;<br />
$this-&gt;fullName = $fullName;<br />
$this-&gt;email = $email;<br />
$this-&gt;password = $password;<br />
}</p>
<p>}<br />
?&gt;</p></div>
</div>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Create objects and calls in your project - Flex</strong></p>
<ul>
<li>
<p style="margin-bottom: 0in;">RemoteObject with handlers</p>
<ul>
<li>
<p style="margin-bottom: 0in;">With the way that the project was 		imported into Flash Builder, I decided to create actionscript to 		create the remoteObject instead of MXML reference.</p>
</li>
<li>
<p style="margin-bottom: 0in;">See Sample Code Below</p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;">Value Objects: User.as and 	EventItem</p>
<ul>
<li>
<p style="margin-bottom: 0in;">Note: Great feature in Flash 		Builder 4… you can now create your private variables and create 		you getters and setters via right click, Source, Generate 		Getter/Setter. Very cool.</p>
</li>
<li>
<p style="margin-bottom: 0in;">Make sure that you add metadata 		to map these objects to the corresponding PHP objects.</p>
</li>
<li>
<p style="margin-bottom: 0in;">See Sample Code Below</p>
</li>
</ul>
</li>
</ul>
<div><strong>Code Samples - RemoteObject with handlers</strong></div>
<div>Note: Service call are not show here since they are used through out application</div>
<div>
<div>
<pre class="actionscript3" style="font-family:monospace;">...
&nbsp;
<span style="color: #0033ff; font-weight: bold;">import</span> mx.rpc.remoting.RemoteObject;
<span style="color: #0033ff; font-weight: bold;">import</span> mx.rpc.events.ResultEvent;
<span style="color: #0033ff; font-weight: bold;">import</span> mx.rpc.events.FaultEvent;
<span style="color: #0033ff; font-weight: bold;">import</span> mx.controls.Alert;
&nbsp;
...
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #6699cc; font-weight: bold;">var</span> RESULT<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;result&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #6699cc; font-weight: bold;">var</span> FAULT<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;fault&quot;</span>; 
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _eventList<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Object</span></a>;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _service<span style="color: #000000; font-weight: bold;">:</span>RemoteObject;
&nbsp;
....
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> createRemoteObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	_service = <span style="color: #0033ff; font-weight: bold;">new</span> RemoteObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	_service.endpoint = <span style="color: #990000;">&quot;http://www.themorphicgroup.com/CelebrationEventList/service/gateway.php&quot;</span>;
	_service.<span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;CelebrationEventService&quot;</span>;
	_service.destination = <span style="color: #990000;">&quot;amfphp&quot;</span>; 
&nbsp;
	_service.showBusyCursor=<span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
	_service.getList.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>RESULT, getListResultHandler<span style="color: #000000;">&#41;</span>;
	_service.loginUser.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>RESULT, loginUserResultHandler<span style="color: #000000;">&#41;</span>;
	_service.createUser.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>RESULT, createUserResultHandler<span style="color: #000000;">&#41;</span>;
	_service.signUpForItem.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>RESULT, signUpForItemResultHandler<span style="color: #000000;">&#41;</span>;
&nbsp;
	_service.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>FAULT, faultHandler<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> getListResultHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	_eventList = event.result;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> dataProvider<span style="color: #000000; font-weight: bold;">:</span>ArrayCollection = <span style="color: #0033ff; font-weight: bold;">new</span> ArrayCollection<span style="color: #000000;">&#40;</span>event.result <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#41;</span>;
&nbsp;
	list1.dataProvider = dataProvider;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> loginUserResultHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	_currentUser = event.result <span style="color: #0033ff; font-weight: bold;">as</span> User;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>event.result <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		currentState=<span style="color: #990000;">'List'</span>;
		_service.getList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span><span style="color: #000000;">&#123;</span>
		mx.controls.Alert.<span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Login Failed&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
	inpName.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
	inpEmail.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
	inpPassword.<span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;&quot;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> createUserResultHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>event.result <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> user<span style="color: #000000; font-weight: bold;">:</span>User = User<span style="color: #000000;">&#40;</span>event.result <span style="color: #0033ff; font-weight: bold;">as</span> User<span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span><span style="color: #000000;">&#123;</span>
		mx.controls.Alert.<span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;User Creation Failed&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>user <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		_service.loginUser<span style="color: #000000;">&#40;</span>user.email, user.password<span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span><span style="color: #000000;">&#123;</span>
		mx.controls.Alert.<span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;User Creation Failed&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> signUpForItemResultHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>event.result<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		mx.controls.Alert.<span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Signed up for item&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span><span style="color: #0033ff; font-weight: bold;">else</span><span style="color: #000000;">&#123;</span>
		mx.controls.Alert.<span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Item could not be Signed up&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> faultHandler <span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>FaultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	mx.controls.Alert.<span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Error&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre>
</div>
</div>
<div><strong>Code Sample - User VO</strong></div>
<div>
<div>
<pre class="actionscript3" style="font-family:monospace;">...
<span style="color: #9900cc; font-weight: bold;">package</span> com.themorphicgroup.celebrateEvent
<span style="color: #000000;">&#123;</span>
	<span style="color: #000000;">&#91;</span>RemoteClass<span style="color: #000000;">&#40;</span>alias=<span style="color: #990000;">&quot;com.themorphicgroup.celebrateEvent.User&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> User
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _id<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _fullName<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>;
    	        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _email<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _password<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> User<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> fullName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> _fullName;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> fullName<span style="color: #000000;">&#40;</span>v<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			_fullName = v;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> id<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> _id;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> id<span style="color: #000000;">&#40;</span>v<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			_id = v;
		<span style="color: #000000;">&#125;</span>
&nbsp;
    	        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> email<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>
    	       <span style="color: #000000;">&#123;</span>
    		       <span style="color: #0033ff; font-weight: bold;">return</span> _email;
    	       <span style="color: #000000;">&#125;</span>
&nbsp;
    	       <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> email<span style="color: #000000;">&#40;</span>v<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
    	       <span style="color: #000000;">&#123;</span>
    		      _email = v;
    	       <span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> password<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> _password;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> password<span style="color: #000000;">&#40;</span>v<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			_password = v;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre>
</div>
</div>
<p>You can find the working application here <a href="http://www2.themorphicgroup.com/projects/celebrationEventList/" target="_blank">"CelebrationEvent"</a>. I am still adding more features and fixing some issues but the setup is the same. Check it out.</p>
<p style="margin-bottom: 0in;"><strong>Array to ArrayCollection</strong></p>
<p style="margin-bottom: 0in;">Just something to point out... One question comes to mind when working with AMFPHP and Flex... How to convert arrays in php to  ArrayCollection for Flex/Actionscript? I found the best idea for me was to convert the array within the result call.</p>
<p style="margin-bottom: 0in;" align="left"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;"><span style="color: #6699cc;"><strong>...</strong></span></span></span></p>
<p style="margin-bottom: 0in;" align="left"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;"><span style="color: #6699cc;"><strong>var</strong></span><span style="color: #000000;"> dataProvider:ArrayCollection = </span><span style="color: #0033ff;"><strong>new</strong></span><span style="color: #000000;"> ArrayCollection(event.result </span><span style="color: #0033ff;"><strong>as</strong></span><span style="color: #000000;"> Array);</span></span></span></p>
<p style="margin-bottom: 0in;">…</p>
<p style="margin-bottom: 0in;">For more on this subject check out this blog from <a href="http://wadearnold.com/blog/flash/amfphp/amfphp-arraycollection" target="_blank">Wade Arnald - AMFPHP ArrayCollection</a></p>
<p style="margin-bottom: 0in;"><strong>Conclusion</strong></p>
<p style="margin-bottom: 0in;">I can't praise Adobe enough with the improvement of the debugging process. Now you have a network monitor where you can see the data packet and inspect the request and response. You can set conditional breakpoints ..  Check out this video blog by<a href="http://www.iheartair.com/?p=322" target="_blank"> Jun Heider</a> (thanks Seth)</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">The path from Illustrator file to Flash Catalyst to Flash Builder was pretty straight forward. I did have a few weird moments in Flash Catalyst.</p>
<ul>
<li>
<p style="margin-bottom: 0in;">I don't have Illustrator CS 4. So I 	couldn't edit any text or assets in Flash Catalyst. It would be nice to be 	able to have this functionality but I understand the push 	to most recent version of Adobe products.</p>
</li>
<li>
<p style="margin-bottom: 0in;">In Flash Catalyst, I wanted to change 	every component name to a logical naming convention. That didn't go 	so well. You can select the component in the library but there is no 	preview and no selection on the stage.</p>
</li>
<li>
<p style="margin-bottom: 0in;">Within Flash Catalyst, make sure you copy from the last 	state that you created when creating new states. I made some mistakes in a few tests assuming that I could copy through states. Not a good idea.</p>
</li>
<li>
<p style="margin-bottom: 0in;">The code that is generated when 	you import your Catalyst project to Flash Builder 4 is impressive 	but still bulky. A developer would still have a intense chore to 	wire it up the application properly. And with that … try to use a design pattern 	or established framework with what is given? One big Main class. I'm 	still scratching my head on what to do on that issue.</p>
</li>
</ul>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">With all these criticisms I do understand that this is beta software... I will say that Flash Catalyst is a great tool to start putting the pieces together. In fact, I don't think I could start a Flex 4 (with Spark component) project without Flash Catalyst at the start. I have a lot of hope in the evolution of the Flash Platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themorphicgroup.com/blog/2009/06/25/a-chat-about-php-with-flash-builder-4-and-adobe-catalyst/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
