<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>explorers' club</title>
	<atom:link href="http://jwopitz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jwopitz.wordpress.com</link>
	<description>actionscript, flex, flash and other fun stuff</description>
	<pubDate>Fri, 18 Jul 2008 19:22:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Conditionally Colored Flex Charts - simplified</title>
		<link>http://jwopitz.wordpress.com/2008/07/14/conditionally-colored-flex-charts-simplified/</link>
		<comments>http://jwopitz.wordpress.com/2008/07/14/conditionally-colored-flex-charts-simplified/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 17:06:23 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[actionScript]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=184</guid>
		<description><![CDATA[[Another quick note to myself]
I have always thought of flex developers as being categorized in two camps (at least this has been my experience).  You have the:

those who focus on mostly Flex charting and
those who focus on everything but Flex charting.

I fall into the latter category.  I just never decided to look into charts.  Everytime [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>[Another quick note to myself]</p>
<p>I have always thought of flex developers as being categorized in two camps (at least this has been my experience).  You have the:</p>
<ul>
<li>those who focus on mostly Flex charting and</li>
<li>those who focus on everything but Flex charting.</li>
</ul>
<p>I fall into the latter category.  I just never decided to look into charts.  Everytime I would take a peek at the API I would just shake my head in confusion and focus on other tasks.  Why learn something new today that you can put off till tomorrow (or however that saying goes).  Well a client wants charts and I am the only Flex developer on the project.</p>
<p>Here is a basic breakdown of what the UI is expected to have:</p>
<ul>
<li>comparative data showing columns, each column representing an individual item of like-type.</li>
<li>unique colors per item.</li>
<li>color will also indicate some status compared to a benchmark indicator.</li>
</ul>
<p>The idea is to achieve something like this:</p>
<p><img class="alignnone size-medium wp-image-185" src="http://jwopitz.files.wordpress.com/2008/07/picture-1.png?w=300&h=293" alt="" width="300" height="293" /></p>
<p>Whoo hoo, big deal.  Just another column chart.  Anywho&#8230;. so the issue was I was trying to find a way to easily color the columns based on certain conditions ergo a conditionally colored column chart.</p>
<p>I ran across this post (<a href="http://techrageo.us/2008/02/20/conditionally-colored-flex-charts/" target="_blank"><strong><span style="text-decoration:underline;">link</span></strong></a>) where someone had created a ChartItemRenderer subclass.  It seems to work brilliantly, but I had to question if there was not some simpler means to do so.  After much poking around I did indeed find it.  Check out mx:ColumnSeries.fillFunction (<strong><span style="text-decoration:underline;"><a href="http://livedocs.adobe.com/flex/3/langref/mx/charts/series/ColumnSeries.html#fillFunction" target="_blank">link</a></span></strong>).</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/184/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/184/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=184&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/07/14/conditionally-colored-flex-charts-simplified/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>

		<media:content url="http://jwopitz.files.wordpress.com/2008/07/picture-1.png?w=300" medium="image" />
	</item>
		<item>
		<title>Silly Adobe&#8230;don&#8217;t you know? private means private</title>
		<link>http://jwopitz.wordpress.com/2008/07/01/silly-adobedont-you-know-private-means-private/</link>
		<comments>http://jwopitz.wordpress.com/2008/07/01/silly-adobedont-you-know-private-means-private/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 12:40:35 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[actionScript]]></category>

		<category><![CDATA[components]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=182</guid>
		<description><![CDATA[Doing component development is a challenging task, especially if you are trying to stick within the guidelines established by the MX framework.  So frustrating is this challenge sometimes, it makes you want to tear clumps of hair from your scalp.
I found this while digging around trying to extend mx:ComboBox:
/**
     *  [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Doing component development is a challenging task, especially if you are trying to stick within the guidelines established by the MX framework.  So frustrating is this challenge sometimes, it makes you want to tear clumps of hair from your scalp.</p>
<p>I found this while digging around trying to extend mx:ComboBox:</p>
<pre>/**
     *  @private
     */
    private function displayDropdown(show:Boolean, trigger:Event = null):void
    {
        if (!initialized || show == _showingDropdown)
            return;

        // Subclasses may extend to do pre-processing
        // before the dropdown is displayed
        // or override to implement special display behavior</pre>
<p>Silly Adobe indeed.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/182/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/182/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=182&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/07/01/silly-adobedont-you-know-private-means-private/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>Cool Tool: Salary Calculator</title>
		<link>http://jwopitz.wordpress.com/2008/05/18/cool-tool-for-answering-the-hard-questions/</link>
		<comments>http://jwopitz.wordpress.com/2008/05/18/cool-tool-for-answering-the-hard-questions/#comments</comments>
		<pubDate>Sun, 18 May 2008 23:16:09 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[contracting]]></category>

		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=177</guid>
		<description><![CDATA[Since being on the hunt for my next gig, I have been asked several hard questions by recruiters and clients.  The question: &#8220;What kind of salary/rate are you looking for?&#8221;  Now any consultant conducting interviews knows the inevitability of that question.  And it should be addressed sooner rather than later.
The problem in [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Since being on the hunt for my next gig, I have been asked several hard questions by recruiters and clients.  The question: &#8220;What kind of salary/rate are you looking for?&#8221;  Now any consultant conducting interviews knows the inevitability of that question.  And it should be addressed sooner rather than later.</p>
<p>The problem in answering that question is not knowing what kind of figure to give.  Obviously you don&#8217;t want to low-ball yourself and giving a number too high can scare folks away.  So I won&#8217;t belabor the point any further.  Check out the <strong>salary calculator</strong> over at Simply Hired - <a href="http://www.simplyhired.com/a/salary/home" target="_blank"><span style="text-decoration:underline;">link</span></a></p>
<p>Want to know what the average salary of a Senior Flex Developer in Dallas, TX is? Plug it in.  Now get this: Simply adding th keyword &#8216;Adobe&#8217; in the search parameters gives a significant jump in salary.  So this may not be the best tool for zoning in on a specific number, but it will give you enough info to get some sort of range to play with.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/177/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/177/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=177&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/05/18/cool-tool-for-answering-the-hard-questions/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>Leopard update for Java 1.6 finally out</title>
		<link>http://jwopitz.wordpress.com/2008/05/13/leopard-update-for-java-16-finally-out/</link>
		<comments>http://jwopitz.wordpress.com/2008/05/13/leopard-update-for-java-16-finally-out/#comments</comments>
		<pubDate>Tue, 13 May 2008 17:11:50 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=176</guid>
		<description><![CDATA[Check out the info here - link
Also here are some tips for installing multiple versions - link
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Check out the info here - <span style="text-decoration:underline;"><a href="http://support.apple.com/kb/HT1856" target="_blank">link</a></span></p>
<p>Also here are some tips for installing multiple versions - <a href="http://developer.apple.com/java/javaleopard.html" target="_blank"><span style="text-decoration:underline;">link</span></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/176/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/176/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=176&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/05/13/leopard-update-for-java-16-finally-out/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: AppCoreLib&#8217;s XMLDataBroker, mock XML data &#38; Cairngorm</title>
		<link>http://jwopitz.wordpress.com/2008/05/12/tutorial-appcorelibs-xmldatabroker-mock-xml-data-cairngorm/</link>
		<comments>http://jwopitz.wordpress.com/2008/05/12/tutorial-appcorelibs-xmldatabroker-mock-xml-data-cairngorm/#comments</comments>
		<pubDate>Mon, 12 May 2008 18:46:40 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[actionScript]]></category>

		<category><![CDATA[appCoreLib]]></category>

		<category><![CDATA[cairngorm]]></category>

		<category><![CDATA[client side]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[server side]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=175</guid>
		<description><![CDATA[The potential of Flex for rapid prototyping and general application development is amazingly fast.  With some mock data and a basic user-experience (UX) scenario, a developer can create a functioning sample application in a matter of minutes.
If you are developing either a full blown RIA or a prototype application then you have probably at [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The potential of Flex for rapid prototyping and general application development is amazingly fast.  With some mock data and a basic user-experience (UX) scenario, a developer can create a functioning sample application in a matter of minutes.</p>
<p>If you are developing either a full blown RIA or a prototype application then you have probably at least heard of Cairngorm.  If not, familiarize yourself with the basics here - <span style="text-decoration:underline;"><a href="http://labs.adobe.com/wiki/index.php/Cairngorm" target="_blank">link</a></span>.  I use a stripped down version of it for almost every project I have worked on.  It works beautifully</p>
<p>I plan to show you an example of using <span style="text-decoration:underline;"><a href="http://code.google.com/p/appcorelib/" target="_blank">AppCoreLib</a></span>&#8217;s <span style="text-decoration:underline;"><a href="http://appcorelib.googlecode.com/svn/trunk/asdoc/appCoreLib/business/XMLDataBroker.html" target="_blank">XMLDataBroker</a></span> to fill in some mock XML data for your commands.  This is helpful when you have a basic idea of an API/services but they are not returning anything or not ready to be tapped or you wanna test out a service&#8217;s result format before the server developers implement it.</p>
<p>Before I continue, let&#8217;s set one or two rules about this tutorial.</p>
<ul>
<li>the expected format for the returned data is XML</li>
<li>the mock XML data format will reflect the same format of the actual service&#8217;s result</li>
</ul>
<p>Firstly let&#8217;s take a look at a basic Cairngorm command.  This is a stripped down version so you won&#8217;t see any delegate-type references in here.</p>
<pre><code>package com.foo.controller.commands
{
    import com.adobe.cairngorm.commands.ICommand;
    import com.adobe.cairngorm.control.CairngormEvent;
    import com.foo.business.Services;

    import mx.rpc.AsyncToken;
    import mx.rpc.IResponder;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.http.HTTPService;

    public class SampleCairngormCommand implements ICommand, IResponder
    {
        private var _vo:Object = {};

        public function execute (event:CairngormEvent):void
        {
            var call:HTTPService = Services.getInstance().httpService;
            call.url = "http://www.foo.com/someService";

            var param:Object = {};

            var token:AsyncToken = call.send(param);
            token.addResponder(this);
        }

        public function result (data:Object):void
        {
            var xmlResult:XML = ResultEvent(data).result as XML;
        }

        public function fault (info:Object):void
        {
        }

    }
}</code></pre>
<p>So now with about 5 lines of code, I will show you how to inject mock XML data for creating a response that fits within the Cairngorm command structure:</p>
<pre><code>package com.foo.controller.commands
{
    import appCoreLib.business.XMLDataBroker;
    import appCoreLib.events.XMLLoadEvent;

    import com.adobe.cairngorm.commands.ICommand;
    import com.adobe.cairngorm.control.CairngormEvent;

    import mx.rpc.IResponder;

    public class SampleCairngormCommand implements ICommand, IResponder
    {
        public function execute (event:CairngormEvent):void
        {
            var x:XMLDataBroker = new XMLDataBroker();
            x.addEventListener(XMLLoadEvent.XML_LOAD_SUCCESS, result);
            x.addEventListener(XMLLoadEvent.XML_LOAD_FAILURE, fault);
            x.loadXML("assets/xml/someMockXMLData.xml");

            /* var call:HTTPService = Services.getInstance().httpService;
            call.url = "http://www.foo.com/someService";

            var param:Object = {};

            var token:AsyncToken = call.send(param);
            token.addResponder(this); */
        }

        public function result (data:Object):void
        {
            var xmlResult:XML = XMLLoadEvent(data).xml;
            //var xmlResult:XML = ResultEvent(data).result as XML;
        }

        public function fault (info:Object):void
        {
        }
    }
}</code></pre>
<p>That&#8217;s it! Simple, effective and most importantly, easy to remove once an actual service response is available.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/175/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/175/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=175&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/05/12/tutorial-appcorelibs-xmldatabroker-mock-xml-data-cairngorm/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>So begins another hunt</title>
		<link>http://jwopitz.wordpress.com/2008/05/08/so-begins-another-hunt/</link>
		<comments>http://jwopitz.wordpress.com/2008/05/08/so-begins-another-hunt/#comments</comments>
		<pubDate>Thu, 08 May 2008 16:58:03 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[actionScript]]></category>

		<category><![CDATA[client side]]></category>

		<category><![CDATA[contracting]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=172</guid>
		<description><![CDATA[It looks like I am on the hunt yet again.  So goes the life of a flex consultant.  Anyhow, here is what I am in the market for for my next gig:

senior flex consultant role
After working on the Speakerheart project, I have really come to love the more architectural aspects about projects.  [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It looks like I am on the hunt yet again.  So goes the life of a flex consultant.  Anyhow, here is what I am in the market for for my next gig:</p>
<ul>
<li><strong><span style="text-decoration:underline;">senior flex consultant role</span><br />
</strong>After working on the Speakerheart project, I have really come to love the more architectural aspects about projects.  That is not to say I don&#8217;t love coding, because I do, but I really like some of the bigger-picture thinking involved with the overall structuring of a Flex client and the API.   Also I am not opposed to becoming an employee for a company, but it has to feel right.</li>
<li><strong><span style="text-decoration:underline;">open to primarily telecommuting w/ occasional on-site work</span><br />
</strong>Gas is going to hit $4 pretty soon.  So commuting to/fro work is getting more and more expensive.  Also, in this day and age, there is no reason why a client/project/employer wouldn&#8217;t be open to telecommuting w/ occasional on-site time.  I have been doing it 99% of the last 6+ months with very little hangups, if any.  Skype, IM, email, and a regular ol&#8217; phone facilitate telecommuting and they are all part of my arsenal of tools as a consultant.</li>
<li><strong><span style="text-decoration:underline;">small team/small company</span><br />
</strong>I have worked both big and small teams for both small and big companies.  I certainly like the feel of a smaller team as you get that &#8220;team&#8221; feeling where you feel the effects of your contributions.  Bigger teams seem to diminish that feeling greatly.  Also bigger teams introduce the whole &#8220;too many cooks in the kitchen&#8221; effect and coding consistency starts to waver.  A team with 2-3 flex developers with one of them being the client-side lead is perfect.</li>
<li><strong><span style="text-decoration:underline;">implements Agile-ish methodology</span><br />
</strong>Agile-ish development methodologies are great for a number of reasons but the one I find myself liking more and more is that it keeps people accountable and honest.  It also provides the structure necessary to keep communication up and running which is of prime importance when telecommuting.</li>
<li><span style="text-decoration:underline;"><strong>user experience-driven development vs. design-driven development</strong></span><br />
Its amazing how something so cool looking can really fail at providing a simple user experience.  All the flash and pizzaz in the world won&#8217;t make a simple user experience any simpler.  In fact, it will probably complicate things.  UX driven development means that design has taken a back seat to the practicality of a particular experience.  It also means that enough thought went into the task at hand to know that no matter what kind of fancy rims and spinners you have on your wheel, its still just a wheel that goes round and round.</li>
<li><strong><span style="text-decoration:underline;">new project as opposed to an existing project</span><br />
</strong>I have worked on my fair share of other people&#8217;s bugs and spaghetti code.  Yes, every project has these aspects (well maybe the former, hopefully not the latter).  At this point in my career, I am ready to help build a new project with a great team, to rethink a web application or user experience, to start something fresh and do it right the first time</li>
<li><span style="text-decoration:underline;"><strong>pragmatist vs. zealots</strong></span><br />
I really like working with like-minded people.  I am a pretty down to earth, pragmatic guy.  I have some beliefs but I am not too closed minded not to hear another take on a subject.  Just be prepared to answer WHY when asked.  I ask lots of questions and generally I question the status quo if not just to keep us all thinking.  I am an agile, flex, flash, as3, cairngorm, oop, remoting, crud, and rest-pragmatist.  I see the value in the old ways but I am not beyond questioning if there is a better way of doing it.</li>
<li><strong><span style="text-decoration:underline;">and the rest</span></strong><br />
In case you are wondering&#8230;</p>
<ul>
<li>ActionScript 3 only</li>
<li>Flex Builder 2 &amp; 3 only</li>
<li>I hate WSDLs</li>
<li>Flash gigs are cool but I really wanna do it in code, not the timelin</li>
</ul>
</li>
</ul>
<p>So there you have it.  That is kinda the basics for what I am looking for for my next gig.  If any of you folks knows of someone or something that looks like a good fit, send em my way.  If you need a copy of my resume, download it from here - <span style="text-decoration:underline;"><a href="http://jwopitz.wordpress.com/resume">link</a></span></p>
<p>Alrighty then.  Later.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/172/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/172/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=172&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/05/08/so-begins-another-hunt/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>Cool Stuff: going back to nature for technological guidance</title>
		<link>http://jwopitz.wordpress.com/2008/04/30/cool-stuff-going-back-to-nature-for-technological-guidance/</link>
		<comments>http://jwopitz.wordpress.com/2008/04/30/cool-stuff-going-back-to-nature-for-technological-guidance/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 14:37:45 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[robotics]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=170</guid>
		<description><![CDATA[Robotics just amazes me.  The potential to create assistive devices to make life for the disabled easier, or to make dangerous jobs safer, that is the real payoff.   It also scares the hell out of me.  Terminator and iRobot are certainly plausible in the abstract sense of self-aware robots.  But I digress
Festo, a German [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Robotics just amazes me.  The potential to create assistive devices to make life for the disabled easier, or to make dangerous jobs safer, that is the real payoff.   It also scares the hell out of me.  Terminator and iRobot are certainly plausible in the abstract sense of self-aware robots.  But I digress</p>
<p>Festo, a German company, has been toying around with robotics for awhile now.  And it seems they are going in the right direction by using dear ol&#8217; Mother Nature as the model for some of their experiments.  Check out their robotics section on their website - <a href="http://www.festo.com/cms/de_de/4981.htm" target="_blank">link</a></p>
<p>If you wanna read about their projects and can&#8217;t read German, each little project has a PDF brochure in English.  Nothing too technical but it does give a cursory explanation of the mechanics behind most of the projects.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/170/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/170/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=170&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/04/30/cool-stuff-going-back-to-nature-for-technological-guidance/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: handling service validation errors &#38; cairngorm - part 3</title>
		<link>http://jwopitz.wordpress.com/2008/04/25/tutorial-handling-service-validation-errors-cairngorm-part-3/</link>
		<comments>http://jwopitz.wordpress.com/2008/04/25/tutorial-handling-service-validation-errors-cairngorm-part-3/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 20:52:36 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[actionScript]]></category>

		<category><![CDATA[cairngorm]]></category>

		<category><![CDATA[client side]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[server side]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=169</guid>
		<description><![CDATA[recap
Last time we discussed two methods for handling service validation errors in a Cairngorm application.  The first method was to borrow from some AS2/ARP techniques by passing a reference.  The second method was to leverage the event nature of Flex and use a central event dispatcher type approach.  Both of these have [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>recap</h2>
<p>Last time we discussed two methods for handling service validation errors in a Cairngorm application.  The <a href="http://jwopitz.wordpress.com/2008/04/24/tutorial-handling-service-validation-errors-cairngorm/" target="_self"><span style="text-decoration:underline;">first method</span></a> was to borrow from some AS2/ARP techniques by passing a reference.  The <a href="http://jwopitz.wordpress.com/2008/04/25/tutorial-handling-service-validation-errors-cairngorm-part-2/" target="_self"><span style="text-decoration:underline;">second method</span></a> was to leverage the event nature of Flex and use a central event dispatcher type approach.  Both of these have their advantages and certainly have their disadvantages.  This last approach will try to take the best from both worlds and combine them to alleviate some of the problems we encountered.</p>
<h2>ServiceValidationErrorManager method</h2>
<p>Again you will have to pardon the names here but this gets the point across.  There is no doubt what this puppy does.  For the sake of simplicity I will continue to call it &#8220;the manager&#8221;.  Ok so the manager is a) a Singleton-type class and b) has at its root a property called currentClient.  Here&#8217;s a peek:</p>
<pre><code>pacakge com.foo.managers
{
     public class ServiceValidationErrorManager
     {
         public var currentClient:IServiceValidationClient;
         static private var _instance:ServiceValidationErrorManager;
         static public function getInstance (){}//you get the idea....
     }
}</code></pre>
<p>The idea is pretty much the same as the first method in that our views serve as the IServiceValidationClient.  When dispatching a Cairngorm event we register the client with the manager class (if applicable).  Basically that is achieved by:</p>
<pre><code>ServiceValidationErrorManager.getInstance().currentClient = this; //the view/implementor</code></pre>
<p>So this fixes issues from the other two methods.  Firstly it eliminates the need to pass the view to the command.  Secondly it doesn&#8217;t get us tangled up in all these IEventDispatcher methods.</p>
<p>Now upon a response that has some validation errors, we can simply say:</p>
<pre><code>ServiceValidationErrorManager.getInstance().currentClient.handleValidationErrors();</code></pre>
<p>The other nice thing is that we needn&#8217;t really worry about garbage collection because we&#8217;re only dealing with one property on one class.  It gets overwritten when needed.  Now you may be asking why use a separate manager type class.  Well you may want to have some logic in there for various things including queuing the views, and other crap I can&#8217;t think of right now.</p>
<h2>summary</h2>
<p>This could easily be adapted to a preexisting singleton model so you can reduce the need for the additional class.  You just gotta remember its there.  Also, even though you needn&#8217;t clear out the property on the manager, it does make good practice.  Having a manager class allows you to do just that: manage validation errors appropriately.  Of course this might be a grotesque oversimplification of a very serious need, you get the gist of the idea.</p>
<p>pros:</p>
<ul>
<li>OOP</li>
<li>negates the use of IEventDispatcher logic in both view and command</li>
<li>provides a centralized place to handle more robust registration for error handling</li>
</ul>
<p>cons:</p>
<ul>
<li>adds another class</li>
<li>still doesn&#8217;t address timing issue, unless you implement some queuing mechanism in the manager when setting the current client</li>
<li>not as elegantly simple as method one</li>
</ul>
<p>That&#8217;s it folks.  3 very ugly solutions to an ugly problem.  Chime in and let me know how you do it.  Thanks.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/169/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/169/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=169&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/04/25/tutorial-handling-service-validation-errors-cairngorm-part-3/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: handling service validation errors &#38; cairngorm - part 2</title>
		<link>http://jwopitz.wordpress.com/2008/04/25/tutorial-handling-service-validation-errors-cairngorm-part-2/</link>
		<comments>http://jwopitz.wordpress.com/2008/04/25/tutorial-handling-service-validation-errors-cairngorm-part-2/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 18:52:44 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[actionScript]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[server side]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=168</guid>
		<description><![CDATA[recap
So last we left off we had discussed the reference method for passing info back and forth to the relevant view notifying the user about needed data changes.  If you need a refresher check part 1. This next way of handling service validation errors is very simple, however it requires a bit more work.
central [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>recap</h2>
<p>So last we left off we had discussed the reference method for passing info back and forth to the relevant view notifying the user about needed data changes.  If you need a refresher check <a href="http://jwopitz.wordpress.com/2008/04/24/tutorial-handling-service-validation-errors-cairngorm/" target="_self"><span style="text-decoration:underline;">part 1.</span></a> This next way of handling service validation errors is very simple, however it requires a bit more work.</p>
<h2>central event dispatcher method</h2>
<p>This method requires two additional classes which we will call something like ServiceValidationEventDispatcher &amp; ServiceValidationErrorEvent.  I am not too good at naming things off the top of my head so feel free to lay into me on this one.  The point is this:  We want a globally accessible IEventDispatcher class we can tap into from both the views and the commands.  And we want an event that we can attach some data to in order to pass it back.  The SVED is pretty straight forward so I won&#8217;t create that here.  Just know its an IEventDispatcher and I would make it a Singleton-type class.  The new event class should probably look kinda like this:</p>
<pre><code>package com.foo.events
{
     public class ServiceValidationErrorEvent extends Event
     {
          static public const SERVICE_VALIDATION_ERRORS:String = "serviceValidationErrors";

          public var errors:Array = [];
     }
}</code></pre>
<h2>hooking it up</h2>
<p>We are hanging onto the interface from part 1 but we&#8217;re gonna modify it for this particular implementation.  Instead of the passing the array to the handleValidationErrors, we are gonna pass it a ServiceValidationErrorEvent as the parameter.</p>
<p>Another change we do is instead of passing the view as a value on the Cairngorm event, we will tell the ServiceValidationEventDispatcher instance to register our handleValidationError method for the ServiceValidationErrorEvent:</p>
<pre><code>ServiceValidationEventDispatcher.getInstance().addEventListener(ServiceValidationErrorEvent.SERVICE_VALIDATION_ERRORS, handleValidationError);</code></pre>
<p>Now at this point we have a few choices.  We need to make sure that we are doing our best to preserve memory and garbage collection.  One way is to use a weakReference when adding the event handler.  I am not a fan of this because a) we cannot control garbage collection and b) it leaves too many doors open for timing issues.</p>
<p>Another means would be to make sure that we always trigger the handleValidationError method on our view, checking the errors array&#8217;s length.  For one reason we will be removing the event handler from the SVED.  But this means then we always have to trigger it from the SVED within the command regardless of the response&#8217;s success.  The other way would be to have yet another handler on the view for successful validation so that you can go ahead and remove the handler.  This means fattening up our interface.  There are so many little things you could do here, but the main purpose is that we are using events to trigger out handlers rather than direct triggering via a reference.</p>
<h2>summary</h2>
<p>I really don&#8217;t dig this implementation because it adds more classes and more crap to remember to do.  But here is a pro/con list for this method:</p>
<p>pros:</p>
<ul>
<li>better OOP than the ref method</li>
<li>decouples the view from the command</li>
<li>leverages the event driven nature of the flash player</li>
</ul>
<p>cons:</p>
<ul>
<li>adds additional weight to your project</li>
<li>prone to timing issues</li>
<li>more stuff to remember to do</li>
</ul>
<p>Ok so part 3 is coming next.  It will basically be a blending of the two previous methods.  See ya then</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/168/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/168/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=168&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/04/25/tutorial-handling-service-validation-errors-cairngorm-part-2/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: handling service validation errors &#38; cairngorm</title>
		<link>http://jwopitz.wordpress.com/2008/04/24/tutorial-handling-service-validation-errors-cairngorm/</link>
		<comments>http://jwopitz.wordpress.com/2008/04/24/tutorial-handling-service-validation-errors-cairngorm/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 21:45:35 +0000</pubDate>
		<dc:creator>jwopitz</dc:creator>
		
		<category><![CDATA[actionScript]]></category>

		<category><![CDATA[cairngorm]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://jwopitz.wordpress.com/?p=167</guid>
		<description><![CDATA[client-side validation
In general validation takes place in two places within a RIA: the client and the services.  Generally when creating a services-enabled flex application, you try to validate some of that data on the client.  For instance, you want to check for necessary data (e.g. required form fields) and properly formed data (e.g. [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>client-side validation</h2>
<p>In general validation takes place in two places within a RIA: the client and the services.  Generally when creating a services-enabled flex application, you try to validate some of that data on the client.  For instance, you want to check for necessary data (e.g. required form fields) and properly formed data (e.g. making sure an email address has the @ sign and a domain).  This is what I call client-side validation.  So what do I mean by &#8220;service validation errors&#8221;?</p>
<h2>service validation</h2>
<p>Let&#8217;s use the example of sending some registration data to a service.  We the flex client have already validated the data and send it off.  So let us assume we are sending a user name, password and email address.  Obviously we want our user name to be unique and the flex client hasn&#8217;t a way to determine this.  Instead it relies on some registration service to check for the uniqueness of the data being sent.  Ok, let&#8217;s assume now that we have sent something that is already being used by another user.  This is service validation (it may be called something entirely different which I am ignorant of, but this is what I call it for now).  Now if you have a good system in place, you will want to get some data associated with the registration error that just occurred.  So now that we are on the same page about the high level validation stuff let&#8217;s get a closer view in handling it in an application that uses Cairngorm</p>
<h2>user experience ground rules</h2>
<p>Firstly I am going to set some ground rules for an application.  We are going to assume that any view whose data requires a service and validation response will prompt further user input within itself.  So no popups/Alerts on top of some registration popup/view.  Why not?  Well these solutions came about from my client&#8217;s user experience design that doesn&#8217;t allow for such simple solutions.  Plus it would negate the whole purpose of my posting <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>under-the-hood-process</h2>
<ol>
<li>user enters data requiring validation</li>
<li>client-side validation occurs (assume it passes)</li>
<li>Cairngorm event dispatches with data</li>
<li>command (I am scrapping delegates for the sake of simplicity) process sends out and awaits reponse</li>
<li>service validation errors come back with response necessitating changes to data</li>
<li>command needs to notify someone that data needs to be corrected</li>
</ol>
<h2>method one: referencing</h2>
<p>For the OOP purist out there, this might not settle well.  It certainly did not settle well with me.  But it&#8217;s a pragmatic approach with very few pitfalls attached.  For those familiar with AS2 and ARP this will be very familiar.</p>
<p>Firstly we need to establish some sort of protocol for handling the service validation errors coming back.  A very simple and forceful solution would be to use an interface.  Let&#8217;s call it <em>IServiceValidationClient</em>.  Yeah that sucks but it gets the point across.  Here is a glimpse of that interface:</p>
<pre><code>package com.foo.validation
{
	public interface IServiceValidationClient
	{
		function handleValidationErrors (errors:Array):void;
	}
}</code></pre>
<p>Our view will implement this interface.  Now to make use of it.  We need pass a reference of this implementor along with the call.  Depending how hairy your application is, you may have tons of custom CairngormEvent subclasses.  For simplicity, I will just use a basic subclass called FooEvent.  It looks like this:</p>
<pre><code>package com.foo.events
{
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.adobe.cairngorm.vo.IValueObject;
	import com.foo.ui.IServiceValidationClient;

	import flash.events.Event;

	public class FooEvent extends CairngormEvent
	{
		public var vo:IValueObject;
		public var serviceValidationClient:IServiceValidationClient;

		public function FooEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
		{
			super(type, bubbles, cancelable);
		}

		override public function clone ():Event
		{
			var evt:FooEvent = new FooEvent(type, bubbles, cancelable);
			evt.vo = vo;
			evt.serviceValidationClient = serviceValidationClient;

			return evt;
		}
	}
}</code></pre>
<p>So before we dispatch the FooEvent, we just say:</p>
<pre><code>var evt:FooEvent = new FooEvent("doRegistrationDude");
evt.vo /* = the value object you should have assembled from the view's inputs */
evt.serviceValidationClient = this;</code></pre>
<p>Ok, so at this point we are now dealing with the command.  Upon execution, you need to store an instance level reference to the event.serviceValidationClient.  This way you can grab it upon the response.  If there happens to be an issue with the response, assuming you have standardized the errors somehow, you just grab that reference again and say:</p>
<pre><code>serviceValidationClient.handleValidationErrors(errors);</code></pre>
<p>Now there is one thing left to do.  And this is very important.  You need to do some clean up after you have utilized the response data.  In this call you to make the command&#8217;s ref to the view null again or it will not get garbage collected.</p>
<pre><code>serviceValidationClient = null;</code></pre>
<h2>Summary</h2>
<p>pros:</p>
<ul>
<li>simple implementation</li>
<li>provides an interface for standardization of error handling</li>
<li>requires very little in additional coding/classes</li>
<li>not highly coupled</li>
</ul>
<p>cons:</p>
<ul>
<li>not very OOP</li>
<li>requires that you remember to implement the interface</li>
<li>requires garbage collection clean up</li>
</ul>
<p>Ok so that is method one.  I will post the other two methods in separate posts so as to make a short read of them.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwopitz.wordpress.com/167/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwopitz.wordpress.com/167/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwopitz.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwopitz.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwopitz.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwopitz.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwopitz.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwopitz.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwopitz.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwopitz.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwopitz.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwopitz.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwopitz.wordpress.com&blog=506032&post=167&subd=jwopitz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwopitz.wordpress.com/2008/04/24/tutorial-handling-service-validation-errors-cairngorm/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/jwopitz-128.jpg" medium="image">
			<media:title type="html">jwopitz</media:title>
		</media:content>
	</item>
	</channel>
</rss>