<?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>James Ward - RIA Cowboy &#187; RIA</title>
	<atom:link href="http://www.jamesward.com/category/ria/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jamesward.com</link>
	<description>Rich Internet Applications &#124; Flex &#124; Adobe AIR &#124; Java &#124; Open Source &#124; Linux &#124; Enterprise Software &#124; Cloud</description>
	<lastBuildDate>Tue, 24 Aug 2010 16:03:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Video: Introduction to the New Adobe AIR Launchpad</title>
		<link>http://www.jamesward.com/2010/08/24/video-introduction-to-the-new-adobe-air-launchpad/</link>
		<comments>http://www.jamesward.com/2010/08/24/video-introduction-to-the-new-adobe-air-launchpad/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 16:03:01 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1970</guid>
		<description><![CDATA[I just created a video that walks through the new Adobe AIR Launchpad. The AIR Launchpad is the easiest way to get started building desktop apps with Adobe AIR and Flex. Check it out:]]></description>
			<content:encoded><![CDATA[<p>I just created a video that walks through the new <a href="http://labs.adobe.com/technologies/airlaunchpad/">Adobe AIR Launchpad</a>.  The AIR Launchpad is the easiest way to get started building desktop apps with Adobe AIR and Flex.  Check it out:<br />
<object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/_zHVuWfjLHg?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_zHVuWfjLHg?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/08/24/video-introduction-to-the-new-adobe-air-launchpad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex 4 Fun Book by Chet Haase</title>
		<link>http://www.jamesward.com/2010/08/18/flex-4-fun-book-by-chet-haase/</link>
		<comments>http://www.jamesward.com/2010/08/18/flex-4-fun-book-by-chet-haase/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 15:36:29 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1824</guid>
		<description><![CDATA[My buddy Chet Haase has written an excellent book on Flex 4, called &#8220;Flex 4 Fun&#8220;. Chet&#8217;s humor, insight, and concise examples make this a &#8220;fun&#8221; way to learn Flex. Artima.com has posted some excerpts from the book to give you an idea of what to expect. Check out these great snippets: Bend your Pixels [...]]]></description>
			<content:encoded><![CDATA[<p>My buddy <a href="http://graphics-geek.blogspot.com/">Chet Haase</a> has written an excellent book on Flex 4, called &#8220;<a href="http://booksites.artima.com/flex_4_fun">Flex 4 Fun</a>&#8220;.  Chet&#8217;s humor, insight, and concise examples make this a &#8220;fun&#8221; way to learn Flex.  Artima.com has posted some excerpts from the book to give you an idea of what to expect.  Check out these great snippets:</p>
<ul>
<li><a href="http://www.artima.com/articles/bend_your_pixels.html">Bend your Pixels with Flex 4</a></li>
<li><a href="http://www.artima.com/articles/states_and_components.html">States and Components in Flex 4</a></li>
<li><a href="http://www.artima.com/articles/state_specific.html">State-Specific Property Values in Flex 4</a></li>
<li><a href="http://www.artima.com/articles/graphics_in_flex_3_and_4.html">Graphics in Flex 3 and Flex 4</a></li>
<li><a href="http://www.artima.com/articles/state_transitions_in_flex_4.html">State Transitions in Flex 4 for Intuitive UIs</a></li>
<li><a href="http://www.artima.com/articles/drawing_lines_in_flex_4.html">Stroke of Genius: Drawing Lines in Flex 4</a></li>
<li><a href="http://www.artima.com/articles/fills_in_flex_4.html">Fills in Flex 4: It&#8217;s What&#8217;s on the Inside that Counts</a></li>
</ul>
<p>If you are just getting into Flex or haven&#8217;t yet made the switch to Flex 4, then this is a great book to buy.  You can buy <em>Flex 4 Fun</em> on either <a href="http://booksites.artima.com/flex_4_fun">artima.com</a> or <a href="http://www.amazon.com/gp/product/0981531628?ie=UTF8&#038;tag=filriccli-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0981531628">amazon.com</a>.  Have &#8220;fun&#8221; learning Flex 4!  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/08/18/flex-4-fun-book-by-chet-haase/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bay Area Event: Building RIAs using Flash Builder for Force.com</title>
		<link>http://www.jamesward.com/2010/08/17/bay-area-event-building-rias-using-the-flash-builder-for-force-com/</link>
		<comments>http://www.jamesward.com/2010/08/17/bay-area-event-building-rias-using-the-flash-builder-for-force-com/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 17:05:10 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1959</guid>
		<description><![CDATA[Salesforce.com is putting on a great event on August 25 in San Mateo, California where you can learn about how to build RIAs on the Cloud with Flash Builder for Force.com. This will be a great opportunity to meet the team that built the tool and learn how to use it! If you can&#8217;t make [...]]]></description>
			<content:encoded><![CDATA[<p>Salesforce.com is putting on a <a href="https://www.developerforce.com/events/sanmateo_developer_meetup/registration.php">great event</a> on August 25 in San Mateo, California where you can learn about how to build RIAs on the Cloud with <a href="http://developer.force.com/flashbuilder">Flash Builder for Force.com</a>.  This will be a great opportunity to meet the team that built the tool and learn how to use it!  If you can&#8217;t make it then check out the article I recently published &#8220;<a href="http://www.jamesward.com/2010/07/26/building-client-cloud-apps-with-flash-builder-for-force-com/">Building Client / Cloud Apps with Flash Builder for Force.com</a>&#8220;.  But if you are in the Bay Area and want to get up to speed quickly on building Client / Cloud apps then <a href="https://www.developerforce.com/events/sanmateo_developer_meetup/registration.php">Register Now</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/08/17/bay-area-event-building-rias-using-the-flash-builder-for-force-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Define Styles on Skins in Flex 4</title>
		<link>http://www.jamesward.com/2010/07/30/how-to-define-styles-on-skins-in-flex-4/</link>
		<comments>http://www.jamesward.com/2010/07/30/how-to-define-styles-on-skins-in-flex-4/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 14:49:38 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1932</guid>
		<description><![CDATA[The new component / skin separation in Flex 4 (the Spark Architecture) is pretty nifty. But if you want to add a configurable style to a skin then that style must be defined on the component. For instance if you want to add a backgroundColor style to a Button skin then you need to first [...]]]></description>
			<content:encoded><![CDATA[<p>The new component / skin separation in Flex 4 (the Spark Architecture) is pretty nifty.  But if you want to add a configurable style to a skin then that style must be defined on the component.  For instance if you want to add a backgroundColor style to a Button skin then you need to first create a new Button component with the style on it:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">import</span> spark.<span style="color: #006600;">components</span>.<span style="color: #0066CC;">Button</span>;
&nbsp;
<span style="color: #66cc66;">&#91;</span>Style<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;backgroundColor&quot;</span>, <span style="color: #0066CC;">type</span>=<span style="color: #ff0000;">&quot;uint&quot;</span>, format=<span style="color: #ff0000;">&quot;Color&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SButton <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">Button</span>
<span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Then create a new Button skin that uses the style:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SparkSkin</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">  xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
    import mx.utils.ColorUtil;
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:states</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;up&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;over&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;down&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:states</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
      <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color=<span style="color: #ff0000;">&quot;{getStyle('backgroundColor')}&quot;</span></span>
<span style="color: #000000;">                    color.over=<span style="color: #ff0000;">&quot;{ColorUtil.adjustBrightness2(getStyle('backgroundColor'), 64)}&quot;</span></span>
<span style="color: #000000;">                    color.down=<span style="color: #ff0000;">&quot;{ColorUtil.adjustBrightness2(getStyle('backgroundColor'), -32)}&quot;</span></span>
<span style="color: #000000;">      <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;labelDisplay&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;3&quot;</span> paddingLeft=<span style="color: #ff0000;">&quot;3&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;3&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;6&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:SparkSkin</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Then you can use the new Button and skin:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">  <span style="color: #000000;">&lt;SButton label=<span style="color: #ff0000;">&quot;backgroundColor = #ff0000&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;#ff0000&quot;</span> skinClass=<span style="color: #ff0000;">&quot;SButtonSkin&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;">&lt;SButton label=<span style="color: #ff0000;">&quot;backgroundColor = #0000ff&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;#0000ff&quot;</span> skinClass=<span style="color: #ff0000;">&quot;SButtonSkin&quot;</span><span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>The reason that we had to create a new base class just to hold the style is because there would be no other way to set the style in MXML.  We could have set the style via CSS or setStyle.  Button does not have a style named &#8220;backgroundColor&#8221; so if we hadn&#8217;t created SButton and tried to just set a backgroundColor property on a Button instance via MXML, the compiler would have thrown an error.</p>
<p>So I (with the help of <a href="http://frishy.blogspot.com/">Ryan Frishberg</a> and <a href="http://blogs.digitalprimates.net/codeslinger/">Mike Labriola</a>) came up with a nifty little way to set styles on skins without having to create new base classes to hold the styles.  The idea is that styles should be defined on the skins and you can use a property on the base components to set those styles via MXML.  To make it happen I had to Monkey Patch a property named &#8220;style&#8221; onto UIComponent.  In the setter for that style I just parse a string of HTML-ish styles and  call setStyle.  The cool thing is that I&#8217;m calling setStyle on the component but since skins inherit the styles of their host component the skin gets the styles.  This also means that the styles don&#8217;t really need to be defined on the skins.  Just used in the skins.  Using the example above to set the backgroundColor on the Button I could just do:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> label=<span style="color: #ff0000;">&quot;backgroundColor = #ff0000&quot;</span> style=<span style="color: #ff0000;">&quot;backgroundColor: #ff0000&quot;</span> skinClass=<span style="color: #ff0000;">&quot;SButtonSkin&quot;</span><span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>I didn&#8217;t need a new Button class just to set the backgroundColor style.  Here is a more complex example with more styles on the skin:<br />
<iframe src="/demos/Styles4Skins/Styles4Skins.html" width="100%" height="400" style="border: 1px #000000 solid"></iframe></p>
<p>All of those buttons are using the same skin and the base Spark Button!  The code for this example is <a href="http://github.com/jlward4th/Styles4Skins">on github</a>.  So check it out, fork it, and have fun.  Let me know if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/07/30/how-to-define-styles-on-skins-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Building Client / Cloud Apps with Flash Builder for Force.com</title>
		<link>http://www.jamesward.com/2010/07/26/building-client-cloud-apps-with-flash-builder-for-force-com/</link>
		<comments>http://www.jamesward.com/2010/07/26/building-client-cloud-apps-with-flash-builder-for-force-com/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 19:15:25 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Salesforce.com]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1894</guid>
		<description><![CDATA[I have a theory. The majority of people who use enterprise software today use old school Client / Server apps. We&#8217;ve been trying to move these apps to the web for more than ten years. The ease of deployment of web apps is a clear motivator. Yet the client capabilities of the plain old web [...]]]></description>
			<content:encoded><![CDATA[<p>I have a theory.  The majority of people who use enterprise software today use old school Client / Server apps.  We&#8217;ve been trying to move these apps to the web for more than ten years.  The ease of deployment of web apps is a clear motivator.  Yet the client capabilities of the plain old web browser have not been sufficient for many apps to make the leap.  This is why I love Flex and the Flash Platform.  It provides a way to use web technologies and the web deployment model but adds many of the critical things needed for mission critical apps that people use all day long.</p>
<p>But no one wants to go back to the Client / Server architecture.  We want to embrace Cloud Computing architectures but not lose the client capabilities.  What we really need is the Client / Cloud architecture.  We need a web deployment model that provides ease of deployment but also the ability to install applications on our desktops and mobile devices.</p>
<p>This is why I&#8217;m so excited about the new <a href="http://developer.force.com/flashbuilder">Adobe Flash Builder for Force.com</a>.  In a nutshell this is a tool that Adobe and Salesforce.com built together to enable developers to build great software using Flex for the UI and Force.com for the Cloud back-end.  It&#8217;s a wonderful combination of technologies that will help many Client / Server apps make the switch to Client / Cloud.</p>
<p>Applications created with Flash Builder for Force.com can be run in the browser, on the desktop, and on mobile devices.  These applications can be assembled from the hundreds of Flex components that are out there (check out many of them in <a href="http://flex.org/tour">Tour de Flex</a>).</p>
<p>Check out this video to see how to use Flash Builder for Force.com to build a simple app:</p>
<p><object width="640" height="385"><param name="movie" value="http://images.tv.adobe.com/swf/player.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="FlashVars" value="fileID=7230&#038;context=64&#038;embeded=true&#038;environment=production"></param><embed src="http://images.tv.adobe.com/swf/player.swf" flashvars="fileID=7230&#038;context=64&#038;embeded=true&#038;environment=production" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>As you can see, it&#8217;s very easy to get started.  But I wanted to go a step further and try to build something real&#8211;something that shows a genuine use case for extending beyond the out-of-the-box Salesforce.com UI.  I wanted to keep it really simple so that I could post the code here.  What I came up with is this (in user story form):</p>
<ul>
<li>As a Salesforce.com user I want to take a photo, using my phone, of one of my contacts so that the photo can be saved to their contact record for future reference.</li>
<li>As a Salesforce.com user I want to see photos I&#8217;ve taken of my contacts so that I can be reminded of what they look like.</li>
</ul>
<p>Simple enough.  So here is what I came up with:</p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/RIUwh6wk8cY&amp;hl=en_US&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/RIUwh6wk8cY&amp;hl=en_US&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p>To build these two apps I first downloaded and installed <a href="https://www.developerforce.com/events/flashbuilder/registration.php">Flash Builder for Force.com</a>.  I used the <a href="http://www.adobe.com/go/airbetasignup">Adobe AIR for Android prerelease</a> to build the mobile app.  Here is how I created these apps.</p>
<p>First I added a new field to Contact to store the photo.  Salesforce.com doesn&#8217;t have a binary field so I used a large text field (32k limit).  I&#8217;ll store the photo Base64 encoded.</p>
<p>Then in Salesforce.com I saved my enterprise.wsdl file. Check out a <a href="http://wiki.developerforce.com/index.php/Demo_Building_Desktop_Client_for_the_Cloud">great video from Dave Carroll</a> to see how to do this.</p>
<p>Now in Flash Builder for Force.com I created a new Force.com Flex Project for the mobile app.  If you do this on your own and want to run on a mobile device then you will need to overlay the AIR for Android SDK on top of a Flex 4.1 SDK.  Select Desktop Application as the app type.  Replace WindowedApplication with just Application.  And replace the F3DesktopApplication with F3WebApplication since F3DesktopApplication uses APIs that are not available on AIR for Android.  (BTW: Flash Builder, Flex, and Force.com Flex Projects do not officially support mobile deployment yet.  It works but there is no support and no guarantees.)  If you are building a standard Web Application or Desktop Application then you can just leave the generated code as is.</p>
<p>Using the Data/Services wizard I connected to Salesforce.com using my enterprise.wsdl file.  After the services and value objects have been generated I modified the Contact object and added a Bindable account property.  The generated application already included the F3DesktopApplication Declaration used to connect to Salesforce.  Due to an incompatibility with that API and AIR for Android I switched it to use F3WebApplication.  In F3WebApplication&#8217;s loginComplete event handler I query Salesforce.com for Accounts and then Contacts, associate contacts with their account, and then store the contacts:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">app.<span style="color: #006600;">wrapper</span>.<span style="color: #006600;">query</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;select Id, Name from Account&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> AsyncResponder<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>:ArrayCollection, token:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
    accounts = <span style="color: #0066CC;">data</span>;
    app.<span style="color: #006600;">wrapper</span>.<span style="color: #006600;">query</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;select Id, AccountId, FirstName, LastName, Phone, MobilePhone, Email, Title, Department, MailingCity, photoData__c from Contact&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> AsyncResponder<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>:ArrayCollection, token:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> contact:Contact <span style="color: #b1b100;">in</span> <span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> account:Account <span style="color: #b1b100;">in</span> accounts<span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>account.<span style="color: #006600;">Id</span> == contact.<span style="color: #006600;">AccountId</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    contact.<span style="color: #006600;">account</span> = account;						
                <span style="color: #66cc66;">&#125;</span>
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
        contacts = <span style="color: #0066CC;">data</span>;
    <span style="color: #66cc66;">&#125;</span>, handleError<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>, handleError<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Notice in the query that I&#8217;m fetching photoData__c, which is the custom field I created on Contact to store the photo.</p>
<p>In the renderer for a contact I need to either display the photo if there is one or let the user add one.  Here is the simple UI code to handle that:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> width=<span style="color: #ff0000;">&quot;92&quot;</span> height=<span style="color: #ff0000;">&quot;92&quot;</span> top=<span style="color: #ff0000;">&quot;8&quot;</span> right=<span style="color: #ff0000;">&quot;8&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> width=<span style="color: #ff0000;">&quot;92&quot;</span> height=<span style="color: #ff0000;">&quot;92&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color=<span style="color: #ff0000;">&quot;#cccccc&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;addPhoto&quot;</span> text=<span style="color: #ff0000;">&quot;Add a photo&quot;</span> width=<span style="color: #ff0000;">&quot;92&quot;</span> height=<span style="color: #ff0000;">&quot;92&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> textAlign=<span style="color: #ff0000;">&quot;center&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;photo&quot;</span> width=<span style="color: #ff0000;">&quot;92&quot;</span> height=<span style="color: #ff0000;">&quot;92&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>When the contact is set I check to see if there is a photo and if so display it:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>contact.<span style="color: #006600;">photoData__c</span> == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    photo.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
    <span style="color: #b1b100;">return</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> decoder:Base64Decoder = <span style="color: #000000; font-weight: bold;">new</span> Base64Decoder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
decoder.<span style="color: #006600;">decode</span><span style="color: #66cc66;">&#40;</span>contact.<span style="color: #006600;">photoData__c</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> loader:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
loader.<span style="color: #006600;">contentLoaderInfo</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
    photo.<span style="color: #006600;">source</span> = event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">content</span>;
    photo.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">true</span>;
<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
loader.<span style="color: #006600;">loadBytes</span><span style="color: #66cc66;">&#40;</span>decoder.<span style="color: #006600;">toByteArray</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>The data from the photoData__c field is Base64 decoded and then displayed using the Flex BitmapImage component.</p>
<p>Now when the user clicks on the photo or empty photo box I use the AIR for Android CameraUI to grab a photo, resize it, covert it to a PNG, Base64 encode it, set it on the contact, and then save the contact to Salesforce.com:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>CameraUI.<span style="color: #006600;">isSupported</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    cameraUI = <span style="color: #000000; font-weight: bold;">new</span> CameraUI<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    cameraUI.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MediaEvent.<span style="color: #006600;">COMPLETE</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:MediaEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">var</span> loader:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">data</span>.<span style="color: #006600;">file</span>.<span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
        loader.<span style="color: #006600;">contentLoaderInfo</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> bitmap:Bitmap = event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">content</span> as Bitmap;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> result:BitmapData = <span style="color: #000000; font-weight: bold;">new</span> BitmapData<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">46</span>, <span style="color: #cc66cc;">46</span>, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #000000; font-weight: bold;">var</span> matrix:Matrix = <span style="color: #000000; font-weight: bold;">new</span> Matrix<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            matrix.<span style="color: #006600;">scale</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">46</span> <span style="color: #66cc66;">/</span> bitmap.<span style="color: #0066CC;">width</span>, <span style="color: #cc66cc;">46</span> <span style="color: #66cc66;">/</span> bitmap.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
            result.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>bitmap, matrix<span style="color: #66cc66;">&#41;</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> pngEncoder:PNGEncoder = <span style="color: #000000; font-weight: bold;">new</span> PNGEncoder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #000000; font-weight: bold;">var</span> pngBytes:ByteArray = pngEncoder.<span style="color: #006600;">encode</span><span style="color: #66cc66;">&#40;</span>result<span style="color: #66cc66;">&#41;</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> base64Encoder:Base64Encoder = <span style="color: #000000; font-weight: bold;">new</span> Base64Encoder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            base64Encoder.<span style="color: #006600;">encodeBytes</span><span style="color: #66cc66;">&#40;</span>pngBytes<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #000000; font-weight: bold;">var</span> encodedImage:<span style="color: #0066CC;">String</span> = base64Encoder.<span style="color: #0066CC;">flush</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
            contact.<span style="color: #006600;">photoData__c</span> = encodedImage;
&nbsp;
            displayPhoto<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
            F3WebApplication.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">wrapper</span>.<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span>contact, <span style="color: #000000; font-weight: bold;">new</span> AsyncResponder<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>:<span style="color: #0066CC;">Object</span>, token:<span style="color: #0066CC;">Object</span>=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #66cc66;">&#125;</span>, FlexGlobals.<span style="color: #006600;">topLevelApplication</span>.<span style="color: #006600;">handleError</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    cameraUI.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ErrorEvent.<span style="color: #0066CC;">ERROR</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:ErrorEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        FlexGlobals.<span style="color: #006600;">topLevelApplication</span>.<span style="color: #006600;">handleError</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    cameraUI.<span style="color: #006600;">launch</span><span style="color: #66cc66;">&#40;</span>MediaType.<span style="color: #006600;">IMAGE</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>That&#8217;s it for the mobile app!  I compiled it, exported it to an Android app, and then copied it to my phone.  Pretty simple and as you can see it works!  One limitation with my approach is the 32k limit of the photoData__c field.  However, I think I could easily get around that by striping the Base64 encoded data across multiple fields.  It&#8217;s not ideal but it would work.</p>
<p>To display the photo when I view a contact on Salesforce.com I created a very simple Flex app using another Force.com Flex Project.  I could have also added photo upload to this application but chose to keep it simple.  All it does is display the selected contact&#8217;s photo.  Here is the complete code (after generating the required services in Flash Builder):</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">    xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">    xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">    xmlns:flexforforce=<span style="color: #ff0000;">&quot;http://flexforforce.salesforce.com&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>		
    import mx.rpc.AsyncResponder;
    import mx.utils.Base64Decoder;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;flexforforce:F</span>3WebApplication id=<span style="color: #ff0000;">&quot;app&quot;</span> requiredTypes=<span style="color: #ff0000;">&quot;Contact&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;flexforforce:loginComplete</span><span style="color: #7400FF;">&gt;</span></span>
                app.wrapper.query(&quot;select photoData__c from Contact where Id = '&quot; + this.parameters.contactId + &quot;'&quot;, new AsyncResponder(function(data:Object, token:Object):void {
                    if (data.length == 1)
                    {
                        if (data[0].photoData__c == null)
                        {
                            photo.visible = false;
                            noPhoto.visible = true;
                            return;
                        }
&nbsp;
                        var decoder:Base64Decoder = new Base64Decoder();
                        decoder.decode(data[0].photoData__c);
&nbsp;
                        var loader:Loader = new Loader();
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(event:Event):void {
                            photo.source = event.target.content;
                            photo.visible = true;
                        });
                        loader.loadBytes(decoder.toByteArray());
                    }
                }, function(fault:Object):void {
                    // ignored
                }));
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/flexforforce:loginComplete</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/flexforforce:F</span>3WebApplication<span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:applicationComplete</span><span style="color: #7400FF;">&gt;</span></span>
        app.serverUrl = this.parameters.serverUrl;
        app.loginBySessionId(this.parameters.sessionId);
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:applicationComplete</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> width=<span style="color: #ff0000;">&quot;92&quot;</span> height=<span style="color: #ff0000;">&quot;92&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color=<span style="color: #ff0000;">&quot;#cccccc&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;noPhoto&quot;</span> text=<span style="color: #ff0000;">&quot;No Photo&quot;</span> width=<span style="color: #ff0000;">&quot;92&quot;</span> height=<span style="color: #ff0000;">&quot;92&quot;</span> textAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> visible=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;photo&quot;</span> width=<span style="color: #ff0000;">&quot;92&quot;</span> height=<span style="color: #ff0000;">&quot;92&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Finally I created a custom S-Control to run the Flex app:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">object</span> <span style="color: #000066;">classid</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ContactPhoto&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;92&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;92&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">codebase</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab&quot;</span>&gt;</span> 
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;movie&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{!Scontrol.JavaArchive}&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> 
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flashvars&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sessionId={!API.Session_ID}&amp;serverUrl={!API.Partner_Server_URL_90}&amp;contactId={!Contact.Id}&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> 
    <span style="color: #009900;">&lt;embed <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{!Scontrol.JavaArchive}&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;92&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;92&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ContactPhoto&quot;</span> </span>
<span style="color: #009900;">flashvars<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sessionId={!API.Session_ID}&amp;serverUrl={!API.Partner_Server_URL_90}&amp;contactId={!Contact.Id}&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application/x-shockwave-flash&quot;</span> </span>
<span style="color: #009900;">pluginspage<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/go/getflashplayer&quot;</span>&gt;</span> 
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>embed&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">object</span>&gt;</span></pre></div></div>

<p>I uploaded the compiled Flex app to the S-Control and added it to the Contact page.  And that&#8217;s it!  In just a few hours I extended Force.com and built a cool mobile app.  I could also have easily created a desktop widget for browsing contacts and adding photos.  If you are looking for a fun project to use as a way to learn this stuff that would be a good one!  :)</p>
<p>Here are some resources to help you get started with Flash Builder for Force.com:</p>
<ul>
<li><a href="http://wiki.developerforce.com/index.php/Force.com_Flex_Quick_Start_Tutorial">Force.com Flex Quick Start Tutorial</a></li>
<li><a href="http://developerforce.s3.amazonaws.com/website/afb/docs/ASDoc_Flex/index.html">Force.com Flex Project APIs for Web Applications</a></li>
<li><a href="http://developerforce.s3.amazonaws.com/website/afb/docs/ASDoc_AIR/index.html">Force.com Flex Project APIs for Desktop Applications</a></li>
<li><a href="http://developer.force.com/flashbuilder">Numerous other demo applications and tutorials</a></li>
<li><a href="http://github.com/jlward4th/MobileContacts">Source code for my mobile contacts demo</a></li>
<li><a href="http://github.com/jlward4th/WebContactSControl">Source code for my web contact photo viewer demo</a></li>
</ul>
<p>Have fun building the next generation of software!  Let me know how it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/07/26/building-client-cloud-apps-with-flash-builder-for-force-com/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Developing Mobile Flash / Flex &#8211; Scaling and Zooming</title>
		<link>http://www.jamesward.com/2010/07/19/developing-mobile-flash-flex-scaling-and-zooming/</link>
		<comments>http://www.jamesward.com/2010/07/19/developing-mobile-flash-flex-scaling-and-zooming/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 18:29:10 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1874</guid>
		<description><![CDATA[Mobile development with Flash and Flex is a new frontier, full of new adventures and discoveries. Recently I discovered something that might be useful to you. By default the mobile web browser on my Android 2.2 device scales a web page to make more room to display pages typically built for a desktop profile. Here [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile development with Flash and Flex is a new frontier, full of new adventures and discoveries.  Recently I discovered something that might be useful to you.  By default the mobile web browser on my Android 2.2 device scales a web page to make more room to display pages typically built for a desktop profile.  Here is what a little <a href="http://www.jamesward.com/demos/MobileSizeTest/MobileSizeTest.html">test mobile Flex app</a> I built looks like:<br />
<img src="http://www.jamesward.com/wp/uploads/2010/07/mobile_flash-default.png" width="480" height="800" style="border: 1px solid black"/></p>
<p>Strange!  The width and height are larger than the screen resolution.  You can fix this by adding the following to the HTML page:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;viewport&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;target-densityDpi=device-dpi; user-scalable=0;&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>And now it will look like:<br />
<img src="http://www.jamesward.com/wp/uploads/2010/07/mobile_flash-noscale.png" alt="" title="mobile_flash-noscale" width="480" height="800" style="border: 1px solid black"/></p>
<p>Now that looks right!  This also turns off the two-finger / pinch zooming feature for the page (which is more important for content that hasn&#8217;t been optimized for a mobile profile).</p>
<p>I hope this is useful for those of you embarking on new adventures with Flash / Flex on mobile devices!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/07/19/developing-mobile-flash-flex-scaling-and-zooming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>amf.js &#8211; A Pure JavaScript AMF Implementation</title>
		<link>http://www.jamesward.com/2010/07/07/amf-js-a-pure-javascript-amf-implementation/</link>
		<comments>http://www.jamesward.com/2010/07/07/amf-js-a-pure-javascript-amf-implementation/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 15:34:06 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1846</guid>
		<description><![CDATA[I just finished the first version of a new pure JavaScript library for AMF. I&#8217;ve wanted to do this for a while but didn&#8217;t think it was possible since JavaScript doesn&#8217;t have a ByteArray. But then I came across this: &#8220;High Performance JavaScript Port of ActionScript&#8217;s ByteArray&#8220;. That became the basis for amf.js. Before I [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished the first version of a new pure <a href="http://github.com/jlward4th/JSAMF">JavaScript library for AMF</a>.  I&#8217;ve wanted to do this for a while but didn&#8217;t think it was possible since JavaScript doesn&#8217;t have a ByteArray.  But then I came across this: &#8220;<a href="http://www.adamia.com/blog/high-performance-javascript-port-of-actionscript-byteArray">High Performance JavaScript Port of ActionScript&#8217;s ByteArray</a>&#8220;.  That became the basis for <a href="http://github.com/jlward4th/JSAMF">amf.js</a>.  Before I get into the gory details of how this works, check out some developer eye candy:<br />
<a href="http://www.jamesward.com/demos/JSAMF/censusTest.html" target="_new">http://www.jamesward.com/demos/JSAMF/censusTest.html</a></p>
<p>Ok, hopefully that worked for you.  I&#8217;ve tested this in the latest Chrome, Firefox, Safari, and IE and they all seem to work.  It should also work on your iPad, iPhone, or Android device.</p>
<p>Now for those gory details&#8230;  AMF is a protocol initially created in Flash Player as a way to serialize data for storage on disk or transfer over a network.  Typically in web apps we use text-based serialization protocols (like JSON or RESTful XML) for data transfer.  But there are some advantages to using binary protocols &#8211; primarily <a href="http://www.jamesward.com/2009/06/17/blazing-fast-data-transfer-in-flex/">much better performance</a>.  There are two versions of the AMF protocol, <a href="http://download.macromedia.com/pub/labs/amf/amf0_spec_121207.pdf">AMF0</a> and <a href="http://opensource.adobe.com/wiki/download/attachments/1114283/amf3_spec_05_05_08.pdf">AMF3</a>.  Both are publicly documented by Adobe and numerous server-side implementations of AMF exist.  AMF is just a serialization technology, not a transport.  So you can put AMF encoded data into any transport (like HTTP / HTTPS).  Typically Flash Player is the client that reads / writes AMF data.</p>
<p>I recently had a conversation with <a href="http://twitter.com/Stephan007">Stephan Janssen</a> who runs <a href="http://parleys.com">Parleys.com</a> (an amazing Flex app), which started me on this fun project. The Parleys.com PC-profile web client and the Adobe AIR desktop client both use BlazeDS and AMF as the primary serialization protocol for moving data between client and server.  This is a great choice for those clients because it makes the apps snappy.  But for the HTML5 client Stephan wants to reuse his AMF endpoints.  This is where amf.js comes in.</p>
<p>Flash Player has a ByteArray API that can be used for a lot of amazing things.  One of those things is to read and write AMF.  If you have an object in Flash Player and you create a new ByteArray and then call &#8220;byteArray.writeObject(myObject)&#8221; you will get a ByteArray with the AMF representation of that object.  Likewise if you get some AMF and you call &#8220;byteArray.readObject()&#8221; you get the object(s) from the AMF.  In Flex there are high level APIs (like RemoteObject, Consumer, etc.) that use this native AMF support in Flash Player.</p>
<p>To create a pure JavaScript AMF library the first thing that is needed is a pure JavaScript ByteArray library since JavaScript doesn&#8217;t natively have one.  I used one from <a href="http://www.adamia.com/blog/high-performance-javascript-port-of-actionscript-byteArray">adamia.com</a> since it was similar to the ByteArray in Flash Player, seemed fast, and seemed to parse floats correctly.  This ByteArray has some of the basic functions like readByte, readFloat, etc.  But what about that cool readObject function?  Well, that has to be built from scratch.  And it should support both AMF0 and AMF3.</p>
<p>Using the AMF specs and code from BlazeDS &#038; pyamf as a reference I was able to add the other functions to the ByteArray.  But there was a problem.  Using XMLHttpRequest as the method of getting the AMF was not working right.  Some bytes were incorrect.  It turns out XMLHttpRequest uses UTF-8 and that screws up some of the bytes above 128.  I tried other charsets and each one would change some range of bytes.  That is not good because I need the bytes to be exactly what the server sent.  Then I came across <a href="http://web.archive.org/web/20061114143134/http://mgran.blogspot.com/2006/08/downloading-binary-streams-with.html">this gem</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]</span>
req.<span style="color: #660066;">overrideMimeType</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'text/plain; charset=x-user-defined'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Using the &#8220;x-user-defined&#8221; charset left the bytes alone.  Perfect!  Except that IE doesn&#8217;t support the req.overrideMimeType function.  But IE does actually have a real ByteArray available in req.responseBody via VBScript.  For now in IE I just change the ByteArray into a string (like req.responseText in the other browsers) although a lot of optimization could be done to just use the VBScript ByteArray directly.</p>
<p>Right now amf.js is just a basic JavaScript library for reading AMF data.  It doesn&#8217;t support using a BlazeDS MessageBrokerServlet yet because I need to be able to assemble a AMF object in JavaScript and send that in the HTTP request to the servlet.  But it works fine with a custom servlet that uses BlazeDS&#8217;s AMF library to just write AMF into the HTTP response.  It should also work with pyamf, AMFPHP, and other AMF server libraries.</p>
<p>To use amf.js start by dumping some AMF into an HTTP response.  In Java with BlazeDS I did this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> doGet<span style="color: #009900;">&#40;</span>HttpServletRequest request, HttpServletResponse response<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> ServletException, <span style="color: #003399;">IOException</span>
<span style="color: #009900;">&#123;</span>
    response.<span style="color: #006633;">setHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type&quot;</span>, <span style="color: #0000ff;">&quot;application/x-amf;charset=x-user-defined&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    ServletOutputStream out <span style="color: #339933;">=</span> response.<span style="color: #006633;">getOutputStream</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    ActionMessage requestMessage <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ActionMessage<span style="color: #009900;">&#40;</span>MessageIOConstants.<span style="color: #006633;">AMF3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    MessageBody amfMessage <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MessageBody<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    amfMessage.<span style="color: #006633;">setData</span><span style="color: #009900;">&#40;</span>someSerializableObject<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    requestMessage.<span style="color: #006633;">addBody</span><span style="color: #009900;">&#40;</span>amfMessage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    AmfMessageSerializer amfMessageSerializer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> AmfMessageSerializer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    amfMessageSerializer.<span style="color: #006633;">initialize</span><span style="color: #009900;">&#40;</span>SerializationContext.<span style="color: #006633;">getSerializationContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, out, <span style="color: #000000; font-weight: bold;">new</span> AmfTrace<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    amfMessageSerializer.<span style="color: #006633;">writeMessage</span><span style="color: #009900;">&#40;</span>requestMessage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    out.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In a HTML web page add the amf.js script:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;amf.js&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>In JavaScript make a XHR request for some data:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;TestServlet&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> req<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> getAMF<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">ActiveXObject</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        req <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Microsoft.XMLHTTP&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">XMLHttpRequest</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        req <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #006600; font-style: italic;">//XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]</span>
        req.<span style="color: #660066;">overrideMimeType</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'text/plain; charset=x-user-defined'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    req.<span style="color: #660066;">onreadystatechange</span> <span style="color: #339933;">=</span> processReqChange<span style="color: #339933;">;</span>
    req.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span> url<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    req.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And when the response comes back decode the AMF:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> processReqChange<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>req.<span style="color: #660066;">readyState</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>req.<span style="color: #000066;">status</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> decodeAMF<span style="color: #009900;">&#40;</span>req.<span style="color: #660066;">responseText</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">messages</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">body</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">else</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;There was a problem retrieving the data:<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span> req.<span style="color: #660066;">statusText</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>For details on how to support IE, check out the source code for <a href="http://www.jamesward.com/demos/JSAMF/censusTest.html">censusTest.html</a>.</p>
<p>While amf.js works in my tests there is more work to be done.  I need to add the write functions so that AMF can be sent to the server.  Then supporting BlazeDS&#8217;s MessageBrokerServlet should be pretty straightforward.  I&#8217;d also like to create pure JavaScript implementations of Flex&#8217;s RemoteObject, Consumer, and Producer APIs.  Also, I need people to test amf.js with their AMF to make sure that I&#8217;ve implemented things correctly.  All of the <a href="http://github.com/jlward4th/JSAMF">code is on github.com</a> so go ahead and fork it!  Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/07/07/amf-js-a-pure-javascript-amf-implementation/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Tour de Flex 2.0 &#8211; Nearly 500 Flex Examples!</title>
		<link>http://www.jamesward.com/2010/06/21/tour-de-flex-2-0-nearly-500-flex-examples/</link>
		<comments>http://www.jamesward.com/2010/06/21/tour-de-flex-2-0-nearly-500-flex-examples/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 15:45:42 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1827</guid>
		<description><![CDATA[Adobe has just launched the new AIR 2 based Tour de Flex version 2.0 which now contains almost 500 Flex examples! The new version has new AIR 2 examples (only available in the AIR version of Tour de Flex) including: File Promises Mass Storage Detection Native Process Open with default app Socket Server Also there [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe has just launched the new AIR 2 based <a href="http://flex.org/tour">Tour de Flex version 2.0</a> which now contains almost 500 Flex examples!  The new version has new AIR 2 examples (only available in the AIR version of Tour de Flex) including:</p>
<ul>
<li>File Promises</li>
<li>Mass Storage Detection</li>
<li>Native Process</li>
<li>Open with default app</li>
<li>Socket Server</li>
</ul>
<p>Also there are some great examples of the new Flash Player 10.1 and AIR 2 APIs including:</p>
<ul>
<li>Gestures</li>
<li>Global Error Handler</li>
<li>Globalization / Internationalization</li>
<li>Microphone access</li>
</ul>
<p>Those are some great examples but my favorite is still <a href="http://dougmccune.com/blog/">Doug McCune&#8217;s</a> <a href="http://www.adobe.com/devnet/flex/tourdeflex/web/#docIndex=0;illustIndex=0;sampleId=16300">Physics Form</a> followed closely by the <a href="http://www.adobe.com/devnet/flex/tourdeflex/web/#docIndex=-1;illustIndex=0;sampleId=14050">real-time Tour de Flex Dashboard</a>.  :)</p>
<p>If you already have Tour de Flex installed then it should auto update to the latest version when you launch it.  Otherwise install it now using the badge installer below.<br />
<iframe width="216" height="182" frameborder=0 scrolling="no" src="http://tourdeflex.adobe.com/badge/"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/06/21/tour-de-flex-2-0-nearly-500-flex-examples/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Top 10 StackOverflow.com Flex Contributors</title>
		<link>http://www.jamesward.com/2010/06/18/top-10-stackoverflow-com-flex-contributors/</link>
		<comments>http://www.jamesward.com/2010/06/18/top-10-stackoverflow-com-flex-contributors/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 16:43:34 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1446</guid>
		<description><![CDATA[Back in the day the FlexCoders Yahoo! Group was all the rage. It was the place where Flex rock stars like Alex Harui and Doug McCune hung out and helped the community learn Flex. But these days a lot of developers have turned to StackOverflow.com as their primary resource for getting answers to their technical [...]]]></description>
			<content:encoded><![CDATA[<p>Back in the day the <a href="http://tech.groups.yahoo.com/group/flexcoders/">FlexCoders Yahoo! Group</a> was all the rage.  It was the place where Flex rock stars like <a href="http://blogs.adobe.com/aharui/">Alex Harui</a> and <a href="http://dougmccune.com/blog/">Doug McCune</a> hung out and helped the community learn Flex.  But these days a lot of developers have turned to <a href="http://www.stackoverflow.com">StackOverflow.com</a> as their primary resource for getting answers to their technical questions.  I started using Stack Overflow over a year ago primarily because it makes it easy to follow the conversation around a specific question and quickly identify the right answer.  Stack Overflow totally nails what I need as a developer when I have problems and questions.  Many Flex rock stars have stepped up and frequently answered questions on Stack Overflow and I wanted to highlight the top 10 contributors to <a href="http://stackoverflow.com/questions/tagged?tagnames=flex&#038;sort=newest&#038;pagesize=50">the &#8220;Flex&#8221; tag</a>.</p>
<p>As of June 18, 2010 the top 10 Flex contributors on Stack Overflow (<a href="http://stackoverflow.com/questions/tagged?tagnames=flex&#038;sort=stats&#038;pagesize=50">based on &#8220;All Time&#8221; total score</a>) are:</p>
<table width="100%" style="border-collapse: collapse;">
<tr style="border: 1px solid #000000">
<td><strong style="font-size: 30px">#1</strong></td>
<td style="border-right: 1px solid #000000"><script src="http://stackoverflow.com/users/flair/165297.js" type="text/javascript"></script>Blog: <a href="http://amarghosh.blogspot.com/">http://amarghosh.blogspot.com/</a><br />
Twitter: <a href="http://twitter.com/amrghosh">@amrghosh</a></td>
<td><strong style="font-size: 30px">#2</strong></td>
<td><script src="http://stackoverflow.com/users/flair/41754.js" type="text/javascript"></script>Blog: <a href="http://histos.net/">http://histos.net/</a><br />
Twitter: <a href="http://twitter.com/cliffmeyers">@cliffmeyers</a></td>
</tr>
<tr style="border: 1px solid #000000">
<td><strong style="font-size: 30px">#3</strong></td>
<td style="border-right: 1px solid #000000"><script src="http://stackoverflow.com/users/flair/1109.js" type="text/javascript"></script>Blog: <a href="http://blog.iconara.net/">http://blog.iconara.net/</a></td>
<td><strong style="font-size: 30px">#4</strong></td>
<td><script src="http://stackoverflow.com/users/flair/77409.js" type="text/javascript"></script>Whoot!  That&#8217;s me!<br />
Blog: <a href="http://www.jamesward.com/">http://www.jamesward.com/</a><br />
Twitter: <a href="http://twitter.com/riacowboy">@riacowboy</a></td>
</tr>
<tr style="border: 1px solid #000000">
<td><strong style="font-size: 30px">#5</strong></td>
<td style="border-right: 1px solid #000000"><script src="http://stackoverflow.com/users/flair/32129.js" type="text/javascript"></script>Blog: <a href="http://turbonerd.com/">http://turbonerd.com/</a></td>
<td><strong style="font-size: 30px">#6</strong></td>
<td><script src="http://stackoverflow.com/users/flair/10768.js" type="text/javascript"></script>Blog: <a href="http://joshblog.net/">http://joshblog.net/</a><br />
Twitter: <a href="http://twitter.com/joshtynjala">@joshtynjala</a></td>
</tr>
<tr style="border: 1px solid #000000">
<td><strong style="font-size: 30px">#7</strong></td>
<td style="border-right: 1px solid #000000"><script src="http://stackoverflow.com/users/flair/17255.js" type="text/javascript"></script>Blog: <a href="http://www.herrodius.com/">http://www.herrodius.com/</a><br />
Twitter: <a href="http://twitter.com/herrodius">@herrodius</a></td>
<td><strong style="font-size: 30px">#8</strong></td>
<td><script src="http://stackoverflow.com/users/flair/3603.js" type="text/javascript"></script>Blog: <a href="http://blog.richardszalay.com/">http://blog.richardszalay.com/</a></td>
</tr>
<tr style="border: 1px solid #000000">
<td><strong style="font-size: 30px">#9</strong></td>
<td style="border-right: 1px solid #000000"><script src="http://stackoverflow.com/users/flair/169992.js" type="text/javascript"></script></td>
<td><strong style="font-size: 30px">#10</strong></td>
<td><script src="http://stackoverflow.com/users/flair/271917.js" type="text/javascript"></script></td>
</tr>
</table>
<p>Thanks to everyone who contributes to the Flex community on Stack Overflow!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/06/18/top-10-stackoverflow-com-flex-contributors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex 4, Hibernate 3, and Spring 3 Integration</title>
		<link>http://www.jamesward.com/2010/06/14/flex-4-hibernate-3-and-spring-3-integration/</link>
		<comments>http://www.jamesward.com/2010/06/14/flex-4-hibernate-3-and-spring-3-integration/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 19:58:18 +0000</pubDate>
		<dc:creator>James Ward</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.jamesward.com/?p=1735</guid>
		<description><![CDATA[Jon Rose and I have created a new DZone Refcard called Flex 4 and Spring 3 Integration. In the Refcard, we walk you through the steps for building RIAs with Flash Builder 4, Flex 4, BlazeDS 4, Spring 3, the Spring BlazeDS Integration, and Hibernate. Whew! That&#8217;s a lot of pieces! The Refcard covers simple [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ectropic.com">Jon Rose</a> and I have created a new <a href="http://refcardz.dzone.com/">DZone Refcard</a> called <a href="http://refcardz.dzone.com/refcardz/flex-4-and-spring-3">Flex 4 and Spring 3 Integration</a>.  In the Refcard, we walk you through the steps for building RIAs with Flash Builder 4, Flex 4, BlazeDS 4, Spring 3, the Spring BlazeDS Integration, and Hibernate.  Whew!  That&#8217;s a lot of pieces!  The Refcard covers simple Remoting, Flex &#038; Hibernate integration through Spring (all Java annotation driven and using the new data-centric development features in Flash Builder 4), Pub / Sub Messaging, and Flex and Spring Security.  We pack a lot into six pages!</p>
<p>If you want to see recorded presentations / screencasts of some of these things check out:</p>
<ul>
<li><a href="http://seminars.adobe.acrobat.com/p31679079/">What&#8217;s new in Flash Builder 4 for Java Developers</a></li>
<li><a href="http://www.jamesward.com/2010/01/11/flash-builder-4-data-wizards-with-java-spring/">Flash Builder 4 Data Wizards with Java / Spring</a></li>
<li><a href="http://www.jamesward.com/2010/01/17/flex-4-and-java-spring-hibernate-in-flash-builder-4/">Flex 4, Java, Spring, and Hibernate in Flash Builder 4</a></li>
</ul>
<p>I hope all of this is helpful.  Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesward.com/2010/06/14/flex-4-hibernate-3-and-spring-3-integration/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
