<?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"
	>

<channel>
	<title>AH:</title>
	<atom:link href="http://www.hulstkamp.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hulstkamp.com</link>
	<description>andy hulstkamp blog about rich internet applications, flex, flash, java, webapps, web, code, experiments</description>
	<pubDate>Thu, 03 May 2012 13:13:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>copy Maven dependencies to a target folder</title>
		<link>http://www.hulstkamp.com/2012/05/03/copy-maven-dependencies-to-a-target-folder/669</link>
		<comments>http://www.hulstkamp.com/2012/05/03/copy-maven-dependencies-to-a-target-folder/669#comments</comments>
		<pubDate>Thu, 03 May 2012 12:10:18 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Configuration]]></category>

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

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=669</guid>
		<description><![CDATA[Reminder to myself: If you can’t get Maven to work with a particular IDE or plug-in it might be helpful to at least copy all dependencies (jars) to a destination-folder.  The Maven Dependency Plug-In will kindly assist you to copy maven dependencies to a target folder.

Include the plugin:

 &#60;plugin&#62;
    &#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p>Reminder to myself: If you can’t get Maven to work with a particular IDE or plug-in it might be helpful to at least copy all dependencies (jars) to a destination-folder.  <a href="http://maven.apache.org/plugins/maven-dependency-plugin/">The Maven Dependency Plug-In</a> will kindly assist you to copy maven dependencies to a target folder.<br />
<span id="more-669"></span></p>
<p>Include the plugin:</p>

<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-dependency-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>copy-dependencies<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>copy-dependencies<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.build.directory}/alternateLocation<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;overWriteReleases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/overWriteReleases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;overWriteSnapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/overWriteSnapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;overWriteIfNewer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/overWriteIfNewer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Invoke</p>
<pre>mvn dependency:copy-dependencies</pre>
<p>to copy all the dependencies of a project to the specified target folder.</p>
<pre>mvn dependency:copy-dependencies -Dclassifer=sources</pre>
<p>will copy all sources.</p>
<pre>mvn dependency:analyze</pre>
<p>shows information about used and unused declared dependencies.</p>
<pre>mvn dependency:tree</pre>
<p>gives an overview of the nested dependencies.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2012/05/03/copy-maven-dependencies-to-a-target-folder/669/feed</wfw:commentRss>
		</item>
		<item>
		<title>Purging my Flex Folder again</title>
		<link>http://www.hulstkamp.com/2012/03/29/purging-my-flex-folder-again/658</link>
		<comments>http://www.hulstkamp.com/2012/03/29/purging-my-flex-folder-again/658#comments</comments>
		<pubDate>Thu, 29 Mar 2012 14:45:18 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Misc]]></category>

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=658</guid>
		<description><![CDATA[

Here&#8217;s a useful little interactive cheatsheet I made to better remember all the functions inside the Flex lifecycle. I’ve never found the time to validate all the descriptive stuff so please use with care. Most of the information provided should be pretty accurate and should still be applicable to Flex 4.6. But again, be sure [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>DE</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]><br />
<mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Normale Tabelle"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --></p>
<p><!--[endif] --></p>
<p class="MsoNormal"><span lang="EN-GB">Here&#8217;s a useful little interactive cheatsheet I made to better remember all the functions inside the Flex lifecycle. I’ve never found the time to validate all the descriptive stuff so please use with care. Most of the information provided should be pretty accurate and should still be applicable to Flex 4.6. But again, be sure to double check.</span></p>
<p>This little tool visualizes the lifecycle of the Flex 4 Spark component model and hopefully helps to understand what happens behind the scened.</p>
<p>Basically it is an expanded stack trace with comments showing the most important method calls during the lifecycle&#8217;s birth, life and death phase including invalidation and validation.</p>
<p><div class="wp-caption alignnone" style="width: 510px"><a href="http://www.hulstkamp.com/byard/flex4/AHFlexSparkLifecycle/Flex4Lifecycle.html"><img title="Flex 4 Spark Lifecycle" src="http://www.hulstkamp.com/byard/flex4/AHFlexSparkLifecycle/images/lifecycle.png" alt="Flex 4 Spark Lifecycle" width="500" height="318" /></a><p class="wp-caption-text">Flex 4 Spark Lifecycle</p></div></p>
<p><div class="wp-caption alignnone" style="width: 510px"><a href="http://www.hulstkamp.com/byard/flex4/AHFlexSparkLifecycle/Flex4Lifecycle.html"><img title="Flex 4 Spark Lifecycle" src="http://www.hulstkamp.com/byard/flex4/AHFlexSparkLifecycle/images/lifecycle-2.png" alt="Flex 4 Spark Lifecycle" width="500" height="318" /></a><p class="wp-caption-text">Flex 4 Spark Lifecycle</p></div></p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHFlexSparkLifecycle/Flex4Lifecycle.html">Demo</a></p>
<p><span id="more-658"></span></p>
<p>It shows the method calls of the 3 relevant objects regarding the Spark component model, namely SkinnableComponent (in this case a Button), its SparkSkin and the associated BasicLayout.</p>
<p>The traced component (Button) is shown at the top. To the left you can invoke method calls like you would from client code to see what methods get called when and where. Right underneath you&#8217;ll find the current values of some important properties of the traced component.</p>
<p>Disclaimer:<br />
The information provided here is based on my own experiments, tracing the source code of the Flex SDK (4) and the docs. Information hopefully is, but may not be accurate. So, in any case, please double check when relying on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2012/03/29/purging-my-flex-folder-again/658/feed</wfw:commentRss>
		</item>
		<item>
		<title>Purging my Flex Folder</title>
		<link>http://www.hulstkamp.com/2012/03/27/purging-my-flex-folder/655</link>
		<comments>http://www.hulstkamp.com/2012/03/27/purging-my-flex-folder/655#comments</comments>
		<pubDate>Tue, 27 Mar 2012 12:12:59 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[flex 4]]></category>

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

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

		<category><![CDATA[front-end]]></category>

		<category><![CDATA[interaction design]]></category>

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=655</guid>
		<description><![CDATA[Flex is great to prototype.
Here’s a little thing I’ve thrown together a while ago. Pick and create football-formations.
It features a couple of custom components like a JerseyEditor, a simple Color-Picker a formation list and some custom item renders.
You can adjust the formations on the fly entering any system you like. Try 4-4-2 if you’re more [...]]]></description>
			<content:encoded><![CDATA[<p>Flex is great to prototype.</p>
<p>Here’s a little thing I’ve thrown together a while ago. Pick and create football-formations.</p>
<p>It features a couple of custom components like a JerseyEditor, a simple Color-Picker a formation list and some custom item renders.</p>
<p>You can adjust the formations on the fly entering any system you like. Try 4-4-2 if you’re more in for a classical style, try 2-3-4-1 for an attacking lot or use drag and drop to adjust your own custom formation.</p>
<p>Clicking on a player opens up the editor so you can add your own players. And no, the colours of the jersey editor do not get passed over right now.</p>
<p><div class="wp-caption alignnone" style="width: 510px"><a href="http://www.hulstkamp.com/byard/flex4/AHFootie/AHFootieQuickPrototype.html"><img title="Adobe Flex custom prototype" src="http://www.hulstkamp.com/byard/flex4/AHFootie/images/footie-flex-spark-component-interaction.png" alt="Adobe Flex Prototyping - A Footie Formation Builder" width="500" height="373" /></a><p class="wp-caption-text">Adobe Flex Prototyping - A Footie Formation Builder</p></div></p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHFootie/AHFootieQuickPrototype.html"><img title="Adobe Flex custom prototype" src="http://www.hulstkamp.com/byard/flex4/AHFootie/images/footie-flex-spark-component-interaction-v2.png" alt="Adobe Flex Prototyping - A Footie Formation Builder" width="500" height="373" /></a></p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHFootie/AHFootieQuickPrototype.html"><img title="Adobe Flex custom prototype" src="http://www.hulstkamp.com/byard/flex4/AHFootie/images/footie-flex-spark-component-interaction-v3.png" alt="Adobe Flex Prototyping - A Footie Formation Builder" width="500" height="373" /></a></p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHFootie/AHFootieQuickPrototype.html">Demo</a></p>
<p><span id="more-655"></span></p>
<p>There are lots of features missing. It’s a prototype, <a href="http://www.hulstkamp.com/byard/flex4/AHFootie/srcview/">source is available</a> but not meant for production.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2012/03/27/purging-my-flex-folder/655/feed</wfw:commentRss>
		</item>
		<item>
		<title>See you in the browser</title>
		<link>http://www.hulstkamp.com/2012/02/29/see-you-in-the-browser/649</link>
		<comments>http://www.hulstkamp.com/2012/02/29/see-you-in-the-browser/649#comments</comments>
		<pubDate>Wed, 29 Feb 2012 09:00:47 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[FXG]]></category>

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

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

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

		<category><![CDATA[interaction design]]></category>

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=649</guid>
		<description><![CDATA[

It’s been a while since Adobe managed to nuke its developer base with a single press release. In the past few months I’ve been repeatedly asked if I would still bet on Flex, so I might as well write it down. My short conclusion: Flex has a future but within a limited scope. I won’t [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>DE</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]><br />
<mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Normale Tabelle"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --></p>
<p><!--[endif] --></p>
<p class="MsoNormal"><span lang="EN-GB">It’s been a while since Adobe managed to nuke its developer base with a single press release. In the past few months I’ve been repeatedly asked if I would still bet on Flex, so I might as well write it down. My short conclusion: Flex has a future but within a limited scope. I won’t sum up all my thoughts here, since <a href="http://jessewarden.com/2012/02/sencha-ext-js-is-viable-technology-choice-for-flex-developers.html#more-3015">Jesse Warden</a> has already thoroughly written down the whole situation, which reflects my point of view quite well.</span></p>
<p class="MsoNormal"><span lang="EN-GB">Fact is Flex (Spark!) is a wonderful (component) framework. Separation of concerns is very well done, the API has good granularity and flexibility, there’s a well defined component lifecycle that fosters reusability and the runtime performance is good enough.<br />
Flex missed great components out of the box and compilation and refactoring should have been better.<br />
Flex is a damn good Framework to do RIAs and it had and still <a href="http://blogs.apache.org/flex/">has a damn good community to support it</a>. However, in my point of view, the dependency on Adobe and the Flash Player is a burden and JS/HTML5/CSS3 is growing fast to replace it in many areas.</span></p>
<p class="MsoNormal"><span id="more-649"></span></p>
<p class="MsoNormal"><span lang="EN-GB">I guess it comes down to this:</span></p>
<p class="MsoNormal"><span lang="EN-GB">If your application targets the Intranet and you do have control of the runtime environment and consistency of the runtime is critical to your application, then Flex is still the most productive, robust and easiest way to develop a rich client. Rich Trading and Banking applications come to mind and there’s enough money in it to support a career. In this type of scenario I can see Flex as the preferred RIA-Framework for many years to come. Further I think Flex is an excellent choice to do prototyping in complex scenarios.</span></p>
<p class="MsoNormal"><span lang="EN-GB">In a consumer oriented market however, the Flash-Player and therefore Flex will continuously lose ground. Developing complex, consistent and maintainable RIAs in HTML and JavaScript is hard but many of the issues are being addressed by approaches like, <a href="https://developers.google.com/closure/compiler/">Google Closure Tools</a>, <a href="http://ender.no.de/">Ender</a>, <a href="http://sass-lang.com/">SASS</a>, <a href="http://lesscss.org/">LESS</a> and tons of great libraries like <a href="http://www.sencha.com/products/extjs/">ExtJS</a>, <a href="http://documentcloud.github.com/backbone/">backbone.js</a>, <a href="http://knockoutjs.com/">knockout.js</a>, <a href="http://twitter.github.com/bootstrap/">bootstrap.js</a> and <a href="http://twitter.github.com/bootstrap/">jQuery</a> to name just a few.</span></p>
<p class="MsoNormal"><span lang="EN-GB">Initially, the first time I turned towards Flash in 2001 to create onmodular was because I – like many others - was frustrated by the limited possibilities in the browser and by SUN Microsystems’ inability to establish the JVM in the browser. Enabling rich interactive content was the raison d’être of Flash. Later on, for many Java-Developers including me, Flex was a great framework for the view layer. Now, with wide HTML5-Adoption around the corner, both Flash and therefore Flex lose their reason of existence in many fields. If your focus is Web-Applications or Cross-Plattform Mobile Apps, it is definitely time to move on. </span></p>
<p class="MsoNormal"><span lang="EN-GB">Also, no one should be too worried that the investment in Flex has been for nothing. Many of the paradigms that have been used in Flash or Flex reappear in JS/HTML5/CSS3. Migration is quite straightforward.<span> </span></span></p>
<p class="MsoNormal"><span lang="EN-GB">I’m writing this in response to the e-mails I get regarding the future of Flex. I’m writing this as well to let you know that I won’t reply to any request for support regarding the custom components you might find on this blog anymore. I still use Flex for prototyping and some commercial projects where applicable but I think it’s time to move on.</span></p>
<p class="MsoNormal"><span lang="EN-GB">If you need some starting point and want to get the basics right I’d recommend</span></p>
<p class="MsoNormal"><span lang="EN-GB"><a href="http://shop.oreilly.com/product/9780596517748.do">Javascript: The Good Parts</a></span></p>
<p class="MsoNormal"><span lang="EN-GB"><a href="http://taligarsiel.com/Projects/howbrowserswork1.htm">How Browsers work</a></span></p>
<p class="MsoNormal"><span lang="EN-GB"><a href="http://addyosmani.com/resources/essentialjsdesignpatterns/book/">Essential Javascript Design Patterns</a></span></p>
<p class="MsoNormal"><span lang="EN-GB"><a href="http://pages.sencha.com/flex-to-sencha.html">From Flex to Sencha</a></span></p>
<p class="MsoNormal"><span lang="EN-GB">Good luck and see you in the browser.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2012/02/29/see-you-in-the-browser/649/feed</wfw:commentRss>
		</item>
		<item>
		<title>Experience using Google App Engine, Spring MVC  and Flex</title>
		<link>http://www.hulstkamp.com/2011/04/12/experience-with-google-app-engine-spring-mvc-and-flex/613</link>
		<comments>http://www.hulstkamp.com/2011/04/12/experience-with-google-app-engine-spring-mvc-and-flex/613#comments</comments>
		<pubDate>Tue, 12 Apr 2011 16:15:49 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

		<category><![CDATA[Google App Engine]]></category>

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

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

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

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

		<category><![CDATA[spring mvc]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=613</guid>
		<description><![CDATA[I had a look at Google App engine and some of the new features in Spring 3 (MVC). 
I decided to create a platform for city ratings and –rankings. I polished the whole thing a bit in the hope to attract some visitors. I wonder if I can get some peaks in traffic to see [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span lang="EN-US">I had a look at Google App engine and some of the new features in Spring 3 (MVC). </span></p>
<p class="MsoNormal"><span lang="EN-US">I decided to create a platform for city ratings and –rankings. I polished the whole thing a bit in the hope to attract some visitors. I wonder if I can get some peaks in traffic to see how this service will perform in GAE under load outside of a stress test.</span></p>
<p class="MsoNormal"><span lang="EN-US">To see what I&#8217;m talking abput, a first version is up and running at <a href="http://www.cityclash.org">CityClash.org</a>.<span> </span>To read about my experience with Google App Engine read on after the screenshot.</span></p>
<p class="MsoNormal"><a href="http://www.cityclash.org"><img class="aligncenter" title="CityClash city ratings and rankings" src="http://www.hulstkamp.com/byard/meta/cityclash/city-rating.png" alt="" width="498" height="301" /></a></p>
<p class="MsoNormal"><span lang="EN-US">Building CityClash.org involved a couple of interesting aspects towards Google App<span id="more-613"></span> Engine, the datastore and Spring MVC.</span></p>
<ul>
<li><span lang="EN-US">The usual CRUD ops</span></li>
<li><span lang="EN-US">Transactions</span></li>
<li><span lang="EN-US">Joins &amp; aggregation</span></li>
<li><span lang="EN-US">Long running processes</span></li>
<li><span lang="EN-GB">REST-style with JSON response </span></li>
<li><span lang="EN-US">External API calls</span></li>
<li><span lang="EN-US">Developing for scalability</span></li>
</ul>
<p class="MsoListParagraph"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">I used the </span><span lang="EN-GB"><a href="http://www.springsource.com/developer/sts"><span lang="EN-US">SpringSource Tool suite</span></a></span><span lang="EN-US"> with the GAE-Plugin for development.<span> Setting up </span>Spring with GAE was straightforward and worked as expected. Add the required jars and configure the spring project as you would normally do. Note, I’m referring to the MVC part of Spring and can’t speak for the other parts right now.</span></p>
<h2><span lang="EN-US">Spring 3 MVC</span></h2>
<p class="MsoNormal"><span lang="EN-US">The REST-features and Ajax-simplifications in Spring MVC worked in GAE  just fine. This stuff is really well done in Spring and a joy to work with.</span></p>
<h2><span lang="EN-US">Task queues in GAE</span></h2>
<p class="MsoNormal"><span lang="EN-US">Task queues in Google App Engine are a great way to speed up the user experience, by simply doing expensive work later and not during a user’s request. If some calculations need not to be done immediately task queues are worth considering.</span></p>
<p class="MsoNormal"><span lang="EN-US">When a city rating in CityClash comes in, I defer calculations of some statistical figures to a task queue. The user does not need to know about these figures immediately, it’s good enough when they get updated a couple of minutes later and the user gets a rather quick response.</span></p>
<p class="MsoNormal"><span lang="EN-US">Task queues are easy to set up. In a couple of lines you get a Queue from the Factory, create, configure the task and add it to the queue. The Queue will later invoke a HTTP-Request based on the Task. The actual work is then done in the handler that serves the request.</span></p>
<h2><span lang="EN-US">URL Fetch calling external apis</span></h2>
<p class="MsoNormal"><span lang="EN-US">For Internationalization purposes I need to translate the city names to the local language. In CityClash.org I currently support German and English. Via Geocoding I get the English name but I need the German name as well. For <em>Berne, Switzerland</em> I need <em>Bern, Schweiz</em> too. </span></p>
<p class="MsoNormal"><span lang="EN-US">In Google Maps I could invoke another request asking for the German name, but I was a bit worried to get over the quota or get blocked for invoking too many requests at a rate too high. For this reason and for the fun of it, I decided to use the Google Translate API to get the localized name.</span></p>
<p class="MsoNormal"><span lang="EN-US">If CityClash gets a rating from a city that had not been rated before, the Google Translate API gets invoked and fetches the German name once.<span> </span>This is simple and straightforward. Use java.net.URL to open a connection and parse the stream. To not block the user’s request I put this step in a task queue as well.</span></p>
<h2><span lang="EN-US">Memcache</span></h2>
<p class="MsoNormal"><span lang="EN-US">CC uses the cache as much as possible. I’m using the low level API. There’s not much to say about this. Put and get </span><span lang="EN-GB">Serializable objects, use expiration and be sure to have a fallback if values in the cache get lost: it’s a cache not a permanent store.</span></p>
<h2><span lang="EN-US">Datastore</span></h2>
<p class="MsoNormal"><span lang="EN-US">If you come from an SQL-background, then the datastore is probably the most difficult aspect to get used to. It took me a while to think out of the box and accept the limitations and embrace the blessings.</span></p>
<p class="MsoNormal"><span lang="EN-US">Here are a few key things to note from <strong>my newbie point of view and</strong> <strong>as of now</strong>:</span></p>
<ul>
<li><span lang="EN-US">Loose the SQL-mindset. Forget about complex joins, nested queries and aggregation. </span></li>
<li><span lang="EN-US">What you get is sort of a distributed Hashtable, optimized for reads. The datastore is organized <span> </span>in a fashion, that lets it efficiently scan and read data. Stuff like filters (&lt;,&lt;=,= etc.), order by, ancestors or keys can be applied to the queries. But there are limitations of how you can combine the filters, orders etc. too.</span></li>
<li><span lang="EN-US">As to expect, reads are fast, especially when using keys. </span></li>
<li><span lang="EN-US">Don’t spoil this by trying to work around the limitations regarding joins and aggregation. Doings loads of calculations in memory to mimic such behavior won’t scale well and will cost you cycles.</span></li>
<li><span lang="EN-US">Instead store the data in a fashion that embraces the usage pattern.<br />
</span></li>
<li><span lang="EN-US">Try to do calculations once, when writing. Prepare the data for simple, efficient reads.</span></li>
<li><span lang="EN-US">If writing takes too long try to delegate some stuff to task queues and do the hard work later.<br />
</span></li>
<li><span lang="EN-US">Accept and embrace denormalization. </span></li>
<li><span lang="EN-US">Use task queues and cron jobs where possible to do long running processes in the background. In CC lots of aggregation is done in the background.</span></li>
<li><span lang="EN-US">Writes are expensive, since they may need reorganization. Be aware of contention. </span></li>
<li><span lang="EN-US">If writes have the potential to cause contention, consider sharding or use smaller entity groups.<br />
</span></li>
<li><span lang="EN-US">Transactions are there but only spanning over the same entity group . I tried to stay away of transactions alltogether – and denormalize.</span></li>
<li><span lang="EN-US">I stayed away from JDO and JPA because I could. Where’s the point of having another abstraction layer over a HashMap? <span> </span>I used the low level API in conjunction with <a href="http://code.google.com/p/objectify-appengine/">objectify</a>, which itself makes for a very good documentation on the datastore.</span></li>
<li><span lang="EN-US">There&#8217;s no full text search. The most you will get is a filter-order combination to mimick a sclaed-down LIKE on crutches.<br />
</span></li>
</ul>
<p class="MsoNormal"><span lang="EN-US">Again, <strong>these are not necessarily best practices</strong>; they just reflect my take on the datastore of the appengine right now.<br />
</span></p>
<h1><span lang="EN-US">Mail</span></h1>
<p class="MsoNormal"><span lang="EN-US">Sending mail is a no brainer and works straight out of the box. The only restriction is that </span><span lang="EN-GB">the sender address of a message must be the email address of an administrator for the application.</span></p>
<h1><span lang="EN-GB">Development<span> </span>Server</span></h1>
<p class="MsoNormal"><span lang="EN-GB">I have yet to discover any inconsistencies between the development server and<span> </span>the appengine in terms of behaviour.<span> </span>The test skeleton<span> </span>is pretty good too.</span></p>
<h1><span lang="EN-GB">Flex</span></h1>
<p class="MsoNormal"><span lang="EN-GB">I didn’t bother to use the Spring Blaze integration. For the couple of requests and the few data I simply used the HTTPService.<span> </span>The new REST-full features paired with the JSON response made it easy to integrate Flex and Spring. Same applies to the Ajax-Calls through JQuery.</span></p>
<h1><span lang="EN-US">JSTL</span></h1>
<p class="MsoNormal"><span lang="EN-US">My experience was, that there are some minor issues with JSTL inside GAE. For example, I could not get hold of an object-reference via the var attribute inside the forEach-Tag.<span> </span>Possibly my fault and I didn’t bother too much since the index-based approach using the varStatus-Attribute works fine. Further the formatNumber-Tag didn’t work since its implementation apparently needs a reference to the session. I did not want to turn on sessions (</span><span lang="EN-GB"><a href="http://blog.afewguyscoding.com/2011/02/httpsession-google-app-engine/"><span lang="EN-US">backed by memcache and the datastore</span></a></span><span lang="EN-US">) just for this, so I formatted the numbers in advance to be consumed by the page building.</span></p>
<h1><span lang="EN-US">Conclusion</span></h1>
<p class="MsoNormal"><span lang="EN-US">So far I’m pretty impressed by GAE. It has restrictions and it took me some time to get used to the datastore first. But once you get the hang of it, things work out pretty straightforward. </span></p>
<p class="MsoNormal"><span lang="EN-US">And you get the advantages</span></p>
<ul>
<li><span lang="EN-US">Scalability (can’t really judge on this right now),</span></li>
<li><span lang="EN-US">Pay for what you use</span></li>
<li><span lang="EN-US">Easy App versioning</span></li>
<li><span lang="EN-US">No Server-Management and maintenance. </span></li>
</ul>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">While I can’t really judge on the first as of now, the last point especially, for me, is a real blessing. </span></p>
<p class="MsoNormal"><span lang="EN-US">After all, it depends </span><span lang="EN-GB">whether your app can live within the constraints of GAE (mainly the datastore). I’d say</span><span lang="EN-US"> Google App Engine is not the right tool for complex business applications as of now, but is a great environment for simple to moderately complex web-apps. For independent developers or startups the PaaS-approach might very well be the right thing.</span></p>
<p class="MsoNormal"><span lang="EN-US"><span> </span></span><span lang="EN-GB"><a href="http://www.carlosble.com/2010/11/goodbye-google-app-engine-gae/"><span lang="EN-US">Others</span></a></span><span lang="EN-GB"> </span><span lang="EN-US"><a href="http://www-cs-students.stanford.edu/~silver/gae.html">don’t agree</a> and I might change my opinion in 3 month or so after having seen CC run inside GAE for a while, but for now my first experience with google app engine was pretty pleasant.<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2011/04/12/experience-with-google-app-engine-spring-mvc-and-flex/613/feed</wfw:commentRss>
		</item>
		<item>
		<title>Ruler Spark Component using dynamic skin parts and custom GraphicElement</title>
		<link>http://www.hulstkamp.com/2010/10/08/ruler-spark-component-using-dynamic-skin-parts-and-custom-graphicelement/584</link>
		<comments>http://www.hulstkamp.com/2010/10/08/ruler-spark-component-using-dynamic-skin-parts-and-custom-graphicelement/584#comments</comments>
		<pubDate>Fri, 08 Oct 2010 09:11:58 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[FXG]]></category>

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

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

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

		<category><![CDATA[skin parts]]></category>

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=584</guid>
		<description><![CDATA[Here’s a first version of a simple Ruler component that takes some of the techniques discussed in the couple of previous post into account.
The ruler can be scaled down or up by holding CTRL/SHIFT while clicking and can be moved by holding the ALT-Key and keeping the mouse button pressed. When scaling an animation is [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s a first version of a simple Ruler component that takes some of the techniques discussed in the couple of previous post into account.</p>
<p>The ruler can be scaled down or up by holding CTRL/SHIFT while clicking and can be moved by holding the ALT-Key and keeping the mouse button pressed. When scaling an animation is applied for smoother transitions. For the labels an array of Strings can be set, each one defining a division on the ruler. The number of subdivisions can be set as well</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHRulerComponent/AHRulerTest.html"><img src="http://www.hulstkamp.com/byard/flex4/AHRulerComponent/rulerComponent.png" alt="Spark Ruler Component" /></a></p>
<p>Simple <a href="http://www.hulstkamp.com/byard/flex4/AHRulerComponent/AHRulerTest.html">ruler component</a>. View source is enabled.</p>
<p><br/></p>
<h4>Custom GraphicElement to draw tick lines</h4>
<p>Instead of using and FXG-Path element a custom GraphicElement has been created to draw<span id="more-584"></span> the tick lines. This makes for a cleaner and more generic approach when drawing the ruler and reduces overhead when animation is applied while scaling.<br />
<br/></p>
<h4>Dynamic skin parts for the Labels</h4>
<p>For the labels dynamic skin parts are used. Here’s a little recap on how to work with dynamic skin parts.</p>
<ul>
<li>Declare a dynamic skin part in the Declarations segment of the skin. Wrap it up in a Component and give the component an id.</li>
<li>Declare the skin part in the component, referencing it via  id in the skin. The type is of mx.core.IFactory.</li>
<li>To create a dynamic skin part at runtime call <em>createDynamicPartInstance([id of skin part])</em> from the component. This will return an instance of the desired skin part.</li>
<li>In the component add this instance to the skin or a group within the skin.</li>
<li>Optionally add it to an array for dynamically created instances for easier housekeeping.</li>
<li>Any Listener is best added in partAdded() similar to adding behavior to static skin parts. When adding event listeners do not forget to remove them in partRemoved().</li>
<li>A dynamic skin part can be removed at runtime by calling <em>removeDynamicPartInstance([id of skin part], instance)</em>. You also need to manually remove the instance form the group you’ve added them.</li>
</ul>
<p>If you need more information on dynamic skin parts, check out <a href="http://www.adobe.com/devnet/flex/articles/dynamic_skin_parts.html">this great article</a> by Florian Fesseler.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/10/08/ruler-spark-component-using-dynamic-skin-parts-and-custom-graphicelement/584/feed</wfw:commentRss>
		</item>
		<item>
		<title>Inspecting and creating a custom Spark GraphicElement</title>
		<link>http://www.hulstkamp.com/2010/10/07/inspecting-and-creating-a-custom-spark-graphicelement/570</link>
		<comments>http://www.hulstkamp.com/2010/10/07/inspecting-and-creating-a-custom-spark-graphicelement/570#comments</comments>
		<pubDate>Thu, 07 Oct 2010 07:35:18 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

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

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

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

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

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

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=570</guid>
		<description><![CDATA[
Mobile Flex Apps are around the corner. Hence it might be a good thing to inspect some of the more light-weighted approaches of Flex to create visual elements and components that can take part in the Spark layout process. In this last example I had a look at SpriteVisualElement. 
Now, it&#8217;s time for the GraphicElement. [...]]]></description>
			<content:encoded><![CDATA[<p>
Mobile Flex Apps are around the corner. Hence it might be a good thing to inspect some of the more light-weighted approaches of Flex to create visual elements and components that can take part in the Spark layout process. In <a href="http://www.hulstkamp.com/2010/09/29/use-spritevisualelement-to-implement-a-simple-component-in-flex-4/555">this last example</a> I had a look at <em>SpriteVisualElement</em>. </p>
<p>Now, it&#8217;s time for the <em>GraphicElement</em>. </p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHFlowerGraphicElement/AHFlowerTest.html" alt="custom GraphicElement example"><img src="http://www.hulstkamp.com/byard/flex4/AHFlowerGraphicElement/flowerGraphicElement.png" alt="custom flower GraphicElement used in background" /><br />
</a><br />
<a href="http://www.hulstkamp.com/byard/flex4/AHFlowerGraphicElement/AHFlowerTest.html"">Example </a>using custom Graphic Elements. View source is enabled.</p>
<p>The <em>GraphicElement </em>and its subclasses are responsible to draw a significant amount of the Spark components graphics. FXG elements like <em>Rect</em>, <em>Path</em>, <em>Line </em>etc. all derive from <em>GraphicElement</em>.</p>
<p>A  <em>GraphicElement </em>is actually neither a <em>DisplayObject </em>nor does it offer any form of interaction. Its super class is the <em>EventDispatcher </em>and it uses an<span id="more-570"></span> internal DisplayObject to draw itself into. It does implement interfaces like <em>IVisualElement </em>and <em>IGraphicElement </em>and can therefore be laid out and displayed by Spark. </p>
<p>The internal display object used for drawing purposes is set and managed by Flex and multiple graphic elements can draw onto the same display object. Sharing display objects reduces overhead and in most cases leads to better performance. </p>
<p>This naturally has some implications which need to be considered when creating a custom GraphicElement</p>
<ul>
<li>A GraphicElement gets a DisplayObject to draw into and the display object might be shared. Both is managed by Flex.</li>
<li>If a GraphicElement needs to be redrawn all other graphic elements that share the same DisplayObject will need to redraw themselves.</li>
<li>If creating a custom GraphicElement which shares a display object with other graphic elements, make sure to not clear the graphics, as this would wipe out drawings that have formerly been made by other elements.</li>
<li>Properties that are applied to the DisplayObject will be reflected by all graphic elements that share the same display object. Thus, the use of individual filters, color transformations, rotation etc. require the GraphicElement to own its own display object. The standard implementation takes care of this.</li>
<li>Since GraphicElement is not a display object, we need to get a reference to the graphics object for drawing. We can get this reference form the drawnDisplayObject member.</li>
<li>When drawing, the offset of the graphic element relative to its display object has to be taken into account.</li>
</ul>
<p><br/></p>
<h4>Creating a custom GraphicElement</h4>
<p>
In most cases, there is no need to create a custom graphic element, as the FXG Path element can be used to draw most of the required paths. The FXG Path element takes a string of drawing commands, parses it and translates it to drawing commands that are applied to the display object.<br />
This is well suited for static paths, e.g. the ones that are exported by Illustrator or Catalyst. </p>
<p>On the other hand, if a parameterized path is required we would need to dynamically build a string of graphic commands and Flex would need to parse them again, leading to unnecessary overhead. In such a case it might be better to create a custom GraphicElement that has the required properties and a drawing routine which takes them into account.</p>
<p>UPDATE: For the FXG-Path building approach see <a href="http://coenraets.org/blog/2010/09/building-lightweight-mobile-ready-charts-with-fxg/#more-1188">the great lightweight charts</a> by Christophe Coenraets.</p>
<p>Creating a custom graphic element is straightforward, a few things must be considered though (see source in the example).</p>
<ul>
<li>Override the <em>updateDisplayList()</em> function to call the custom drawing routine, or the<em> draw()</em> function when using a StrokedElement or a FilledElement.</li>
<li>Get the graphics object from (drawnDisplayObject as Sprite).graphics.</li>
<li>Respect the coordinates of the GraphicElement relative to the one of its DisplayObject. The 	<em>drawX </em>and <em>drawY</em> properties of a GraphicElement store the required offset.</li>
<li>Inside the drawing function do not clear the graphics since the element might use a shared display object and this would clear out graphics that have been drawn by other graphic elements.</li>
<li>The GraphicElement class implements the <em>IInvalidating</em> interface and can therefore take part in the invalidation process. If a property is set that affects the drawing, call the required invalidation functions and do the update later in the validation pass.</li>
</ul>
<p><br/></p>
<h4>Managing shared display object</h4>
<p>
The management of display objects for any GraphicElement is done by Flex via the Group that owns the element. In most cases there is no need to care about this, but if required, Flex offers some ways to indicate if a shared DisplayObject is ok to use or if an own display object is needed.</p>
<ul>
<li>Use <em>needsDisplayObject()</em> to indicate if a GraphicElement needs his own display object. The default implementation checks if any properties are used that require an own display object (rotation, color transformation, belnd modes etc.). </li>
<li>Likewise <em>canShareWithNext()</em> and <em>canShareWithPrevious()</em> can be used to indicate if a GraphicElement can be drawn onto the same display object as the previous/next one in the queue.</li>
<li>It is tempting to use the property <em>displaySharingMode</em>. This does not work as expected, as Flex uses this property to manage the objects and values set manually will be overwritten.</li>
<li>If Flex needs to create a display object for a graphic element it calls its <em>createDisplayObject()</em> function. The default implementation returns an object of type <em>InvalidatingSprite</em> that implements the<em> ISharedDisplayObject</em> interface.</li>
</ul>
<p><br/></p>
<h4>Interactivity</h4>
<p>
The purpose of the GraphicElement is to draw and manage graphics in an optimized manner (by sharing display objects). It is not an interactive element, the element is embedded within a Spark container and interaction should be done at a higher level.</p>
<p>To enable interactivity on a graphic element directly, a couple of things need to be done, which in most cases is actually bad practice. However, since this post is about inspecting the GraphicElement, let’s still see what needs to be done do to get interaction on a graphic element.</p>
<p>As mentioned above, the GraphicElement uses a DisplayObject to draw its graphics. The DisplayObject used by a GraphicElement is an <em>InvalidatingSprite </em>(extends from Sprite) that has the <em>mouseEnabled </em>and <em>mouseChildren </em>properties set to false. To get interactivity in a way that makes sense, we’d need to enable interaction on the InvalidatingSprite and disable display object sharing, as we do not want interaction to be affected by other graphic elements that share the same display object.</p>
<p>To turn on interactivity and to make sure interaction is not shared with other elements, we will need to </p>
<ul>
<li>override the <em>createDisplayObject()</em> function and</li>
<li>set the <em>mouseEnbled </em>and <em>mouseChildren </em>properties of the returned DisplayObject to true</li>
<li>add any listeners to the DisplayObject</li>
<li>override <em>needsDisplayObject</em>() and return true</li>
<li>likewise override <em>canShareWithNext</em>() and <em>canShareWithPrevious</em>() and return false</li>
</ul>
<p>You’ll find the source code for this in the example. View source is enabled.</p>
<p>This of course undermines the attempt of Flex for optimization when drawing graphic elements. If interaction is needed directly on a custom graphic object it might be better to use a SpriteVisualElement that is in fact an interactive object. See <a href="http://www.hulstkamp.com/2010/09/29/use-spritevisualelement-to-implement-a-simple-component-in-flex-4/555">the example</a> of a ruler implemented as a SpriteVisualElelement.
</p>
<p><br/></p>
<h4>Conclusion</h4>
<p>The GraphicElement is Spark’s key class to do optimized drawing. If a parameterized path needs to be drawn that updates often, it might be a better choice to create a custom GraphicElement instead on relying on the FXG-Path element. Interactivity can be enforced but it is better to handle it on higher levels. If you need a really light weight visual element, that offers interaction and can still take part in the Spark layout process consider using SpriteVisualElement.</p>
<p>For more information on traversing GraphicElements (or IVisualElements in general) read <a href="http://www.billdwhite.com/wordpress/?p=296">this</a> excellent write-up by Bill White. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/10/07/inspecting-and-creating-a-custom-spark-graphicelement/570/feed</wfw:commentRss>
		</item>
		<item>
		<title>Flex Tab Key Navigation for custom Spark PopUp</title>
		<link>http://www.hulstkamp.com/2010/10/06/flex-tab-key-navigation-for-custom-spark-popup/593</link>
		<comments>http://www.hulstkamp.com/2010/10/06/flex-tab-key-navigation-for-custom-spark-popup/593#comments</comments>
		<pubDate>Wed, 06 Oct 2010 18:09:23 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=593</guid>
		<description><![CDATA[This took me a while to figure out.
In a project I created a custom PopUp, nothing fancy, just a couple of text inputs. When I tried to enable Tab key navigation I set the required properties but Flex would simply ignore tab key navigation to the input fields in the pop up.
The Documentation about the [...]]]></description>
			<content:encoded><![CDATA[<p>This took me a while to figure out.</p>
<p>In a project I created a custom PopUp, nothing fancy, just a couple of text inputs. When I tried to enable Tab key navigation I set the required properties but Flex would simply ignore tab key navigation to the input fields in the pop up.</p>
<p>The Documentation about the IFocusManager states that a pop up will get its own FocusManager and its own tab loop.</p>
<p>After some tracing I found that my pop up and its child weren’t included in the FocusManager as focus objects. In fact, there was no FocusManager for my pop up at all.</p>
<p>The reason for this is that when the PopUpMangerImpl is about to create and configure the pop up, it checks if the pop up is a IFocusManagerContainer so that focus can be added.<span id="more-593"></span></p>
<p>Unfortunately my popup was a Group which does not implement the IFocusManagerContainer interface. Naturally no FocusManager would be created.</p>
<p>If you want to use a Spark Group as your pop up, the solution is to create a new class that extends from Group and implements the IFocusManagerContainer. Then use this class as the container for the pop up.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">.
.
.
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> AHPopUpGroup <span style="color: #0066CC;">extends</span> Group <span style="color: #0066CC;">implements</span> IFocusManagerContainer
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> AHPopUpGroup<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 *  @private
		 *  Storage for the defaultButton property.
		 */</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _defaultButton:IFlexDisplayObject;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Inspectable<span style="color: #66cc66;">&#40;</span>category=<span style="color: #ff0000;">&quot;General&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 *  The Button control designated as the default button for the container.
		 *  When controls in the container have focus, pressing the
		 *  Enter key is the same as clicking this Button control.
		 *
		 *  @default null
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> defaultButton<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:IFlexDisplayObject
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> _defaultButton;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 *  @private
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> defaultButton<span style="color: #66cc66;">&#40;</span>value:IFlexDisplayObject<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_defaultButton = value;
			ContainerGlobals.<span style="color: #006600;">focusedContainer</span> = <span style="color: #000000; font-weight: bold;">null</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
.
.
.</pre></div></div>

<p>And the mxml for the pop up becomes something like this</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;">.
.
.
&nbsp;
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!---</span>
<span style="color: #000000;">		Uses a Group that implements the IFocusManagerContainer</span>
<span style="color: #000000;">		--&gt;</span></span>
&nbsp;
			.
			.
			.
			TextInput, Buttons etc now get focus on tab key navigation
			.
			.
			.
&nbsp;
.
.
.</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/10/06/flex-tab-key-navigation-for-custom-spark-popup/593/feed</wfw:commentRss>
		</item>
		<item>
		<title>Use SpriteVisualElement to implement a simple component in Flex 4</title>
		<link>http://www.hulstkamp.com/2010/09/29/use-spritevisualelement-to-implement-a-simple-component-in-flex-4/555</link>
		<comments>http://www.hulstkamp.com/2010/09/29/use-spritevisualelement-to-implement-a-simple-component-in-flex-4/555#comments</comments>
		<pubDate>Wed, 29 Sep 2010 08:46:55 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

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

		<category><![CDATA[custom component]]></category>

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

		<category><![CDATA[layout pass]]></category>

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=555</guid>
		<description><![CDATA[In Flex 4 the standard way to create a custom control is to extend from SkinnableComponent, then implement the handling and management of events and states there and use a separate skin class for the visual representation of the component.
A class that gets less attention, but might be useful in a couple of scenarios to [...]]]></description>
			<content:encoded><![CDATA[<p>In Flex 4 the standard way to create a custom control is to extend from SkinnableComponent, then implement the handling and management of events and states there and use a separate skin class for the visual representation of the component.</p>
<p>A class that gets less attention, but might be useful in a couple of scenarios to create a control alternatively, is the SpriteVisualElement class.</p>
<p>This example shows an implementation of a simple ruler by extending the SpriteVisualElement.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHRulerSpriteVisualElement/AHRulerTest.html"><img src="http://www.hulstkamp.com/byard/flex4/AHRulerSpriteVisualElement/Ruler.png" alt="Ruler implemented by extending SpriteVisualElement" /></a></p>
<h3>The SpriteVisualElement</h3>
<p>The SpriteVisualElement is a display object that can be used inside spark containers.</p>
<p>It inherits from Sprite and implements the <span id="more-555"></span>IVisualElement interface and can therefore take part in the spark layout process. This means, properties like height, width, top, right, bottom, left etc. can be used to lay out a SpriteVisualElement like an UIComponent.</p>
<p>As it inherits from Sprite you’ll get a reference to the Graphics object to draw onto and all the common events of a flash interactive object (mouse, gestures, focus etc.) - in other words, a flash sprite that can be used within the spark architecture.</p>
<p>The SpriteVisualElement is light-weight and might be the better choice to implement some interactive object if you can live without all the bells and whistles of the UIComponent. Less features, less overhead.</p>
<h3>Use inside the Flex layout pass</h3>
<p>Implementing the ruler is like coding a sprite in Flash but there’s a little additional work required to hook it up with the Spark layout pass.</p>
<p>During the layout pass Flex calls</p>
<ul>
<li> setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean=true)</li>
</ul>
<p>We can override this function to call our drawing function.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setLayoutBoundsSize<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">height</span>:<span style="color: #0066CC;">Number</span>, postLayoutTransform:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">super</span>.<span style="color: #006600;">setLayoutBoundsSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>, <span style="color: #0066CC;">height</span>, postLayoutTransform<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">//call our drawing function</span>
	draw<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>, <span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The ruler has properties for the number of divisions and subdivisions. Both require an update to the graphics so we need to tell Flex about this. We can achieve this by calling</p>
<ul>
<li>invalidateParentSizeAndDisplayList()</li>
</ul>
<p>This will mark the parent component as invalid and will finally trigger a call to setLayoutBoundsSize on our object where we can redraw the graphics based on the updated values of the properties.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> divisions<span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	_divisions = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">max</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, value<span style="color: #66cc66;">&#41;</span>;
	invalidateParentSizeAndDisplayList<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3>Conclusion</h3>
<p>Depending on the requirements, you might want to - and usually do - use the full stack (SkinnableComponent/SparkSkin with nested components and FXG). Still, under some circumstances and regarding resources and performance, implementing a simple component as a SpriteVisualElement may be an option to be considered. Also note, a SpriteVisualElement can live within a spark container, thus you can add it to any skin and mix it up with FXG elements or Spark components.</p>
<p>Click <a href="http://www.hulstkamp.com/byard/flex4/AHRulerSpriteVisualElement/AHRulerTest.html">here</a> for the demo. View source is enabled.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/09/29/use-spritevisualelement-to-implement-a-simple-component-in-flex-4/555/feed</wfw:commentRss>
		</item>
		<item>
		<title>Nicer Tooltips and balloon help for Flex 4</title>
		<link>http://www.hulstkamp.com/2010/05/30/nicer-tooltips-and-balloon-help-for-flex-4/525</link>
		<comments>http://www.hulstkamp.com/2010/05/30/nicer-tooltips-and-balloon-help-for-flex-4/525#comments</comments>
		<pubDate>Sun, 30 May 2010 17:22:43 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

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

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

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

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

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

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

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

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

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=525</guid>
		<description><![CDATA[Tooltips are a good way to provide a user with additional information for controls and Flex offers Tooltips out of the box. The default Tooltips are fine but when text gets longer than just a few words usability may suffer.
For a current project, I needed more like a balloon help in place of tooltips and [...]]]></description>
			<content:encoded><![CDATA[<p>Tooltips are a good way to provide a user with additional information for controls and Flex offers Tooltips out of the box. The default Tooltips are fine but when text gets longer than just a few words usability may suffer.</p>
<p>For a current project, I needed more like a balloon help in place of tooltips and therefore decided not to use Flex default tooltips.</p>
<p>Regarding usability of the tooltips (balloon help) I want to be able to</p>
<ul>
<li>Display an optional tooltip title</li>
<li>Display formatted tooltip text</li>
<li>Display icons</li>
<li>Colorize the tooltip based on the semantic of the invoking control</li>
<li>Consistent Placement</li>
<li>Have all title, text, styles for the tooltips stored in a central location</li>
<li>Have the tooltips work in a generic and Flex-compliant way</li>
</ul>
<p>Flex gives you a few ways to customize tooltips from registering your custom ToolTip class to intercepting Tooltip events where you can hook up the custom tooltip. All of these approaches fall either short of the requirements I had or would add additional overhead so I simply created a custom ToolTipManager that would alter the behaviour of the default ToolTipManager.</p>
<p>Here&#8217;s a <a href="http://www.hulstkamp.com/byard/flex4/AHNiceToolTip/Flex4NiceTooltips.html">demo </a>of the final result, the approch is described further down.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHNiceToolTip/Flex4NiceTooltips.html"><br />
<img src="http://www.hulstkamp.com/byard/flex4/AHNiceToolTip/NiceToolTips.png" alt="NiceToolTips Demo" /><br />
</a></p>
<p>Since I like to have all resources centralized, the approach I followed was to <span id="more-525"></span>interpret the value of the <em>tooltip</em>- or the <em>errorString </em>property on a control not as the tooltip text to display but as a partial key to lookup title, text, styles etc. in a resource bundle. Form this partial key concrete keys would be derived to lookup the values for a controls tooltip.</p>
<p>For example</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> label=”OK” tooltip=”ToolTipBundle.okButton” <span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>would point to the ResourceBundle named  ‘<em>ToolTipBundle</em>’ and within this to all entries of a key starting with <em>tooltip.okButton</em>. Then the values for title, text etc. will be looked up by the custom ToolTipManager implementation and be applied to the tooltip.</p>
<p>The first token in the tooltip property specifies the name of the resource bundle, the second token the partial key for looking up the entries in the resource bundle. If no second token is specified the id (if any) of the component is being used.</p>
<p>Entries in the resource bundle then refer to the partial key submitted and define the concrete values to use for the tooltip.</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;">tooltip.okButton.title=Title of Tooltip
tooltip.okButton.text=Text for this tooltip
tooltip.okButton.styleName=CSS class to use for this tooltip
tooltip.okButton.placement=bottomRight|bottomLeft|topRight|topLeft
tooltip.okButton.color=Color of text
tooltip.okButton.chromeColor=Color of tooltip</pre></div></div>

<p>Color and chromeColor are there for convenience but can also be set via the CSS class specified by styleName. If any of the entries are not specified fallbacks to default values are used.</p>
<p>To make this work some methods of the default ToolTipManager need to be overwritten</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">override mx_internal <span style="color: #000000; font-weight: bold;">function</span> initializeTip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></pre></div></div>

<p>This is where the cstom implementation looks up the values and assigns them to the tooltip.</p>
<p>Additionally there’s the</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">override mx_internal <span style="color: #000000; font-weight: bold;">function</span> positionTip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></pre></div></div>

<p>method to position the tooltip in a custom way.</p>
<p>The custom ToolTipManager implementation is registered at loading using a custom preloader class.</p>
<p>The custom Tooltip itself  is a simple SkinnableComponent associated with a SparkSkin. There’s a required skin part for the text and a dynamic skin part for the label that only gets added if any value for a title  is provided.</p>
<p>For both title and text a RichText component is used within the skin so that formatting the text in a rich way is possible. The associated skin is then responsible to draw the tooltip based on the provided placement.<br />
Having set this up, usage of the custom tooltips for any app is simple.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span>               </span>
<span style="color: #000000;">    preloader=<span style="color: #ff0000;">&quot;com.hulstkamp.flex.spark.preloaders.CustomMixinPreloader&quot;</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>This will register the custom ToolTipManager.</p>
<p>For additional documentation see the source in the demo (view source is enabled).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/05/30/nicer-tooltips-and-balloon-help-for-flex-4/525/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

