<?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>php&#124;architect - The site for PHP professionals &#187; adobe</title>
	<atom:link href="http://www.phparch.com/tag/adobe/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phparch.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Fri, 10 Feb 2012 15:11:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mobile Development with PHP</title>
		<link>http://www.phparch.com/2011/04/mobile-development-with-php/</link>
		<comments>http://www.phparch.com/2011/04/mobile-development-with-php/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 17:55:08 +0000</pubDate>
		<dc:creator>Beth Tucker Long</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Studio]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=6734</guid>
		<description><![CDATA[Adobe Flash Builder 4.5</a> will soon be available (release is currently scheduled for early May) to the PHP development community. Version 4.5, though, is not just the latest version of Flash Builder, it is the beginning of a partnership between Zend and Adobe. Flash Builder 4.5 is under the Adobe umbrella, but will come with Zend Studio 8 bundled in and will have the full backing of Zend. You will now be able to create mobile applications using the Adobe Flash platform and PHP in one integrated application. Both Flash Builder and Zend Studio have been built on the Eclipse platform, so you will be able to build Flex and PHP side-by-side.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.phparch.com/wp-content/uploads/2011/04/AdobeZend1.gif"><img src="http://www.phparch.com/wp-content/uploads/2011/04/AdobeZend1.gif" alt="Adobe and Zend" title="adobezend" width="155" height="90" class="alignleft size-full wp-image-6746" /></a><a href="http://www.adobe.com/products/flash-builder_php.html">Adobe Flash Builder 4.5</a> will soon be available (release is currently scheduled for early May) to the PHP development community. Version 4.5, though, is not just the latest version of Flash Builder, it is the beginning of a partnership between Zend and Adobe. Flash Builder 4.5 is under the Adobe umbrella, but will come with Zend Studio 8 bundled in and will have <a href="http://www.zend.com/en/products/studio/flash-builder-for-php/">the full backing of Zend</a>. You will now be able to create mobile applications using the Adobe Flash platform and PHP in one integrated application. Both Flash Builder and Zend Studio have been built on the Eclipse platform, so you will be able to build Flex and PHP side-by-side.</p>
<p>So what&#8217;s so great about that? According to Andi Gutmans of Zend, having the two programs bundled together will provide a seamless experience end-to-end, creating apps deployable to Android devices with support for iOS and Blackberry devices shipping within 60 days. Even though this is not a pure &#8220;write-once-deploy-everywhere&#8221;, this will save considerable time and resources. Instead of three completely separate apps for the three separate platforms, you will be able to use one code base within Flash Builder to deploy natively to all three mobile platforms and the web. Dave Gruber of Adobe estimates there will be upwards of 70% code reuse across all platforms (mobile and web).</p>
<p>And the best news beyond that is integrated debugging. Flash Builder 4.5 will be able to handle debugging for all your platforms &#8211; desktop, IDE, server-side PHP and device &#8211; all in one session. </p>
<p>Everything described above will be available for Windows (XP SP3 or higher) and Mac OS (OSX v10.6 or higher). See the Adobe website for <a href="http://www.adobe.com/products/flash-builder_php/tech-specs.html">the full list of requirements</a>. The  Standard version of Flash Builder 4.5 will cost $399 USD. There will also be a Premium version for $799 USD which will also include memory and performance profilers, a network monitor, and a unit testing harness to connect to major unit testing frameworks. Both the Standard and Premium versions will be available for sale through either Adobe or Zend. There are company-specific upgrades available as well. If you already have Flash Builder, upgrades are available for both versions for $299 USD through <a href="http://www.adobe.com/products/flash-builder_php/buying-guide.html">Adobe&#8217;s website</a>. Current Zend Studio users can <a href="https://www.zend.com/en/contact/sales">contact the Zend Sales team</a> to receive discounted pricing on upgrading to Flash Builder. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2011/04/mobile-development-with-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How I learned to stop worrying and love the wizard &#8211; Part 3</title>
		<link>http://www.phparch.com/2010/06/how-i-learned-to-stop-worrying-and-love-the-wizard-%e2%80%93-part-3/</link>
		<comments>http://www.phparch.com/2010/06/how-i-learned-to-stop-worrying-and-love-the-wizard-%e2%80%93-part-3/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 13:00:40 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[data connection wizard]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5386</guid>
		<description><![CDATA[In part 1, we discussed how to use the new Flash Builder 4 Data Connection Wizard to connect to a PHP API. We used FB4&#8242;s prototyping feature to build a simple class that allows us to read/write users from a WordPress user list. In part 2, we discussed how to use that data connection to [...]]]></description>
			<content:encoded><![CDATA[<p>In part 1, we discussed how to use the new Flash Builder 4 Data Connection Wizard to connect to a PHP API. We used FB4&#8242;s prototyping feature to build a simple class that allows us to read/write users from a WordPress user list. In part 2, we discussed how to use that data connection to ease building data-centric applications. For both of these however, we used the simple prototype class that we generated. It is also possible to use your own code to do the same thing as long as you understand what needs to be there. In this, part 3, we will write a simple class and use it with the Data Connection Wizard.</p>
<h2>Before all else, write the code</h2>
<p>To keep this simple, I will follow the same rules as before, I will not attempt to add or delete users, just list them and then allow them to be edited. We will call our class <code>WPUser</code>.</p>
<p>As before, for Flex to be able to inspect it, it has to be within the webroot of your project.</p>
<pre lang="php" line="1">
class WPUser
{

    protected $db;

    /**
     * @return void
     */
    public function __construct()
    {
        $this-&gt;db = mysqli_connect('localhost','root','','wpmu');
        return;
    }
</pre>
<p>When we create the class, let&#8217;s go ahead and create a connection to the database. Let me make a couple of notes here for those who might be concerned by that line. First, this code is running on my local machine against my test database. So yes, root is the user I use and there is no password on it. This is not a best practice. Please don&#8217;t copy and paste that code and just add your root password.</p>
<p>Second, if I were building a real application, I would use dependency injection to had my model a connection to the persistent data store. However, this is  simple example so I am taking a few liberties. Again, please don&#8217;t copy this code verbatim and use it.</p>
<pre lang="php" line="1">
    /**
     * @return array
     */
    public function listUsers()
    {
        $stmt = mysqli_prepare($this-&gt;db, "SELECT * FROM wp_users");

        mysqli_stmt_execute($stmt);

        $rows = array();

        mysqli_stmt_bind_result($stmt, $row-&gt;ID, $row-&gt;user_login, $row-&gt;user_pass, $row-&gt;user_nicename, $row-&gt;user_email, $row-&gt;user_url, $row-&gt;user_registered, $row-&gt;user_activation_key, $row-&gt;user_status, $row-&gt;display_name, $row-&gt;spam, $row-&gt;deleted);

        while (mysqli_stmt_fetch($stmt)) {
            $row-&gt;user_registered = new DateTime($row-&gt;user_registered);
            $rows[] = $row;
            $row = new stdClass();
            mysqli_stmt_bind_result($stmt, $row-&gt;ID, $row-&gt;user_login, $row-&gt;user_pass, $row-&gt;user_nicename, $row-&gt;user_email, $row-&gt;user_url, $row-&gt;user_registered, $row-&gt;user_activation_key, $row-&gt;user_status, $row-&gt;display_name, $row-&gt;spam, $row-&gt;deleted);
        }

        mysqli_stmt_free_result($stmt);
        mysqli_close($this-&gt;db);

        return $rows;
    }
</pre>
<p>Ok, our <code>listUsers()</code> function is next. If you are paying attention, you will notice that it looks a lot like the one in the prototype class that FB4 generated. That is because it is good example code so why re-write it? The important thing to note here is the docBlock comment at the top. FB4 doesn&#8217;t actually know anything about PHP code. Instead, it relies on the docBloc comments to figure out parameters and return types.</p>
<p>To show the results of incorrect settings in a docBlock, I&#8217;ve changed the return value to string for <code>listUsers()</code></p>
<pre lang="php" line="1">
    /**
     * @return array
     */
    public function listUsers()
</pre>
<p>Now, trying to attach our data grid to our new WPUser class will show this error:<br />
<a href="http://beta.phparch.com/wp-content/uploads/2010/05/figure_15.png"><img src="http://www.phparch.com/files/2010/05/figure_15-300x258.png" alt="" title="figure_15" width="300" height="258" class="alignnone size-medium wp-image-5389" /></a></p>
<p>You can see that the return type for listUsers() is now reported as String even though I&#8217;ve not actually changed the code. Since string is not an acceptable return type for a DataGrid to process.  So make sure the docBolcs are not only correct, make sure that the return value you are specifying is valid for the intended use.</p>
<p>Now, let&#8217;s look at the code for <code>fetchUser()</code>. This method shows us how to specify a parameter sot ha FB4 can pick it up.</p>
<pre lang="php" line="1">
    /**
     * @param int $id
     * @return array
     */
    public function fetchUser($id)
    {
        $stmt = mysqli_prepare($this-&gt;db, "SELECT * FROM $this-&gt;tablename where ID=?");
        mysqli_stmt_bind_param($stmt, 'i', $id);
        mysqli_stmt_execute($stmt);
        mysqli_stmt_bind_result($stmt, $row-&gt;ID, $row-&gt;user_login, $row-&gt;user_pass, $row-&gt;user_nicename, $row-&gt;user_email, $row-&gt;user_url, $row-&gt;user_registered, $row-&gt;user_activation_key, $row-&gt;user_status, $row-&gt;display_name, $row-&gt;spam, $row-&gt;deleted);

        if(mysqli_stmt_fetch($stmt)) {
            $row-&gt;user_registered = new DateTime($row-&gt;user_registered);
            mysqli_close($this-&gt;db);
            return $row;
        } else {
            mysqli_close($this-&gt;db);
            return null;
        }
    }
</pre>
<p>Again, making sure you get these correct is the secret to making sure the docBlocs are correct.</p>
<p>Rounding out our <code>WPUser</code> class is the <code>update()</code> method. This takes as a parameter a <code>stdClass</code>. Behind the scenes, FB4 is using Zend_Amf (Remember when we installed Zend Framework?) to communicate with PHP using the <a href="http://en.wikipedia.org/wiki/Action_Message_Format">Action Message Format</a>. This allows it to serialize classes in FB4 pass them to PHP and unserialize them.</p>
<pre lang="php" line="1">
    /**
     * Updates the passed item in the table.
     *
     * Add authorization or any logical checks for secure access to your data
     *
     * @param stdClass $item
     * @return void
     */
    public function update($item) {
	$stmt = mysqli_prepare($this-&gt;db, "UPDATE $this-&gt;tablename SET user_login=?, user_pass=?, user_nicename=?, user_email=?, user_url=?, user_registered=?, user_activation_key=?, user_status=?, display_name=?, spam=?, deleted=? WHERE ID=?");
	throw new Exception(mysqli_errno($link), mysqli_error($this-&gt;db));

	mysqli_stmt_bind_param($stmt, 'sssssssisiii', $item-&gt;user_login, $item-&gt;user_pass, $item-&gt;user_nicename, $item-&gt;user_email, $item-&gt;user_url, $item-&gt;user_registered-&gt;toString('YYYY-MM-dd HH:mm:ss'), $item-&gt;user_activation_key, $item-&gt;user_status, $item-&gt;display_name, $item-&gt;spam, $item-&gt;deleted, $item-&gt;ID);
	throw new Exception(mysqli_errno($link), mysqli_error($this-&gt;db));

	mysqli_stmt_execute($stmt);
	throw new Exception(mysqli_errno($link), mysqli_error($this-&gt;db));

	mysqli_stmt_free_result($stmt);
	mysqli_close($this-&gt;db);
	return;
    }

}
</pre>
<h2>Changing out Data Connections</h2>
<p>Now that we&#8217;ve created a class that we can hook a Data Connection to, let&#8217;s setup our application to use the new one instead of the old one. Follow the instructions in part 1 of the article with one exception. Do not have it generate a sample class. Instead, click the Browse button and find the WPUser.php you just created. Once you do, the wizard should look something like this:<br />
<a href="http://beta.phparch.com/wp-content/uploads/2010/05/figure_18.png"><img src="http://www.phparch.com/files/2010/05/figure_18-294x300.png" alt="" title="figure_18" width="294" height="300" class="alignnone size-medium wp-image-5395" /></a></p>
<p>If everything looks correct, go ahead and press Finish and you will see the new Data Service in the Data Services panel.</p>
<p>To make it the data service for your Data Grid, click on the grid. A small icon will appear in the upper left corner like this:<br />
<a href="http://beta.phparch.com/wp-content/uploads/2010/05/figure_17.png"><img src="http://www.phparch.com/files/2010/05/figure_17-300x263.png" alt="" title="figure_17" width="300" height="263" class="alignnone size-medium wp-image-5397" /></a></p>
<p>Clicking on that icon will bring up a dialog that will allow you to select WPUser service. Once you do that it will need to test the call and gather information on the return value.  Clicking on the &#8220;Change return type&#8230;&#8221; link (as highlighted below) will bring up a dialog that will walk you through the two steps for automatically discovering and setting the return type.<br />
<a href="http://beta.phparch.com/wp-content/uploads/2010/05/figure_19.png"><img src="http://www.phparch.com/files/2010/05/figure_19-300x258.png" alt="" title="figure_19" width="300" height="258" class="alignnone size-medium wp-image-5398" /></a></p>
<p>Once you&#8217;ve done that, your data grid will now be using the <code>WPUser</code> data service instead of the original <code>Wpusersservice</code> service.</p>
<h2>Wrapping it up</h2>
<p>I&#8217;ve attempted to give you a taste for the different things that the Data Connection Wizard can do for you when working with PHP files. In the right hands, it is a powerful tool and can save developers time and headaches. However, there are some limitations you have to be able to work with to use it.</p>
<p>The main one, as I&#8217;ve pointed out and discussed in previous articles, is that all of your PHP code has to be accessible in your web root. FB4 will attempt to explore your code to analyze it but it does so by opening each file and reading it as opposed to using PHP&#8217;s native reflection methods to gather this info. This isn&#8217;t a problem as long as you realize it.</p>
<p>In a future article we will examine the alternative to using the PHP Data Connection Wizard, the HTTP Data Connection Wizard.</p>
<p>&#8230;and yes, I still dislike Harry Potter. Not as a person mind you. Wizards in real life as well as in fiction tend to annoy me. I don&#8217;t like magic when it comes to my code, I want to see what is going on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/06/how-i-learned-to-stop-worrying-and-love-the-wizard-%e2%80%93-part-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Callbacks in ActionScript</title>
		<link>http://www.phparch.com/2010/06/callbacks-in-actionscript/</link>
		<comments>http://www.phparch.com/2010/06/callbacks-in-actionscript/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 11:00:34 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[callbacks]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5478</guid>
		<description><![CDATA[What do you do when component A needs to update itself only after component B completes an asynchronous task. In Flex, it is pretty easy to solve this problem using a simple concept called Callbacks.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/05/Flash_Builder-42.png"><img src="http://www.phparch.com/files/2010/05/Flash_Builder-42-150x150.png" alt="" title="Flash_Builder 4" width="150" height="150" class="alignleft size-thumbnail wp-image-5490" /></a>This post is going to be long on code. That means that I will spinkle  little text between the code blocks to explain what I am doing but the bulk of the post will be code for you to copy, paste and mangle as you see fit. If you don&#8217;t want to copy and paste everything, here is the project in an archive for you to play with. <a href='http://beta.phparch.com/wp-content/uploads/2010/05/twallpaper.zip'>twallpaper</a> (NOTE: This project, while it compiles, is incomplete. Stay tuned for future updates.)</p>
<h2>Callbacks rock in ActionScript</h2>
<p>I am the first to admit that I am still trying to get my head around the concepts behind event driven programs. I&#8217;ve been knee deep in web for so long that a lot of these concepts are still not coming to me. One of the problems I am facing is how to different components, that know nothing of each other, talk to each other? Also, with asynchronous tasks taking place, how does component A know that component B has completed it&#8217;s task. The answer to both of those questions is &#8216;callbacks&#8217;.</p>
<p>In PHP we use the Observer pattern in cases to solve problems. Callbacks are an implementation of the Observer pattern in that one component tell another component, &#8220;tell me when you are done&#8221; or &#8220;tell me when something changes&#8221;.</p>
<h2>My current project</h2>
<p>I want to write an AIR program that looks at the twitter stream, searches for images, (I&#8217;ll use <a href="http://yfrog.com/">yfrog</a> but you can easily add <a href="http://twitpic.com/">twitpic</a> or any others) caches them locally and then puts them up on the screen with a nice little animation. What I have right now is a very ugly application that fetches the last 20 tweets that mention yfrog.com. The point of this milestone was to show that I could separate the logic into classes and have the classes talk to each other.</p>
<h2>TweetFetch</h2>
<p>Ok, here comes the first batch of code. This is the main class that talks to twitter. It is in no way a complete twitter API wrapper for ActionScript. It simply calls the search, stores the results and processes callbacks.</p>
<pre lang="actionscript" line="1">
package com.calevans
{
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.http.HTTPService;
	import mx.controls.Alert;
	import mx.collections.ArrayCollection;

/*
 * Fetchs all the images in the current timeline.
 */

	public class TweetFetch
	{
		protected var _service:HTTPService;
		protected var _data:ArrayCollection;
		protected var _responseCallbacks:Array;
		protected var _faultCallbacks:Array;

		public function TweetFetch()
		{
			trace('TweetFetch');
			this._service = new HTTPService();
			this._responseCallbacks = new Array();
			this._faultCallbacks = new Array();
			this._service.url = 'http://search.twitter.com/search.atom';
			this._service.addEventListener(ResultEvent.RESULT, response );
			this._service.addEventListener(FaultEvent.FAULT, fault );
			this._service.showBusyCursor=true;
		} // public function TweetFetch()

		public function fetch(query:String):void
		{
			trace('TweetFetch::fetch');
			var params:Object = new Object();
			params['q'] = query;
			this._service.send(params);
			return;
		} // public function fetch(query:String)

		public function response(response:Object):void
		{
			trace('TweetFetch::response');
			this._data=response.result.feed.entry;
			if (this._responseCallbacks.length&gt;0) {
				for (var i:int=0;i0) {
				for (var i:int=0;i&lt;this._faultCallbacks.length;i++) {
					this._faultCallbacks[i](e);
				}
			} else {
				Alert.show(e.toString());
			}
		} // public function myfault(e:FaultEvent):void

		public function registerResponseCallback(f:Function):void
		{
			trace(&quot;TweetFetch::registerResponseCallback&quot;);
			this._responseCallbacks[this._responseCallbacks.length] = f;
			return;
		} // public function registerResponseCallback(f:Function):void

		public function registerFaultCallback(f:Function):void
		{
			trace(&quot;TweetFetch::registerFaultCallback&quot;);
			this._faultCallbacks[this._faultCallbacks.length] = f;
			return;
		} // public function registerFaultCallback(f:Function):void

	} // public class TweetFetch

} // package com.calevans
</pre>
<p>One of the first things I hope you notice is all the trace() calls. Because we are dealing with events and async processes, I find it easier to understand what is going on if I put a trace at the beginning of each method. That way I can actually see the order of execution.</p>
<p>The code above works. It worked about 5 minutes after I wrote it (I did have a couple of errors working with the API) but I didn&#8217;t understand how to hook it back into the main application. That is when I started reading up on callbacks.</p>
<h2>Functions are objects&#8230;just like everything else</h2>
<p>One <strong>big</strong> difference between PHP and ActionScript (and I beleive JavaScript) is that functions are objects in ActionScript. This means that I can pass a function as a parameter. I&#8217;ve not investigated deeply but I beleive these are passed by reference and not by value. Therefore, I can not only pass a function in as a parameter of another function, I can store that function reference, pass it around and even call it. That, in my book, is pretty dang cool. (I am easily amused)</p>
<p>You will see in the cod above a function <code>registerResponseCallback()</code> (and it&#8217;s conunterpart <code>registerFaultCallback()</code>) As the name says, this is were you tell TweetFetch what to do once it has successfully fetched and stored the tweets. I will show the full twallpaper.mxml later, for now, here is the snippet form it where I actually register a callback.</p>
<pre lang="actionscript">
tweetFetch.registerResponseCallback(processNewTweets);
</pre>
<p>It is that easy, well almost. There are a couple of things you need to know. First, obviously <code>processNewTweets()</code> needs to exist. Second, it need to accept the proper parameters. In this case, when the callbacks are processed, they will each be called, passing in an ArrayCollection so <code>processNewTweets()</code> has to accept a single parameter of an ArrayCollection.</p>
<p><code>fetch()</code> at line 32, is the main function of this method. Calling hat with a query will set things into motion. It makes the call to the <code>HTTPService</code>. When <code>HTTPService</code> returns successfully, it fires <code>result()</code>. <code>result()</code> stores a subset of the result that comes back from twitter and then looks to see if there are any registered callbacks. If there are, it calls them with this line:</p>
<pre>
this._responseCallbacks[i](this._data);
</pre>
<p><code>this._responseCallbacks[i]</code> this contains the pointer to the function.  <code>(this._data)</code> This is the parameter list to pass in. This is what I meant about callbacks being cool, it is that easy.</p>
<h2>Do the deed</h2>
<p>Ok, you understand the code, you see now how to create a callback that TweetFetch can fire so that the interface can be updated as things happen. Here now, is the main twallpaper.mxml so you can see how I put it all together.</p>
<pre lang="actionscript" line="1">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
					   xmlns:s="library://ns.adobe.com/flex/spark"
					   xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init(event)"&gt;
	&lt;fx:Declarations&gt;
		&lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;

	&lt;/fx:Declarations&gt;
&lt;fx:Script&gt;
	&lt;![CDATA[
		import com.calevans.TweetFetch;
		import mx.events.FlexEvent;
		import mx.collections.ArrayCollection;
		import mx.rpc.events.FaultEvent;
		import mx.controls.Alert;

		public var tweetFetch:TweetFetch = new TweetFetch();

		protected function init(event:FlexEvent):void
		{
			trace('init');
			tweetFetch.registerResponseCallback(processNewTweets);
			tweetFetch.registerFaultCallback(oops);
		}

		public function mainButtonClick():void
		{
			trace('mainButtonClick');
			tweetFetch.fetch('yfrog.com');
		}

		protected function oops(e:FaultEvent):void
		{
			trace('oops');
			Alert.show(e.toString());
			return;
		}
		protected function processNewTweets(data:ArrayCollection):void
		{
			trace('processNewTweets');
			for(var i:int=0;i
&lt;/fx:Script&gt;
	&lt;s:Button x="251" y="83" label="Button" click="mainButtonClick()" /&gt;
	&lt;s:TextArea id="myTextArea" x="0" y="125" width="573" height="490"/&gt;
&lt;/s:WindowedApplication&gt;
</pre>
<p>I have said it before but I will reiterate it this is prototype code. The current interface is only to show that <code>TweetFetch</code> is working. So yes, it&#8217;s ugly. It does show that the underlying code is working however and it shows a very simple example of callbacks.</p>
<p>One note, I have implemented callbacks for faults as well. Just to show that they are working, I added the function <code>oops()</code> that simply pops an alert box, the same behavior that happens if there is no registered callback. This is just to show the functionality, neither <code>oops()</code>, nor the Alert box will survive into the final code.</p>
<h2>Wrapping it up</h2>
<p>The problem I had in this particular instance was, how do you update the interface when an async task in an object completes. In my previous examples, all my code was in the main mxml for ease of understanding but as I began to move things out into classes and began to normalize my application, I found new problems presenting themselves. Events, which I will talk about in another post, and callbacks make solving those problems very easy. As this starts to sink into to my web-soaked brain, things start to make sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/06/callbacks-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Learning to be Flexible</title>
		<link>http://www.phparch.com/2010/05/learning-to-be-flexible/</link>
		<comments>http://www.phparch.com/2010/05/learning-to-be-flexible/#comments</comments>
		<pubDate>Tue, 25 May 2010 13:59:43 +0000</pubDate>
		<dc:creator>Keith Casey</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=4832</guid>
		<description><![CDATA[Last year in the thick of web2project development, we realized something obvious: The vast majority of people don't need the full system, they just need a way to see their just their information in a useful way. Towards that goal, we started shopping around for options to simplify and an Adobe AIR app quickly became a leading candidate. Fast forward a few months and I finally had the time to try out Flash Builder 4.]]></description>
			<content:encoded><![CDATA[<p>Last year in the thick of <a href="http://web2project.net/">web2project</a> development, we realized something obvious: The vast majority of people don&#8217;t need the full system, they just need a way to see their information &#8211; <em>and just their information</em> &#8211; in a useful way. Towards that goal, we started shopping around for options to simplify and an Adobe AIR app quickly became a leading candidate. Fast forward a few months and I finally had the time to try out Flash Builder 4.</p>
<p><em>For context: Prior to starting this exercise, I had zero experience in Flash, Flex, and everything similar. I&#8217;ve caught a few of Ed Finkler&#8217;s presentations on RIA but I&#8217;m definitely not a desktop developer.</em></p>
<p><a title="Flash Builder New Project Wizard" href="http://beta.phparch.com/wp-content/uploads/2010/05/Starting.png" target="_blank"><img class="alignleft size-full wp-image-5435" title="Flash Builder New Project Wizard" src="http://beta.phparch.com/wp-content/uploads/2010/05/Starting-thumb.png" alt="Flash Builder New Project Wizard" width="240" height="256" /></a>First, getting setup was ridiculously easy. I downloaded the <a title="Adobe Flex Builder 4" href="http://www.adobe.com/products/flex">60 day trial of Flash Builder 4</a> and registered to get a full license as a user group member. After a quick activation, I was setup on Windows 7 in a matter of minutes. Of course, that&#8217;s where the first oddity creeps in. I&#8217;ve used Eclipse for 7 years on both Windows XP and Ubuntu but Flash Builder 4 only works on Windows. It seems like they&#8217;re missing one of the best parts of Eclipse as a platform. Regardless, getting started on my first project was identical to starting any Eclipse project.</p>
<p>Next, I had to choose where to start. Since we use iCal for broadcasting Task/Todo information, it was the obvious and easiest place to start. I envisioned a simple list of tasks, a textarea to add a comment, and finally a timer to create a complete tasklog. To do this one, I switched into Design Mode and browsed the components. If you&#8217;ve ever worked in a visual editor &#8211; such as Dreamweaver or with Visual Basic &#8211; the options and configuration is pretty much what you&#8217;d expect. You get standard components such as TextArea and DateChooser that you&#8217;d expect, but you also get a ProgressBar, ColorPicker, and RichEditableText box. While I won&#8217;t use them this time around, it opens some options for later.</p>
<p>Of course, this is where I learned a useful little trick. Unlike PHP where you might echo (or print_r) your value, Flex doesn&#8217;t work the same way. You can&#8217;t just tell it to echo things without errors and other things appearing. Therefore, I added a TextArea named txtJunk and added this:</p>
<blockquote><p>txtJunk.text += &#8220;my debug message \n&#8221;;</p></blockquote>
<p>where I wanted to know what was happening. There are certainly more advanced and efficient ways of debugging but we&#8217;ll cover that another time.</p>
<p><img class="alignleft size-full wp-image-5437" title="Data Connection Wizard" src="http://beta.phparch.com/wp-content/uploads/2010/05/DCW.png" alt="Data Connection Wizard" width="257" height="298" />Next, before I can log any time against a Task, I need to get the list of Tasks. The Data Connection Wizard &#8211; <a title="How I learned to stop worrying and love the wizard – Part 2 " href="http://www.phparch.com/2010/05/11/how-i-learned-to-stop-worrying-and-love-the-wizard-part-2/"><em>covered in depth by Cal</em></a> &#8211; seemed like the best place to start. I started up the Wizard, selected HTTPService, configured the URL, and everything worked beautifully and everyone lived happily ever after.</p>
<p><em>No wait, it didn&#8217;t.</em></p>
<p>If you look closely at the HTTPService in the Wizard, you&#8217;ll see that it&#8217;s specifically for XML or JSON. Since <a title="iCalendar Definition" href="http://en.wikipedia.org/wiki/ICalendar">iCal</a> is a glorified text file, it doesn&#8217;t fit into either of these and it failed spectacularly. On the positive side, since the Wizard immediately attempts to validate the data returned, I found out pretty quickly. After a few failed trials to do some form of useful validation, I realized the solution was much simpler than I thought. By setting String as the return type, the DCW allows for literally anything to come back. While this worked, I should obviously look into some JSON or XML structure to take advantage of the validation.</p>
<p>Next, I had to do something with this long iCal string. For this, I dropped out of Design Mode and went directly to the source. At first glance the source looked a little odd compared to PHP. The syntax itself is OO and the naming is consistent and mostly predictable, but it&#8217;s the little things that make all the difference. ActionScript is strongly typed so at initialization you have to declare a variable&#8217;s datatype. At first pass, this seemed excessive and a little annoying to have to match return types, but there is a huge benefit gained as a result: code completion. And this is one of the places Flex Builder shines. Not only does it have the functions themselves but it includes some basic documentation, the return types, and related details that you&#8217;d expect. I had forgotten how helpful code completion is when you&#8217;re not familiar with the language.</p>
<p>From here, it became a simple matter of parsing the big string into a series of smaller strings. First, I split it into individual event listings, then into the individual lines of information for each event. Coming from a PHP background, it was ridiculously simple. Granted, some of the syntax and specific method names were a little obtuse at first, but code completion got me 95% of the way with almost no effort.</p>
<p><a href="http://beta.phparch.com/wp-content/uploads/2010/05/event-handler1.png"><img class="alignright size-full wp-image-5438" title="Generating an Event Handler" src="http://beta.phparch.com/wp-content/uploads/2010/05/event-handler1.png" alt="Generating an Event Handler" width="285" height="288" /></a>Finally, I had to wire the whole thing together and this is another place where Flex development is completely different than PHP development. Flex doesn&#8217;t use the request/response model unless it&#8217;s interacting with external sites or services. Instead, Flex &#8211; like all desktop development &#8211; is <a href="http://en.wikipedia.org/wiki/Event-driven_programming">event-driven</a>.</p>
<p>It&#8217;s a shift to wrap your mind around writing code triggered from and waiting for events as opposed to responding to requests. Even more odd was the sense that I had lost control over the flow of the application. In PHP development, the code executes from top to bottom, so it&#8217;s easy to know what has executed previously and what will happen next. In Event-driven Programming, the Events can happen independent of one another. For example, you can type (an event) in your browser&#8217;s address bar even while a site is loading (another event). These events come from all over the place, whether its from a user (typing or selecting an element), a Response from a previous Request, a notification from another Event, or a variety of other things. Therefore, your components have to execute (or fire) independent of one another.</p>
<p>That said, the visual editor handles the basics for you. In Design Mode, right-click on any element and you can interact with the relevant handlers for things like creationComplete, click, change, and a select. If you&#8217;re familiar with Javascript development, you&#8217;ll notice there parallel with onLoad, onClick, onChange, and similar events.</p>
<p>At present, this code doesn&#8217;t do much of value but the next phases will be more interesting and complex. I have to work through what to cache locally and since assigned tasks change frequently, it has to be checked frequently. More importantly, for this client to be useful, it should be able to work offline and not require connectivity immediately at startup. Therefore, we&#8217;ll need persistent storage like SQLite and a way to synchronize with the central server.</p>
<p>If you&#8217;d like to follow the continuing adventures, the entire source will be available here: <a href="http://github.com/caseysoftware/web2project-air">http://github.com/caseysoftware/web2project-air</a> and I&#8217;ll continue documenting the progress in this space.</p>
<p><em><strong>Disclosure:</strong> Through Blue Parabola, LLC, I&#8217;m working with Adobe and a number of their tools and technologies to see what I might be able to use where. I&#8217;m under no obligation to be positive or negative with respect to any particular product or person.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/05/learning-to-be-flexible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Builder 4 training for PHP developers</title>
		<link>http://www.phparch.com/2010/05/flash-builder-4-training-for-php-developers/</link>
		<comments>http://www.phparch.com/2010/05/flash-builder-4-training-for-php-developers/#comments</comments>
		<pubDate>Mon, 10 May 2010 21:13:06 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5353</guid>
		<description><![CDATA[Adobe is hosting a series of training classes for PHP developers looking to get into Flash Builder. If you want to learn more about Flash Builder 4 and Flex, click on inside and we'll give you the details.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/05/Flash_Builder-4.png"><img src="http://www.phparch.com/files/2010/05/Flash_Builder-4-150x150.png" alt="" title="Flash_Builder 4" width="150" height="150" class="alignleft size-thumbnail wp-image-5354" /></a>Hey, our buddies over at Adobe have a series of training classes for PHP developers looking to get into Flash Builder. If you are in Los Angeles, CA , New York, NY, or Atlanta GA, this is your opportunity to get a deeper understanding of this great tool as well as help add a new skill to your resume.</p>
<blockquote><p>The one day training course is available in the cities below.  The registration fee includes over 7 hours of training within a small group (so you get the attention that you need), hands on labs and a printed courseware book that you can take back to work for reference later. Lunch will be provided at the training facility along with beverages and morning and afternoon snack.</p></blockquote>
<p>For more information and to register, click on over to the <a href="https://registration.mclabs.com/adobe/">Adobe Developer Connection</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/05/flash-builder-4-training-for-php-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meet Ryan Stewart</title>
		<link>http://www.phparch.com/2010/05/meet-ryan-stewart/</link>
		<comments>http://www.phparch.com/2010/05/meet-ryan-stewart/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:48:46 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[podcast]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[ryan stewart]]></category>
		<category><![CDATA[tekx]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5245</guid>
		<description><![CDATA[Ryan Stewart of Adobe talks with us about who he is and what he does at Adobe.]]></description>
			<content:encoded><![CDATA[<p>Ryan Stewart of Adobe talks with us about who he is and what he does at Adobe. Along the way we mention his talk&#8230;and of course&#8230;beer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/05/meet-ryan-stewart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://mtadata.s3.amazonaws.com/podcasts/20100503_ryan_stweart.mp3" length="6687809" type="audio/mpeg" />
		</item>
		<item>
		<title>How I learned to stop worrying and start loving the wizard &#8211; Part 1</title>
		<link>http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/</link>
		<comments>http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 21:28:02 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[amf]]></category>
		<category><![CDATA[data connection wizard]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=4934</guid>
		<description><![CDATA[Adobe's new Flash Builder 4 comes with a shiny new wizard-driven data access interface. How does it measure up to the “old-school” way of interfacing to remote APIs? Our own Cal Evans investigates.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/04/Flash_Builder-4.png"><img class="alignleft size-thumbnail wp-image-5056" title="Flash_Builder 4" src="http://www.phparch.com/files/2010/04/Flash_Builder-4-150x150.png" alt="" width="150" height="150" /></a>I hate wizards. No, not the Harry Potter kind (although, I will confess I don&#8217;t like that kind very much either), but I hate wizards that pretend to help programmers do things. More often than not, they end up either getting in the way or hiding some magic that I need to know about. This isn&#8217;t really a problem when working with PHP, since most of the code I write in PHP is back end code and doesn&#8217;t require a UI per se. That being the case, wizards aren&#8217;t a normal part of my life. (For the record, the closest I come to using a wizard regularly is Zend_Tool but even then, I know enough about the magic going on to write my own providers, so it&#8217;s not a wizard as much as it&#8217;s just a convenience.</p>
<p>However, of late I have been working with Flex Builder 3 and now <a href="http://www.adobe.com/products/flashbuilder/">Flash Builder 4</a> (FB4). While wizards for programming might not be the norm for PHP developers, Flash and Flex developers apparently do like them. To be honest, after working with FB4 now for a few weeks, I am starting to see that wizards aren&#8217;t all bad—in fact, some of them are even kind of cool. In this two-part post, I want to talk about connecting Flex applications to server-side PHP APIs using the Data Services wizard that ships as part of FB4.</p>
<h1>The Old Way</h1>
<p>First, let me say that, as nice as the new Data Services are, I worked with Flex Builder 3 and really liked the old way of connecting to data services. The HTTPService object was super flexible and very simple to use—in fact, when I first started working on the code for this series, it was my intention to prove that the new way was inferior to the old way. It&#8217;s funny how technology can surprise you sometimes.</p>
<p>In Flex Builder 3, the way you connected to an API (XML or JSON usually) was to use something like this:</p>
<pre lang="javascript">&lt;s:HTTPService id="twitter"
               showBusyCursor="true"
               fault="showFault(event)"
               result="doSomething(event);"
               url="http://example.com/myapi" /&gt;</pre>
<p>See, that is easy. There is no behind the scenes magic: like PHP, I can get what I need done, done and move on to the next task. I&#8217;ve built several AIR and AIR2 applications using HTTPService as my multi-tool for connecting to the outside world because it is just so easy to work with; I like simple tools and HTPService was as about as simple as it got. This is why I was nonplussed when Adobe added “Data Services” to Flash Builder 4.</p>
<h1>The New Way</h1>
<p>When you first create an FB4 Application, you will immediately notice a difference from Flex Builder 3, the “Declarations” section of the code</p>
<pre lang="javascript">&lt;fx:Declarations&gt;
&lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
&lt;/fx:Declarations&gt;</pre>
<p>FB4 now divides your declarations from your visual elements. That is the first thing you have to get used to. It is still easy to hand code an HTTPSerivce—you just have to put it in the new &lt;fx:Declarations&gt; section.</p>
<p>This is still my favorite method for connecting to third party web services like Twitter&#8217;s API (the Hello World of Web 2.0). Fetching data like this is dead simple, but, if you want to get into more complex operations like updates and deletions, you inevitably end up writing code by hand. Depending on the API you are talking to, this can quickly become tedious and, if you are a good OO programmer, it will most likely mean encapsulating all of this in its own class. If that sounds familiar, the new Data Services option is going to save you a lot of time and hand coding.</p>
<div id="attachment_4944" class="wp-caption alignnone" style="width: 310px"><a href="http://beta.phparch.com/wp-content/uploads/2010/04/figure_1.png"><img class="size-medium wp-image-4944" title="figure_1" src="http://www.phparch.com/files/2010/04/figure_1-300x87.png" alt="" width="300" height="87" /></a><p class="wp-caption-text">Figure 1: Connecting to Data Services</p></div>
<p>The “Connect to Data Service” button is on the upper right of the Data Services tab. Clicking that button will open the wizard and help you get connected.</p>
<div id="attachment_4948" class="wp-caption alignnone" style="width: 304px"><a href="http://beta.phparch.com/wp-content/uploads/2010/04/figure-2.png"><img class="size-medium wp-image-4948" title="figure 2" src="http://www.phparch.com/files/2010/04/figure-2-294x300.png" alt="" width="294" height="300" /></a><p class="wp-caption-text">Figure 2: Selecting Service Type</p></div>
<p>The first thing you have to do is select the type of service you are connecting to. PHP is one of your options. Selecting PHP will require you to point the wizard to the actual class you will be talking to so that it can use PHP&#8217;s reflection to gather information about the class. This means that if the API is hosed on a server you don&#8217;t have access to; you will need to use HTTP instead. While this will negate some of the benefits of the wizard, it will still set things up for you and you can manually configure your Data Service.</p>
<div id="attachment_4951" class="wp-caption alignnone" style="width: 304px"><a href="http://beta.phparch.com/wp-content/uploads/2010/04/figure_3.png"><img class="size-medium wp-image-4951" title="figure_3" src="http://www.phparch.com/files/2010/04/figure_3-294x300.png" alt="" width="294" height="300" /></a><p class="wp-caption-text">Figure 3: Configuring PHP Service</p></div>
<p>NOTE: For some reason, the class has to be inside your web root. Since this is considered a bad practice, you probably wouldn&#8217;t normally have the class available where Flash Builder 4 is looking.  I feel confident that the answer to this conundrum is a simple configuration setting but I&#8217;ve yet to find it. For the purposes of the demo, I put everything inside of web root. I will post a follow-up post once I have a solution for this problem.</p>
<p>Once you have entered a class location, it will attempt to use PHP&#8217;s Reflection to pull out methods, parameters and return types. To do this, Flash Builder 4 needs Zend Framework. If you have not already configured it, you will get the following dialog box:</p>
<div id="attachment_4953" class="wp-caption alignnone" style="width: 310px"><a href="http://beta.phparch.com/wp-content/uploads/2010/04/figure_4.png"><img class="size-medium wp-image-4953" title="figure_4" src="http://www.phparch.com/files/2010/04/figure_4-300x140.png" alt="" width="300" height="140" /></a><p class="wp-caption-text">Figure 4: Install Zend Framework</p></div>
<p>If you already have Zend Framework installed on your system you can save yourself ~20MB by pressing cancel, backing out, finding amf_config.ini and setting the zend_path setting.</p>
<p>For the purposes of demonstration, let&#8217;s have it generate a sample class for us. (See Figure 3), Again, everything needs to be inside the web root for things to work properly.</p>
<p>NOTE: This feature is for prototyping only! The program warns you, and for good reason, that you do not want to use this code in production, ever, for any reason, period.</p>
<div id="attachment_4952" class="wp-caption alignnone" style="width: 310px"><a href="http://beta.phparch.com/wp-content/uploads/2010/04/figure_5.png"><img class="size-medium wp-image-4952" title="figure_5" src="http://www.phparch.com/files/2010/04/figure_5-300x290.png" alt="" width="300" height="290" /></a><p class="wp-caption-text">Figure 5: Generate a sample PHP class</p></div>
<p>Flash Builder will generate the PHP class plus all the necessary ActionScript code to manipulate a table in your database. The resulting class will have your database credentials hard coded in it and will be in your web root. You can see why it&#8217;s not a good idea to use this code in production now.</p>
<p>That having been said, I gave it the wp_user table from a test install of WPMU I have on my local machine and it did a good job. The PHP code is quite good. It is primarily procedural code wrapped in an object wrapper but it for prototype code, it&#8217;s good.</p>
<p>Since FB4 uses PHPDoc blocks as part of its introspection process, it generates the appropriate docblocks for each of the methods. In my case, it generated 6 methods necessary to add/edit/delete and list the users of my test blog. More importantly though, the wizard created 2 ActionScript classes necessary to talk to the API, _Super_WpusersService.as and WpusersService.as, both in the Services directory. The first one, _Super_WpusersService.as is where the code necessary to talk to the API is hosted. The header comment makes note that this is generated code and should not be edited. It can however, be regenerated at will. The second file, WpusersService.as, is where any customizations go. It is this class, a subclass of the first class and  is the class that is actually instantiated. You can override any of the methods and add your own functionality here. This is a verbose but overall well-thought-out solution to having generated code will still allowing for modifications.</p>
<h1>Conclusion</h1>
<p>As you can see, connecting to PHP code from Flex is actually much easier in Flash Builder 4 and now you actually have more options with the ActonScript  classes being automatically built for you. The old way of doing things still works and there are legitimate cases where it is the best answer. However the new Data Services wizard does have some nice benefits.
<a href='http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/figure_1/' title='figure_1'><img width="150" height="150" src="http://www.phparch.com/wp-content/uploads/2010/04/figure_1-150x150.png" class="attachment-thumbnail" alt="Figure 1: Connecting to Data Services" title="figure_1" /></a>
<a href='http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/figure-2/' title='figure 2'><img width="150" height="150" src="http://www.phparch.com/wp-content/uploads/2010/04/figure-2-150x150.png" class="attachment-thumbnail" alt="Figure 2: Selecting Service Type" title="figure 2" /></a>
<a href='http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/figure_3/' title='figure_3'><img width="150" height="150" src="http://www.phparch.com/wp-content/uploads/2010/04/figure_3-150x150.png" class="attachment-thumbnail" alt="Figure 3: Configuring PHP Service" title="figure_3" /></a>
<a href='http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/figure_5/' title='figure_5'><img width="150" height="150" src="http://www.phparch.com/wp-content/uploads/2010/04/figure_5-150x150.png" class="attachment-thumbnail" alt="Figure 5: Generate a sample PHP class" title="figure_5" /></a>
<a href='http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/figure_4/' title='figure_4'><img width="150" height="150" src="http://www.phparch.com/wp-content/uploads/2010/04/figure_4-150x150.png" class="attachment-thumbnail" alt="Figure 4: Install Zend Framework" title="figure_4" /></a>
<a href='http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/flash_builder-4/' title='Flash_Builder 4'><img width="150" height="150" src="http://www.phparch.com/wp-content/uploads/2010/04/Flash_Builder-4-150x150.png" class="attachment-thumbnail" alt="Flash_Builder 4" title="Flash_Builder 4" /></a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/04/how-i-learned-to-stop-worrying-and-love-the-wizard-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Data-centric application development with Flash Builder 4</title>
		<link>http://www.phparch.com/2010/03/data-centric-application-development-with-flash-builder-4/</link>
		<comments>http://www.phparch.com/2010/03/data-centric-application-development-with-flash-builder-4/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 11:41:25 +0000</pubDate>
		<dc:creator>Carl Anderson</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[dzone]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=4421</guid>
		<description><![CDATA[Adobe Flash Builder 4 offers up some changes over the formerly named Flex Builder 3, plus some quick and easy ways to develop data-centric applications that access PHP services, while barely writing any PHP at all.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/03/Fx.png"><img class="alignleft size-medium wp-image-4420" title="Fx" src="http://www.phparch.com/files/2010/03/Fx-300x300.png" alt="" width="150" height="150" /></a><a href="http://ria.dzone.com/">RIA Zone</a>, part of the DZone Network, has posted an excellent article called “<a href="http://ria.dzone.com/articles/flash-builder-4-deep-dive">A Deep Dive into Flash Builder 4</a>.” Written by Jon Rose, the article talks about Flash Builder 4 and its use in quickly developing data-centric applications.</p>
<p>Rose first discusses what Adobe Flex is (in essence, an open-source framework used to build Rich Internet Applications, or RIAs) and gives some background on what’s new in Flash Builder 4 (renamed from Flex Builder)—things like namespace updates, Adobe Catalyst (a tool for designers), unit testing, debugging, and a lot more.</p>
<p>Of particular note, Rose says, is that Flex 4 provides developers with better tools for working with data and services—in other words, data-centric development tools.  Flash Builder uses introspection on existing services to get a handle on things, creating models and wrappers on the client.</p>
<p>Those who are new to Flex in general will find the second part of the article to be of primary interest.  There, Rose invites his readers to join him and “get our hands dirty,” creating a Flex application in Flash Builder 4 that accesses data in a MySQL database using PHP.  You likely won&#8217;t learn anything new about MySQL or PHP, but you will get an idea on how Flash Builder 4 makes it almost trivially easy to write a Flex application, even when you don&#8217;t have the PHP already written&#8230;since Flash Builder 4 can actually write a PHP class for you to connect to the data.</p>
<p>This article makes for a great introduction to Flash Builder 4 and Flex in general.  You can download <a href="http://labs.adobe.com/technologies/flashbuilder4/">Adobe Flash Builder 4</a> from Adobe’s Web site if you&#8217;d like to get your feet wet with Flex.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/03/data-centric-application-development-with-flash-builder-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Let&#039;s get all the facts on HTML5</title>
		<link>http://www.phparch.com/2010/02/lets-get-all-the-facts-on-html5/</link>
		<comments>http://www.phparch.com/2010/02/lets-get-all-the-facts-on-html5/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 15:06:17 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[conspiracy]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=3719</guid>
		<description><![CDATA[Recent blog posts called into question Adobe's commitment to open standards and specifically to HTML5. Now John Nack, Adobe employee but not spokes-person, speaks out and gives readers a hint of his true feelings on the matter.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/02/adobe-logo.jpg"><img class="alignleft size-thumbnail wp-image-3721" title="adobe-logo" src="http://www.phparch.com/files/2010/02/adobe-logo-150x150.jpg" alt="" width="150" height="150" /></a>I love a good conspiracy theory. Thus, it was with great interest that I read John Nack&#8217;s latest blog post, <a href="http://blogs.adobe.com/jnack/2010/02/adobe_is_sabotaging_html5.html">Adobe is &#8220;sabotaging&#8221; HTML5??</a>,  a rebuttal to the AppleInsider post titled <a href="http://www.appleinsider.com/articles/10/02/14/adobe_working_to_sabotage_html5.html">Adobe working to sabotage HTML5 (updated).</a></p>
<p>In his rebuttal, John is quite matter of fact in his assertion that Adobe is not blocking HTML5. Additionally, he calls into question the editorial due diligence of AppleInsider and the author of the blog post, Prince McLean.</p>
<p>John quotes extensively from a statement by Adobe representative Larry Masinter&#8217;s <a href="http://www.9to5mac.com/adobe-html5-objections-95496864#comment-66680">comment on the subject</a>.</p>
<p>I have many friends who hate Flash, refuse to install it on any computer they have (no matter how compelling the content) and anxiously await HTML5 because they see it as a Flash killer. Each time this conversation comes up, I like to remind them that Flash itself is not a bad thing, it&#8217;s the over-use of Flash by Marketing departments worldwide for such things as “Punch the Monkey” or the abomination of the web, sIRF, that are what is wrong, not the technology itself. Don&#8217;t think for a moment that these will go away because HTML5 is released—at best, they will just be updated and ported to the new technology.</p>
<p>Flash helped the web grow into new areas and, while we are all happy to see HTML5 come along, let&#8217;s not kick Flash (or Adobe)—instead, let&#8217;s remember that it served, and continues to serve, an important function.</p>
<p>All corporations, regardless of their corporate motto, have the potential to be evil and I don&#8217;t deny that Adobe shares in that potential. That having been said, Adobe has never seemed to me to be the evil type. I&#8217;m going to have to support John on this one and accept that, as he puts it, AppleInsider&#8217;s article may have been processed through the digestive system of a cow.</p>
<p><em>Disclaimer: Adobe is a client of Marco Tabini &amp; Associates (php|architect&#8217;s parent company) and Blue Parabola.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/02/lets-get-all-the-facts-on-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

