<?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>rialvalue.com &#187; General</title>
	<atom:link href="http://www.rialvalue.com/blog/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rialvalue.com/blog</link>
	<description>No Flex No Fun</description>
	<lastBuildDate>Fri, 04 Feb 2011 08:09:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Slides for &#8220;FlexPMD, Your Canary in a Coal Mine&#8221;</title>
		<link>http://www.rialvalue.com/blog/2010/10/28/slides-for-flexpmd-your-canary-in-a-coal-mine/</link>
		<comments>http://www.rialvalue.com/blog/2010/10/28/slides-for-flexpmd-your-canary-in-a-coal-mine/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 16:45:15 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[flexpmd]]></category>
		<category><![CDATA[presentations]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=254</guid>
		<description><![CDATA[Here are the slides and the recording of the presentation Xavier and I presented at MAX this year on FlexPMD and code quality. I hope you enjoyed the presentation!
Watch the recording.
Max  flash based code quality  is there a canary in your coal mine-
View more presentations from Xavier Agnetti.

]]></description>
			<content:encoded><![CDATA[<p>Here are the slides and the recording of the presentation <a href="http://blogs.adobe.com/xagnetti/">Xavier</a> and I presented at MAX this year on FlexPMD and code quality. I hope you enjoyed the presentation!</p>
<p><a href="http://2010.max.adobe.com/online/2010/MAX267_1288282798346JWEW">Watch the recording.</a></p>
<div style="width:425px" id="__ss_5597259"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/xagnetti/max-flash-based-code-quality-is-there-a-canary-in-your-coal-mine" title="Max  flash based code quality  is there a canary in your coal mine-">Max  flash based code quality  is there a canary in your coal mine-</a></strong><object id="__sse5597259" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=max-flashbasedcodequalityisthereacanaryinyourcoalmine-101028111053-phpapp01&#038;stripped_title=max-flash-based-code-quality-is-there-a-canary-in-your-coal-mine&#038;userName=xagnetti" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse5597259" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=max-flashbasedcodequalityisthereacanaryinyourcoalmine-101028111053-phpapp01&#038;stripped_title=max-flash-based-code-quality-is-there-a-canary-in-your-coal-mine&#038;userName=xagnetti" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/xagnetti">Xavier Agnetti</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/10/28/slides-for-flexpmd-your-canary-in-a-coal-mine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Global Exception or Error Handling in Flex</title>
		<link>http://www.rialvalue.com/blog/2010/05/13/global-exception-or-error-handling-in-flex/</link>
		<comments>http://www.rialvalue.com/blog/2010/05/13/global-exception-or-error-handling-in-flex/#comments</comments>
		<pubDate>Thu, 13 May 2010 09:08:52 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[mixin]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=207</guid>
		<description><![CDATA[In this post I explain how you can catch unhandled exceptions or errors globally in a declarative mxml-based way using the [Mixin] flex-specific metadata tag.
Starting on FP 10.1 and AIR 2.0 you can capture unhandled exceptions or errors globally. Although you can use these new APIs you should always take care of the exceptions where [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I explain how you can catch unhandled exceptions or errors globally in a declarative mxml-based way using the [Mixin] flex-specific metadata tag.</p>
<p>Starting on FP 10.1 and AIR 2.0 you can capture unhandled exceptions or errors globally. Although you can use these new APIs you should <b>always</b> take care of the exceptions where they happen and use this technique only as a diagnosing or logging help or for async exceptions that you can&#8217;t really control in any other way. </p>
<p>You might also be interested in these 2 other topics:</p>
<ul>
<li><a href="http://www.rialvalue.com/blog/2009/08/25/logging-and-catching-exceptions-during-invalidation/">Logging and catching (async) exceptions during invalidation in Flex</a></li>
<li><a href="http://www.rialvalue.com/blog/2009/08/16/debugging-production-ready-air-applications/">Debugging and getting Stack-trace error dialogs with installed AIR applications</a></li>
</ul>
<p>The new API works like:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span>uncaughtErrorEvents<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>UncaughtErrorEvent<span style="color: #000066; font-weight: bold;">.</span>UNCAUGHT_ERROR<span style="color: #000066; font-weight: bold;">,</span> onUncaughtError<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onUncaughtError<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>UncaughtErrorEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Do something with your error.</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p><a href="http://blogs.adobe.com/cantrell/archives/2009/10/global_error_handling_in_air_20.html">Christian Cantrell explains some more details on the APIs</a>. You can find further information <a href="http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/events/UncaughtErrorEvent.html">in the documentation</a> as well.</p>
<p>When working with Flex, and adding the UncaughtErrorEvent.UNCAUGHT_ERROR listener to the loaderInfo object make sure you do it after FlexEvent.APPLICATION_COMPLETE event has been triggered, otherwise you&#8217;ll get an &#8220;Error #1009: Cannot access a property or method of a null object reference&#8221;</p>
<p>To prevent all this required glue code and avoid unnecessary configuration code (that ends up cluttering the main application Class) I&#8217;ve created a GlobalExceptionHandler component that abstracts developers a little bit from these sort of problems. The implementation isn&#8217;t tighted to the APPLICATION_COMPLETE event, instead it uses the [Mixin] metadata tag. On top of that you can use it declaratively:</p>
<div class="codecolorer-container xml mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:WindowedApplication</span> <span style="color: #000066;">xmlns:fx</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:logging</span>=<span style="color: #ff0000;">&quot;com.adobe.ac.logging.*&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fx:Declarations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;logging:GlobalExceptionHandler</span> <span style="color: #000066;">preventDefault</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;logging:LogHandlerAction</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;local:TraceHandlerAction</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/logging:GlobalExceptionHandler<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fx:Declarations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:WindowedApplication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>You can <a href="http://www.rialvalue.com/downloads/globalExceptionHandler.zip">download the code along with a sample project here</a>. The code for GlobalExceptionHandler:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;height:330px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span> com<span style="color: #000066; font-weight: bold;">.</span>adobe<span style="color: #000066; font-weight: bold;">.</span>ac<span style="color: #000066; font-weight: bold;">.</span>logging<br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=loaderinfo%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:loaderinfo.html"><span style="color: #004993;">LoaderInfo</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span>UncaughtErrorEvent<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>managers<span style="color: #000066; font-weight: bold;">.</span>ISystemManager<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000;">&#91;</span>Mixin<span style="color: #000000;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#91;</span>DefaultProperty<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;handlerActions&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> GlobalExceptionHandler<br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=loaderinfo%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:loaderinfo.html"><span style="color: #004993;">LoaderInfo</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span>ArrayElementType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;com.adobe.ac.logging.GlobalExceptionHandlerAction&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> handlerActions<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">preventDefault</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=boolean%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:boolean.html"><span style="color: #004993;">Boolean</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span>sm<span style="color: #000066; font-weight: bold;">:</span>ISystemManager<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">loaderInfo</span> = sm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> GlobalExceptionHandler<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span>uncaughtErrorEvents<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>UncaughtErrorEvent<span style="color: #000066; font-weight: bold;">.</span>UNCAUGHT_ERROR<span style="color: #000066; font-weight: bold;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uncaughtErrorHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> uncaughtErrorHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>UncaughtErrorEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #0033ff; font-weight: bold;">each</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> action<span style="color: #000066; font-weight: bold;">:</span>GlobalExceptionHandlerAction <span style="color: #0033ff; font-weight: bold;">in</span> handlerActions<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action<span style="color: #000066; font-weight: bold;">.</span>handle<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">error</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">preventDefault</span> == <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">preventDefault</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>The code for LogHandlerAction:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;height:330px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span> com<span style="color: #000066; font-weight: bold;">.</span>adobe<span style="color: #000066; font-weight: bold;">.</span>ac<span style="color: #000066; font-weight: bold;">.</span>logging<br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>logging<span style="color: #000066; font-weight: bold;">.</span>ILogger<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>logging<span style="color: #000066; font-weight: bold;">.</span>Log<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> LogHandlerAction implements GlobalExceptionHandlerAction<br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> static const LOG<span style="color: #000066; font-weight: bold;">:</span>ILogger = Log<span style="color: #000066; font-weight: bold;">.</span>getLogger<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;UncaughtException&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> handle<span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span> <span style="color: #0033ff; font-weight: bold;">is</span> <a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> errorObj<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a> = <span style="color: #004993;">error</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOG<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">error</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;{0}. {1}<span style="">\n</span> {2}&quot;</span><span style="color: #000066; font-weight: bold;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; errorObj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">errorID</span><span style="color: #000066; font-weight: bold;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; errorObj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span><span style="color: #000066; font-weight: bold;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; errorObj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getStackTrace</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/05/13/global-exception-or-error-handling-in-flex/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Disabling Bindings on certain Views to avoid unnecessary processing time</title>
		<link>http://www.rialvalue.com/blog/2010/05/05/disabling-bindings-on-certain-views-to-avoid-unnecessary-processing-time/</link>
		<comments>http://www.rialvalue.com/blog/2010/05/05/disabling-bindings-on-certain-views-to-avoid-unnecessary-processing-time/#comments</comments>
		<pubDate>Wed, 05 May 2010 14:35:55 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=169</guid>
		<description><![CDATA[Once a view has been created, Bindings will always be active no matter if the view is invisible or removed from Stage.
There might be cases when a View is constantly receiving Binding updates (i.e. connected to an LCDS server with big amount of data transfer or messages). Imagine the view that is processing all the [...]]]></description>
			<content:encoded><![CDATA[<p>Once a view has been created, Bindings will always be active no matter if the view is invisible or removed from Stage.<br />
There might be cases when a View is constantly receiving Binding updates (i.e. connected to an LCDS server with big amount of data transfer or messages). Imagine the view that is processing all the updates is off the screen. Although the most expensive part of the processing in terms of CPU is the UI and it&#8217;s not being processed because it&#8217;s invisible, We could still say it&#8217;s consuming resources unnecessarly.</p>
<p>If you want you can disable or enable selectively the Bindings in an mxml document using the BindingManager:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">BindingManager<span style="color: #000066; font-weight: bold;">.</span>setEnabled<span style="color: #000000;">&#40;</span> document<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>You could enable or disable the bindings according to the visibility of the document.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/05/05/disabling-bindings-on-certain-views-to-avoid-unnecessary-processing-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex4 Coverflow Layout</title>
		<link>http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/</link>
		<comments>http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 16:05:06 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[nexusOne]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=139</guid>
		<description><![CDATA[Flex4 has shipped and it comes with a ton of new features that open lots of doors. One of my preferred features in which I see a tremendous potential is the new layout mechanism.
As an exercise to better understand the details of the new layout mechanism I played a couple of days creating some layouts [...]]]></description>
			<content:encoded><![CDATA[<p>Flex4 has shipped and it comes with a ton of new features that open lots of doors. One of my preferred features in which I see a tremendous potential is the new layout mechanism.</p>
<p>As an exercise to better understand the details of the new layout mechanism I played a couple of days creating some layouts that I&#8217;ll be posting during the next days.</p>
<p>The first layout I created was a Coverflow layout. There already exist several implementations out there for Flash and even Flex. The biggest difference in this implementation is that it&#8217;s using standard 2.5D APIs and the standard Flex4 layout mechanism. This translates in a 200 lines of code and quite good performance.</p>

<a href='http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/coverflow3/' title='coverflow3'><img width="150" height="150" src="http://www.rialvalue.com/blog/files/coverflow3-150x150.png" class="attachment-thumbnail" alt="" title="coverflow3" /></a>
<a href='http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/coverflow2/' title='coverflow2'><img width="150" height="150" src="http://www.rialvalue.com/blog/files/coverflow2-150x150.png" class="attachment-thumbnail" alt="" title="coverflow2" /></a>
<a href='http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/coverflow1/' title='coverflow1'><img width="150" height="150" src="http://www.rialvalue.com/blog/files/coverflow1-150x150.jpg" class="attachment-thumbnail" alt="" title="coverflow1" /></a>

<p>Bear in mind that:</p>
<ol>
<li>This is not production ready code and might have issues.</li>
<li>I haven&#8217;t optimised the code at all, it&#8217;s almost a first pass code.</li>
<li>The layout is not using any virtualization capabilities, which means that won&#8217;t perform nicely with big dataproviders. I&#8217;ll implement this in the future.</li>
<li>I&#8217;ve added several configuration parameters and some combinations might not work as good as others.</li>
</ol>
<p>As an extra, and even though Flex4 is not specifically designed for mobile, see how it works in a Nexus One with FP 10.1 beta. In the video below you can see how the application runs just out of the box, no recompilation, no changes at all. Same content that runs in my laptop runs in <a href="http://www.duvos.com">Enrique&#8217;s phone</a>. The performance is really nice! What the Flash Player team has achieved is amazing!<br />
congratulations guys!! </p>
<p>
<object width="480" height="320">
<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10552927&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="480" height="320" src="http://vimeo.com/moogaloop.swf?clip_id=10552927&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
</p>
<p>You can run the application <a href="http://www.rialvalue.com/coverflow">here http://www.rialvalue.com/coverflow</a><br />
You can get the source code <a href="http://rialvalue.com/coverflow/srcview">here http://rialvalue.com/coverflow/srcview</a></p>
<p>Which parameter combination do you like more?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Some thoughts on constructor and method parameters</title>
		<link>http://www.rialvalue.com/blog/2010/03/30/some-thoughts-on-method-parameters/</link>
		<comments>http://www.rialvalue.com/blog/2010/03/30/some-thoughts-on-method-parameters/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 11:09:59 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[clean code]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=126</guid>
		<description><![CDATA[I consider a best practice to keep to the minimum the number of arguments a method accepts. As uncle Bob explains in his &#8220;Clean code&#8221; book we should always favour niladic (no arguments), monadic (1 argument) or dyadic (2 argument) methods and avoid whenever possible methods with more than 3 arguments, if not possible we [...]]]></description>
			<content:encoded><![CDATA[<p>I consider a best practice to keep to the minimum the number of arguments a method accepts. As uncle Bob explains in his &#8220;Clean code&#8221; book we should always favour niladic (no arguments), monadic (1 argument) or dyadic (2 argument) methods and avoid whenever possible methods with more than 3 arguments, if not possible we should be able to clearly justify them.</p>
<p><b>The higher number of arguments a method accepts the harder it&#8217;ll be to read, understand and test.</b></p>
<p>When a method needs too much arguments, it is normally a sign of:</p>
<ol>
<li>Poor encapsulation
<li>The method is doing more than one thing, breaking the Single Responsibility principle. The arguments define what the method will do, they define and change the method execution path. (i.e. flag methods)</li>
<li>Method signatures are harder to read and it&#8217;s easier to introduce errors by swapping the order of parameters (specially if they are of the same type). (link to FB issue to highlight parameters. i.e. assertEquals();)</li>
<li>Method parameters are all part of the same concept and could be encapsulated in an object with its own type.</li>
<li>Arguments belong to different levels of abstraction and are harder to understand.</li>
</ol>
<p><span id="more-126"></span><br />
<br/><br />
To reduce the number of arguments in class methods you can consider different techniques depending on what the exact problem is in each case:</p>
<ol>
<li>Create specialised objects that wrap several parameters. i.e. x, y could be a Point instance.</li>
<li>Transform method arguments into class properties so that they don&#8217;t need to be passed between methods.</li>
<li>Create different methods or strategies to fork the behaviour instead of using flag parameters</li>
<li>Use factory methods and builders.</li>
</ol>
<p><br/><br />
All points above can even get worse when overusing optional parameters, which lot of people use to alleviate the lack of method and constructor overloading in ActionScript3 instead of using Builders, Factories of creating different named methods.</p>
<p><br/><br />
If we focus on constructors I think they should only accept:</p>
<ol>
<li>Required parameters for the object to be properly initialised.</li>
<li>Optional invariant parameters. Parameters that can&#8217;t be changed during the life of the object and that thus need to be specified during born.</li>
</ol>
<p>Let&#8217;s consider the typical Person object with a name, surname, age and a unique invariant Id. We define a constructor with 1 required argument and 3 optional ones:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">class</span> Person <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _id <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">name</span> <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> surname <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> street <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Person<span style="color: #000000;">&#40;</span> id <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">name</span> <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;&quot;</span><span style="color: #000066; font-weight: bold;">,</span> surname<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;&quot;</span><span style="color: #000066; font-weight: bold;">,</span> streetString=<span style="color: #990000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>_id = id<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span> = <span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>surname = surname<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>street = street<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> id<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> _id<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>You could create different instances like:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> p1 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> Person<span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;Xavi&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;Beumala&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;address1&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> p2 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> Person<span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;John&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;address2&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> p3 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> Person<span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">3</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;Andy&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;address3&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> p4 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> Person<span style="color: #000000;">&#40;</span> 4<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;addres4&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;Martin&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>The code above will compile fine, the compiler won&#8217;t complain at all since all declarations are right, but there&#8217;re several data integrity errors here, errors that are normally very hard to find and isolate.  i.e. p3 is setting the address as the surname. p4 is swapping the surname and the address.</p>
<p>In this case, the Person type and the data might be self explanatory, but there are a bunch of other cases that are not. Having cluttered constructors with lots of optional parameters is quite common when dealing with Custom Events.</p>
<p>What would be interesting is to be able to pass the optional parameters in a named way, removing the order constraint while making the solution more readable, developer friendly and robust to changes:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> p1 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> PersonBuilder<span style="color: #000000;">&#40;</span> 1 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">'Xavi'</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>surname<span style="color: #000000;">&#40;</span> <span style="color: #990000;">'Beumala'</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> p2 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> PersonBuilder<span style="color: #000000;">&#40;</span> 2 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">'John'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>address<span style="color: #000000;">&#40;</span><span style="color: #990000;">'address2'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> p3 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> PersonBuilder<span style="color: #000000;">&#40;</span> 3 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">'Andy'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>address<span style="color: #000000;">&#40;</span><span style="color: #990000;">'address3'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> p4 <span style="color: #000066; font-weight: bold;">:</span> Person = <span style="color: #0033ff; font-weight: bold;">new</span> PersonBuilder<span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">4</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>address<span style="color: #000000;">&#40;</span><span style="color: #990000;">'address4'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>surname<span style="color: #000000;">&#40;</span><span style="color: #990000;">'Martin'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>This solution is a kind of <a href="http://en.wikipedia.org/wiki/Builder_pattern">Buider pattern</a> implemented in a <a href="http://en.wikipedia.org/wiki/Fluent_interface">fluent way</a>, a train wreck. It&#8217;s also somehow mimicking <a href="http://en.wikipedia.org/wiki/Named_parameters">named parameters</a> in other languages. The nice things I really like about this syntax is:</p>
<ol>
<li>It&#8217;s a compact expression. It can be written in just one line.</li>
<li>The order of the optional parameters is not important anymore.</li>
<li>It&#8217;s easy to read and prevents parameter swapping. In some cases it can also be read as a natural language phrase.</li>
<li>In case of invariant optional parameters the builder can hide the implementation in the build method.</li>
<li>It doesn&#8217;t break <a href="http://en.wikipedia.org/wiki/Law_of_Demeter">Demeter&#8217;s law</a>. Although implemented as a train wreck, each method is applied on the same object.</li>
</ol>
<p><br/><br />
As mentioned above a common scenario where you could apply this technique is when dealing with custom events. Imagine you want to implement CRUD operations in terms of Persons. You could have:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">PersonEvent<span style="color: #000066; font-weight: bold;">.</span>createPersonEvent<span style="color: #000000;">&#40;</span> <span style="color: #000066; font-weight: bold;">-</span>1 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">'Xavi'</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>surname<span style="color: #000000;">&#40;</span> <span style="color: #990000;">'Beumala'</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bubbles</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
PersonEvent<span style="color: #000066; font-weight: bold;">.</span>removePersonEvent<span style="color: #000000;">&#40;</span> 2 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cancelable</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
PersonEvent<span style="color: #000066; font-weight: bold;">.</span>updatePersonEvent<span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">2</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>surname<span style="color: #000000;">&#40;</span> <span style="color: #990000;">'Smith'</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
PersonEvent<span style="color: #000066; font-weight: bold;">.</span>getPersonEvent<span style="color: #000000;">&#40;</span> 100 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
PersonEvent<span style="color: #000066; font-weight: bold;">.</span>getPeopleListEvent<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>pageOffset<span style="color: #000000;">&#40;</span> 10 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>numResults<span style="color: #000000;">&#40;</span> 50 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
PersonEvent<span style="color: #000066; font-weight: bold;">.</span>getPeopleListEvent<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>pageOffset<span style="color: #000000;">&#40;</span> 10 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>numResults<span style="color: #000000;">&#40;</span> 50 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">name</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'Xavi*'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>build<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p><br/><br />
This implementation would allow you to reuse the same PersonEvent for the different operations without cluttering the constructor with all the different permutations of optional and required parameters in a scalable way. Another option in this case would be using static factory methods (but this won&#8217;t solve the optional parameters mess).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/03/30/some-thoughts-on-method-parameters/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to enable Tab key on OS X modal dialogs</title>
		<link>http://www.rialvalue.com/blog/2010/02/09/how-to-enable-tab-key-on-os-x-modal-dialogs/</link>
		<comments>http://www.rialvalue.com/blog/2010/02/09/how-to-enable-tab-key-on-os-x-modal-dialogs/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 16:14:08 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=111</guid>
		<description><![CDATA[I&#8217;m a key accelerator man. I hate taking my hands out of my keyboard just to press Yes or No in a Modal Dialog. Until last week I thought there was no way to tab through the different buttons of a modal dialog.

Luckily I came across an option in System Preferences to enable the tab [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a key accelerator man. I hate taking my hands out of my keyboard just to press Yes or No in a Modal Dialog. Until last week I thought there was no way to tab through the different buttons of a modal dialog.</p>
<p><a href="http://www.rialvalue.com/blog/files/screen-shot-2010-02-09-at-165949.png"><img src="http://www.rialvalue.com/blog/files/screen-shot-2010-02-09-at-165949-300x102.png" alt="" title="screen-shot-2010-02-09-at-165949" width="300" height="102" class="alignnone size-medium wp-image-112" /></a></p>
<p>Luckily I came across an option in System Preferences to enable the tab key navigation:</p>
<ul>
<li>System Preferences</li>
<li>Keyboard</li>
<li>Full keyboard access: <b>All Controls</b></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/02/09/how-to-enable-tab-key-on-os-x-modal-dialogs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Some little gems on OSX you might want to know</title>
		<link>http://www.rialvalue.com/blog/2010/02/01/some-little-gems-on-osx-you-might-want-to-know/</link>
		<comments>http://www.rialvalue.com/blog/2010/02/01/some-little-gems-on-osx-you-might-want-to-know/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 20:46:11 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=106</guid>
		<description><![CDATA[Here are some little things that might speed you up when working on a Mac.
1. View hidden files in Finder
In terminal type:
defaults write com.apple.finder AppleShowAllFiles TRUE
To hide them again:
defaults write com.apple.finder AppleShowAllFiles FALSE
2. Manage clipboard from command line
To copy the output of a parameter you can use pbcopy:
pwd &#124; pbcopy
The result from pwd will be [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some little things that might speed you up when working on a Mac.</p>
<h4>1. View hidden files in Finder</h4>
<p>In terminal type:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults write com.apple.finder AppleShowAllFiles TRUE</div></div>
<p>To hide them again:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults write com.apple.finder AppleShowAllFiles FALSE</div></div>
<h4>2. Manage clipboard from command line</h4>
<p>To copy the output of a parameter you can use pbcopy:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pwd | pbcopy</div></div>
<p>The result from pwd will be copied to the clipboard. You can seamlessly use pbpaste</p>
<h4>3. Copy directory trees without overrideing</h4>
<p>Imagine you&#8217;ve got 2 folders: v1 and v2 and you want to copy the contents of v1 inside v2 recursively (merging the contents). With a normal cp command you copy v1 to v2 and there&#8217;s a bin folder in both, the bin folder in the destiny will be completely replaced with the one found in v1.</p>
<p>If you were in Linux you would use cp -a, in Mac you can use:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cp -pPR v1 v2</div></div>
<p>Where:<br />
-p = preserve<br />
-R = recursive<br />
-P = no symbolic links are followed &#8212; can be added but this is the default </p>
<h4>4. Adding some colors to ls</h4>
<p>If you want to see some colors used when executing ls you can add the folowing lines to ~/.bash_profile:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">export TERM=xterm-color<br />
export LSCOLORS=fxhxcxdxbxegedabagacad<br />
alias ls='ls -la'<br />
export CLICOLOR=1</div></div>
<p>The second line changes the default annoying blue color applied to folders with a more readable red color.</p>
<h4>5. VNC client</h4>
<p>If you need to connect via vnc to any computer you don&#8217;t have to install a vnc client. Open Finder, press command+K and type vnc://host where host is the ip or domain you want to vnc to. A VNC client will automatically pop up.</p>
<p>If you want to allow incoming VNC connections to your MAC you can enable your VNC server open &#8220;System Preferences&#8221; > &#8220;Sharing&#8221; and check the &#8220;Screen Sharing&#8221; option.</p>
<h4>6. Remote Login on X server via SSH</h4>
<p>There are cases where you have to execute X applications remotely but the server doesn&#8217;t have a VNC server neither the possibility.</p>
<p>In these cases you can use:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">xhost host<br />
ssh -X -A userName@host</div></div>
<p>Note that to be able to execute the commands above you need to have X11. The first line basically allows incoming connections from the server. The ssh command stablishes a connection against the host indicating that any application that nees an X server will be run in the local computer.</p>
<p>Once logged in you can try to execute any visual application. You&#8217;ll see that the application pops up locally.</p>
<h4>7. Open any document with the default application</h4>
<p>You might want to open a random file from the command line in the default desktop application</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">open aFile.ext</div></div>
<p>To open current directory in finder:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">open .</div></div>
<h4>8. Open a terminal in current Finder directory</h4>
<p>Lots of times you navigate to a certain folder using Finder and then you want to open a Terminal in that folder. To accomplish that you can install openTerminalHere applescript http://www.entropy.ch/software/applescript/</p>
<h4>9. You don&#8217;t like your dashboard? Disable it!</h4>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults write com.apple.dashboard mcx-disabled -boolean NO<br />
killall Dock</div></div>
<h4>10. Show current full path in Finder</h4>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES<br />
killall Finder</div></div>
<p>Do you know any other must-know command or gem? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/02/01/some-little-gems-on-osx-you-might-want-to-know/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FlexPMD Eclipse plugin + FlexPMD 1.0 + FlexCPD 1.0 + FlexMetrics released!</title>
		<link>http://www.rialvalue.com/blog/2009/12/10/flexpmd-eclipse-plugin-flexpmd-10-flexcpd-10-flexmetrics-released/</link>
		<comments>http://www.rialvalue.com/blog/2009/12/10/flexpmd-eclipse-plugin-flexpmd-10-flexcpd-10-flexmetrics-released/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 08:08:59 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[flexpmd]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=97</guid>
		<description><![CDATA[We&#8217;ve been busy, very busy during the last weeks. But we&#8217;re now very happy to announce the release of:

FlexPMD 1.0
FlexCPD 1.0
FlexMetrics 1.0

And our first beta for the new FlexPMD Eclipse plugin that will better integrate FlexPMD into your development workflow!!
You can find all the documentation for FlexPMD on the wiki and for the plugin http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD+Eclipse+plugin





















 [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been busy, very busy during the last weeks. But we&#8217;re now very happy to announce the release of:</p>
<ul>
<li>FlexPMD 1.0</li>
<li>FlexCPD 1.0</li>
<li>FlexMetrics 1.0</li>
</ul>
<p>And our first beta for the new <b>FlexPMD Eclipse plugin</b> that will better integrate FlexPMD into your development workflow!!</p>
<p>You can find all the documentation for FlexPMD on the <a href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD">wiki</a> and for the plugin <a href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD+Eclipse+plugin">http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD+Eclipse+plugin</a></p>
<p>
<object width="480" height="320">
<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7983696&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="480" height="320" src="http://vimeo.com/moogaloop.swf?clip_id=7983696&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
</p>
<p>
<object width="480" height="320">
<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7984237&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="480" height="320" src="http://vimeo.com/moogaloop.swf?clip_id=7984237&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
 </p>
<p>If you have any question, problem or suggestion you can use the <a href="http://forums.adobe.com/community/opensource/flexpmd/">public forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2009/12/10/flexpmd-eclipse-plugin-flexpmd-10-flexcpd-10-flexmetrics-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FlexPMD now in labs</title>
		<link>http://www.rialvalue.com/blog/2009/09/02/flexpmd-now-in-labs/</link>
		<comments>http://www.rialvalue.com/blog/2009/09/02/flexpmd-now-in-labs/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 06:18:49 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[flex tools]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=88</guid>
		<description><![CDATA[FlexPMD is a tool that helps to improve code quality by auditing any AS3/Flex source directory and detecting common bad practices, such as:

Unused code (functions, variables, constants, etc.)
Inefficient code (misuse of dynamic filters, heavy constructors, etc.)
Over-complex code (nested loops, too many conditionals, etc.)
Over-long code (classes, methods, etc.)
Incorrect use of the Flex component lifecycle (commitProperties, etc.)
A [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD">FlexPMD</a> is a tool that helps to improve code quality by auditing any AS3/Flex source directory and detecting common bad practices, such as:</p>
<ul>
<li>Unused code (functions, variables, constants, etc.)</li>
<li>Inefficient code (misuse of dynamic filters, heavy constructors, etc.)</li>
<li>Over-complex code (nested loops, too many conditionals, etc.)</li>
<li>Over-long code (classes, methods, etc.)</li>
<li>Incorrect use of the Flex component lifecycle (commitProperties, etc.)</li>
<li>A report is produced describing the violations of a given rule set. FlexPMD includes a rule set that is broad ranging and continually growing. It is also straightforward to create new rules and users are encouraged to do so.</li>
</ul>
<p>FlexPMD can currently be invoked from:</p>
<ul>
<li>The command line</li>
<li>Maven</li>
<li>Ant</li>
<li>Automator on Mac OS X</li>
<li>Currently, FlexPMD produces a XML report by default, plus an HTML report when invoked by the Maven site plugin. The XML report can then be consumed by any PMD reports pretty printers (like the PMD hudson plugin).</li>
</ul>
<p>An Eclipse plugin is under consideration.</p>
<p>Some good information on how to start using it can be found <a href="http://blogs.adobe.com/xagnetti/2009/09/flexpmd_release_on_opensourcea.html">in this blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2009/09/02/flexpmd-now-in-labs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

