<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>building blocks</title>
	<link>http://joelhooks.com</link>
	<description>"Test until fear turns to boredom"</description>
	<pubDate>Mon, 30 Jun 2008 17:52:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>BlazeDS, Vista, and Streaming AMF Channels - For the Children</title>
		<link>http://joelhooks.com/2008/06/30/blazeds-vista-and-streaming-amf-channels-for-the-children/</link>
		<comments>http://joelhooks.com/2008/06/30/blazeds-vista-and-streaming-amf-channels-for-the-children/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 08:07:34 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[AIR]]></category>

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

		<category><![CDATA[vista sucks]]></category>

		<guid isPermaLink="false">http://joelhooks.com/2008/06/30/blazeds-vista-and-streaming-amf-channels-for-the-children/</guid>
		<description><![CDATA[Maybe this isn't true for every installation of Vista, but we were having a helluva time tonight getting BlazeDS streaming AMF channels to communicate from an AIR client running on Vista. We were just trying to use the default example chat application to do some testing with AIR. It works great on XP, no problem [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe this isn't true for every installation of Vista, but we were having a helluva time tonight getting BlazeDS streaming AMF channels to communicate from an AIR client running on Vista. We were just trying to use the default example chat application to do some testing with AIR. It works great on XP, no problem at all. I sent out the little client to 4 or 5 people and it worked just as expected - that is until it hit a Vista machine (dum dum duuum).</p>
<p>Vista wouldn't connect at all, blank, nothing. I added some error checking to the application and it simply reported back that it couldn't connect. What the hell? My initial assumption, which turned out to be [edit] not so [/edit] correct, is that maybe Vista just sucks. After hours of combing the internet for The Answer™, I was having no luck what-so-ever.</p>
<p>Finally it occurs to me to check the Tomcat logs. Hey, a clue!</p>
<blockquote><p> [BlazeDS] [ERROR] Endpoint with id 'my-streaming-amf' cannot service the streaming request made with  HTTP 1.0. Only HTTP 1.1 is supported.</p></blockquote>
<p>That's weird, you'd think the MOST ADVANCED OPERATING SYSTEM KNOWN TO MAN (this is a joke, calm down linux/OS X aficionados) would be using the current protocol, and not something relegated to Windows 98 and IE 5.5. At least now I have something to search for, and search for, and search for...</p>
<p>There was one mention on <a href="http://coenraets.org/blog/2007/12/blazeds-open-sourcing-remoting-and-messaging/">Christophe Conreate's blog</a>, but no solution was provided. <a href="http://www.scribd.com/doc/2742051/blazeds-devguide">The BlazeDS DevGuide on Scribd </a>mentions the following:</p>
<blockquote><p>The streaming AMF and HTTP channels are HTTP-based streaming channels that the BlazeDS server can use to push updates to clients using a technique called HTTP streaming. These channels give you the option of using standard HTTP for real time messaging. This capability is supported for HTTP 1.1, but is not available for HTTP 1.0.</p></blockquote>
<p>This seems reasonable. AIR is advanced technology. It should be using the current standard in HTTP protocols, but why is Vista screwing me around? Getting desparate I am throwing out edge case searches and find <a href="http://www.techlicious.tv/2007/12/ie7-hack-downloading-several-things.html">this gem on techalicious.tv</a> about 'hacking' IE7 to allow more than 2 downloads at a time.</p>
<blockquote><p><font size="3">HKEY_ CURRENT_USER\ Software\Microsoft\ Windows\Current Version\Internet Settings</font></p></blockquote>
<p>Hey, what's that? A reg key marked <strong>EnableHttp1_1</strong> - which on my XP Machine is set to 1. Guess what it was set to on the Vista machine? 0. Yes, HTTP 1.1 was completely disabled. The key <strong>ProxyHttp1.1</strong> was also set to 0, which isn't a key on XP. We had checked in Charles, and all browsers including AIR were using 1.0. This made a lot more sense after the regkey was discovered. After a reboot everything works fine.</p>
<p>This setting can be changed without hacking the registry in the control panel under <strong>Internet Options</strong>&gt;<strong>Advanced</strong>&gt;<strong>HTTP 1.1 Settings</strong>. User Error? Safety Conscious OS defaults? Switch happy application install? I don't know.</p>
<p>If somebody could provide an explanation of what might have caused this, or if by some off chance somebody reading this is actually using Vista could check this key and see if it is on or off, it would be appreciated. Otherwise I am baffled, yet really really happy to have squished this particular bug.</p>
<p>Onward.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/06/30/blazeds-vista-and-streaming-amf-channels-for-the-children/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Complete Flex 3 CSS Style Properties List</title>
		<link>http://joelhooks.com/2008/06/15/complete-flex-3-css-style-properties-list/</link>
		<comments>http://joelhooks.com/2008/06/15/complete-flex-3-css-style-properties-list/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 21:52:17 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/2008/06/15/complete-flex-3-css-style-properties-list/</guid>
		<description><![CDATA[I was looking for a list of properties for modal window styles and stumbled across this:
 Flex 3.0 CSS Properties List 
]]></description>
			<content:encoded><![CDATA[<p>I was looking for a list of properties for modal window styles and stumbled across this:</p>
<p><a href="http://www.loscavio.com/downloads/blog/flex3_css_list/flex3_css_list.htm"> Flex 3.0 CSS Properties List </a></p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/06/15/complete-flex-3-css-style-properties-list/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SuperPanelPlus: Resizable Flex Panel Component with Accessible Styling</title>
		<link>http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/</link>
		<comments>http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/#comments</comments>
		<pubDate>Mon, 26 May 2008 20:38:02 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[components]]></category>

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

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

		<guid isPermaLink="false">http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/</guid>
		<description><![CDATA[The SuperPanel is an excellent component created by Wietse Veenstra. The styling is all hard-coded,  and I need to be able to change this. It also hard-codes the event that is triggered on close, and I wanted to be able to control this. So I added the appropriate meta-tags and properties to enable these options. [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.wietseveenstra.nl/blog/2007/04/flex-superpanel-v15/">SuperPanel</a> is an excellent component created by <a href="http://www.wietseveenstra.nl/blog/about/">Wietse Veenstra</a>. The styling is all hard-coded,  and I need to be able to change this. It also hard-codes the event that is triggered on close, and I wanted to be able to control this. So I added the appropriate meta-tags and properties to enable these options. Here is the result, link to the source is at the bottom:</p>

<object	type="application/x-shockwave-flash"
			data="http://joelhooks.com/examples/superPanelPlus/SuperPanelPlus.swf"
			width="500"
			height="400">
	<param name="movie" value="http://joelhooks.com/examples/superPanelPlus/SuperPanelPlus.swf" />
</object>
<p><a href="http://joelhooks.com/examples/superPanelPlus/srcview/">Source is here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Updated: Continuous scrolling image thumbnail and slideshow component for Flex.</title>
		<link>http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/</link>
		<comments>http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/#comments</comments>
		<pubDate>Sat, 24 May 2008 17:33:50 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

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

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

		<guid isPermaLink="false">http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/</guid>
		<description><![CDATA[I've updated this component to allow for keyboard and forward/back navigation. I'm still improving it, refactoring, but it is almost finished.
Here is the original post.
]]></description>
			<content:encoded><![CDATA[<p>I've updated <a href="http://joelhooks.com/examples/slideShow/">this component</a> to allow for keyboard and forward/back navigation. I'm still improving it, <em>refactoring</em>, but it is almost finished.</p>
<p>Here is the <a href="http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/">original post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Refactoring: Improving the Design of Existing Code</title>
		<link>http://joelhooks.com/2008/05/24/refactoring-improving-the-design-of-existing-code/</link>
		<comments>http://joelhooks.com/2008/05/24/refactoring-improving-the-design-of-existing-code/#comments</comments>
		<pubDate>Sat, 24 May 2008 17:25:02 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[object oriented concepts]]></category>

		<category><![CDATA[software architecture]]></category>

		<guid isPermaLink="false">http://joelhooks.com/2008/05/24/refactoring-improving-the-design-of-existing-code/</guid>
		<description><![CDATA[
 My code smells bad. There is no doubt about it. As soon as I read that metaphor my head was nodding with understanding. This book is a classic, and I recommend it to anybody that wants to improve their coding habits and create more flexible applications that don't make you sad and angry.
 It is a [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Technology/dp/0201485672"><img src="http://joelhooks.com/wp-content/uploads/2008/05/refactoring_cover.jpg" alt="refactoring_cover.jpg" height="298" width="232" /></a></p>
<p align="left"> My code smells bad. There is no doubt about it. As soon as I read that metaphor my head was nodding with understanding. <a href="http://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Technology/dp/0201485672">This book</a> is a classic, and I recommend it to anybody that wants to improve their coding habits and create more flexible applications that don't make you <strong><font color="#3366ff">sad</font></strong> and <strong><font color="#ff0000">angry</font></strong>.</p>
<p align="left"> It is a thick volume, but 2/3s of the text is the catalog of refactorings. This makes the text describing the <a href="http://www.refactoring.com/">concepts of refactoring</a> a relatively short read. Mr Fowler guides you through the process, providing a simple example and clearly explaining the thought processes involved. The catalog covers a wide range of common approaches to refactoring an application.</p>
<p align="left">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/05/24/refactoring-improving-the-design-of-existing-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Continuous scrolling image thumbnail and slideshow component for Flex.</title>
		<link>http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/</link>
		<comments>http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/#comments</comments>
		<pubDate>Sun, 11 May 2008 09:31:16 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

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

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

		<guid isPermaLink="false">http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/</guid>
		<description><![CDATA[
<object	type="application/x-shockwave-flash"
			data="http://joelhooks.com/examples/slideShow/VESlideShow.swf"
			width="500"
			height="530">
	<param name="movie" value="http://joelhooks.com/examples/slideShow/VESlideShow.swf" />
</object>
I've been working on improvements for this thumbnail/slideshow component. The way the continuous scroll flows is very nice. It provides a very fluid feel. I have it reading XML from SlideShowPro director. SSPD simply gives a structure of albums and images, so the component should work from essentially any XML source [...]]]></description>
			<content:encoded><![CDATA[
<object	type="application/x-shockwave-flash"
			data="http://joelhooks.com/examples/slideShow/VESlideShow.swf"
			width="500"
			height="530">
	<param name="movie" value="http://joelhooks.com/examples/slideShow/VESlideShow.swf" />
</object>
<p>I've been working on improvements for this thumbnail/slideshow component. The way the continuous scroll flows is very nice. It provides a very fluid feel. I have it reading XML from SlideShowPro director. SSPD simply gives a structure of albums and images, so the component should work from essentially any XML source as long as it follows the same schema:</p>
<pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;gallery<span style="font-weight: bold; color: black;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;album</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;DESCRIPTION&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;TITLE&quot;</span> <span style="color: #000066;">tn</span>=<span style="color: #ff0000;">&quot;PATH&quot;</span> <span style="color: #000066;">lgpath</span>=<span style="color: #ff0000;">&quot;PATH&quot;</span> <span style="color: #000066;">tnpath</span>=<span style="color: #ff0000;">&quot;PATH&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;FILENAME&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
          ...
     <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/album<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/gallery<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre>
<p>There is still a good bit of work to do. Right now the slideshow is coupled with the thumbnail container. I think that should be seperated, because I can see various uses for thumbnails outside of a slideshow. It needs style and event metadata so that it will function as a proper Flex component. I am also going to roll it into mediated PureMVC components for inclusion in <a href="http://vesession.com">VE:Session</a>.</p>
<p>The source is <a href="http://joelhooks.com/examples/slideShow/srcview/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Enumerating data types in Actionscript 3 (AS3)</title>
		<link>http://joelhooks.com/2008/04/28/enumerating-data-types-in-actionscript-3-as3/</link>
		<comments>http://joelhooks.com/2008/04/28/enumerating-data-types-in-actionscript-3-as3/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 16:12:51 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

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

		<category><![CDATA[object oriented concepts]]></category>

		<guid isPermaLink="false">http://joelhooks.com/2008/04/28/enumerating-data-types-in-actionscript-3-as3/</guid>
		<description><![CDATA[In computer programming, an enumerated type is an abstract data type used to model an attribute that has a specific number of options (or identifiers) such as the suit of a playing card (i.e. a Club, Diamond, Heart or Spade). Using this type allows the program to handle the attribute more efficiently than a string [...]]]></description>
			<content:encoded><![CDATA[<blockquote>In <a href="http://en.wikipedia.org/wiki/Computer_programming" title="Computer programming">computer programming</a>, an <strong>enumerated type</strong> is an <a href="http://en.wikipedia.org/wiki/Abstract_data_type" title="Abstract data type">abstract data type</a> used to model an attribute that has a specific number of options (or <a href="http://en.wikipedia.org/wiki/Identifier" title="Identifier">identifiers</a>) such as the suit of a playing card (i.e. a Club, Diamond, Heart or Spade). Using this type allows the program to handle the attribute more efficiently than a string while maintaining the readability of the source code.<br />
-from <a href="http://en.wikipedia.org/wiki/Enumerated_type">Wikipedia</a></p></blockquote>
<p>I've found this method (illustrated in code below) for enumeration of datasets to be useful, and at this point even essential, in my applications. Prior to this I was actually cutting and pasting the arrays that I was using in my various combo boxes and other selection components as dataProviders. By breaking the dataset into an enumeration class, it makes it easy to maintain the list and lets the dataset function as a first class citizen, ensuring that your data is consistent throughout the application.</p>
<pre class="actionscript">package enum
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">/**
	 * CloudTypeEnum enumerates cloud types.
	 * @author JHooks
	 *
	 */</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CloudTypeEnum
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const NONE:CloudTypeEnum			= <span style="color: #000000; font-weight: bold;">new</span> CloudTypeEnum<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;None&quot;</span>,	   <span style="color: #cc66cc;">-1</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const CUMULUS:CloudTypeEnum		= <span style="color: #000000; font-weight: bold;">new</span> CloudTypeEnum<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Cumulus&quot;</span>, 	<span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const STRATUS:CloudTypeEnum		= <span style="color: #000000; font-weight: bold;">new</span> CloudTypeEnum<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Stratus&quot;</span>, 	<span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const CIRRUS:CloudTypeEnum		= <span style="color: #000000; font-weight: bold;">new</span> CloudTypeEnum<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Cirrus&quot;</span>, 		<span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const NIMBUS:CloudTypeEnum		= <span style="color: #000000; font-weight: bold;">new</span> CloudTypeEnum<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Nimbus&quot;</span>, 		<span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> value:<span style="color: #0066CC;">String</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> ordinal:<span style="color: #0066CC;">int</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * CloudTypeEnum constructor
		 * @param value
		 * @param ordinal
		 *
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> CloudTypeEnum<span style="color: #66cc66;">&#40;</span> value:<span style="color: #0066CC;">String</span>, ordinal:<span style="color: #0066CC;">int</span> <span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">value</span> = value;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">ordinal</span> = ordinal;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * A list of cloud types
		 * @return
		 *
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">list</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#91;</span> CUMULUS,
					 STRATUS,
					 CIRRUS,
					 NIMBUS <span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * A list of cloud types appropriate for use in ComboBox and other
		 * selection components as a DataProvider
		 *
		 * myComboBox.dataProvider = CloudTypeEnum.cList;
		 * @return
		 *
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> cList<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">list</span>.<span style="color: #0066CC;">unshift</span><span style="color: #66cc66;">&#40;</span> NONE <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * Select a cloud type by its value property
		 * @param value
		 * @return
		 *
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> selectByValue<span style="color: #66cc66;">&#40;</span> value:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#41;</span>:TaskTypeEnum
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> cloudType:TaskTypeEnum <span style="color: #b1b100;">in</span> CloudTypeEnum.<span style="color: #0066CC;">list</span> <span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> value == cloudType.<span style="color: #006600;">value</span> <span style="color: #66cc66;">&#41;</span>
					<span style="color: #b1b100;">return</span> cloudType;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> NONE;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre>
<p>Thanks to <a href="http://content.futurescale.com/">Cliff Hall</a> who showed this to me via one of his PureMVC demo applications. For the life of me I can't remember which one.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/04/28/enumerating-data-types-in-actionscript-3-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Perfecting OO&#8217;s Small Classes and Short Methods</title>
		<link>http://joelhooks.com/2008/04/24/perfecting-oos-small-classes-and-short-methods/</link>
		<comments>http://joelhooks.com/2008/04/24/perfecting-oos-small-classes-and-short-methods/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 15:37:05 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[object oriented concepts]]></category>

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

		<guid isPermaLink="false">http://joelhooks.com/2008/04/24/perfecting-oos-small-classes-and-short-methods/</guid>
		<description><![CDATA[This is here as sort of a TODO for myself this year. I want to try this experiment. I really like the concept of breaking down OO projects into this extra fine granularity.
He suggests writing a 1000-line program with the constraints listed below. These constraints are intended to be excessively restrictive, so as to force [...]]]></description>
			<content:encoded><![CDATA[<p>This is here as sort of a TODO for myself this year. I want to <a href="http://binstock.blogspot.com/2008/04/perfecting-oos-small-classes-and-short.html">try this experiment</a>. I really like the concept of breaking down OO projects into this extra fine granularity.</p>
<blockquote><p>He suggests writing a 1000-line program with the constraints listed below. These constraints are intended to be excessively restrictive, so as to force developers out of the procedural groove. I guarantee if you apply this technique, their code will move markedly towards object orientation. The restrictions (which should be mercilessly enforced in this exercise) are:</p>
<p>1. Use only one level of indentation per method. If you need more than one level, you need to create a second method and call it from the first. This is one of the most important constraints in the exercise.</p>
<p>2. Don’t use the ‘else’ keyword. Test for a condition with an if-statement and exit the routine if it’s not met. This prevents if-else chaining; and every routine does just one thing. You’re getting the idea.</p>
<p>3. Wrap all primitives and strings. This directly addresses “primitive obsession.” If you want to use an integer, you first have to create a class (even an inner class) to identify it’s true role. So zip codes are an object not an integer, for example. This makes for far clearer and more testable code.</p>
<p>4. Use only one dot per line. This step prevents you from reaching deeply into other objects to get at fields or methods, and thereby conceptually breaking encapsulation.</p>
<p>5. Don’t abbreviate names. This constraint avoids the procedural verbosity that is created by certain forms of redundancy—if you have to type the full name of a method or variable, you’re likely to spend more time thinking about its name. And you’ll avoid having objects called Order with methods entitled shipOrder(). Instead, your code will have more calls such as Order.ship().</p>
<p>6. Keep entities small. This means no more than 50 lines per class and no more than 10 classes per package. The 50 lines per class constraint is crucial. Not only does it force concision and keep classes focused, but it means most classes can fit on a single screen in any editor/IDE.</p>
<p>7. Don’t use any classes with more than two instance variables. This is perhaps the hardest constraint. Bay’s point is that with more than two instance variables, there is almost certainly a reason to subgroup some variables into a separate class.</p>
<p>8. Use first-class collections. In other words, any class that contains a collection should contain no other member variables. The idea is an extension of primitive obsession. If you need a class that’s a subsumes the collection, then write it that way.</p>
<p>9. Don’t use setters, getters, or properties. This is a radical approach to enforcing encapsulation. It also requires implementation of dependency injection approaches and adherence to the maxim “tell, don’t ask.”</p></blockquote>
<p>I went ahead and ordered the <a href="http://www.amazon.com/ThoughtWorks-Anthology-Technology-Innovation-Programmers/dp/193435614X">ThoughtWorks book </a>too. I've used their <a href="http://studios.thoughtworks.com/mingle-project-intelligence">Mingle product</a>, which I find very compelling, so I am looking forward to their essays.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/04/24/perfecting-oos-small-classes-and-short-methods/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Continuous scrolling image thumbnail component for Flex.</title>
		<link>http://joelhooks.com/2008/04/21/continuous-scrolling-image-thumbnail-component-for-flex/</link>
		<comments>http://joelhooks.com/2008/04/21/continuous-scrolling-image-thumbnail-component-for-flex/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 07:40:12 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

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

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

		<guid isPermaLink="false">http://joelhooks.com/2008/04/21/continuous-scrolling-image-thumbnail-component-for-flex/</guid>
		<description><![CDATA[Here is the beginnings of a full featured open-source continuous scroll thumbnail component for Flex. It is rough right now, but I plan to polish it and make it something useful. This format is really appealing, as it gives the user a seamless view of a gallery, without any jumps or aggravating scroll bars. Up [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the beginnings of a full featured open-source continuous scroll thumbnail component for Flex. It is rough right now, but I plan to polish it and make it something useful. This format is really appealing, as it gives the user a seamless view of a gallery, without any jumps or aggravating scroll bars. Up until now I have been using H and V Lists in flex for my thumbnailing, but they are ugly and don't provide as rich of an experience.</p>
<p>The <a href="http://www.afcomponents.com/components/scroll_panel_as3/">Scroll Panel from AFComponents</a> was my first choice. It is a very nice component, well priced, and would be just what I need, if not for the fact that <a href="http://vesession.com/">my project is open-source</a> and using a commercial component sorta kills the whole thing. After scouring the internet I finally stumbled upon the work <a href="http://www.f-90.co.uk/blog/?p=7">Peter Wright has put in on a perpetual scrolling list</a>.</p>
<p>I've modified it to accept an XML list of image objects, as well as perform horizontally. It is also functioning as a slideshow, and I want to allow it to go either H or V depending on the need. It should shape up to be a nice reusable component. Much thanks to Peter for supplying the code to get me started.</p>

<object	type="application/x-shockwave-flash"
			data="http://joelhooks.com/examples/slideScroll/ImageScroll.swf"
			width="490"
			height="165">
	<param name="movie" value="http://joelhooks.com/examples/slideScroll/ImageScroll.swf" />
</object>
<p><a href="http://joelhooks.com/examples/slideScroll/ImageScroll.swf">Source Enabled </a></p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/04/21/continuous-scrolling-image-thumbnail-component-for-flex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using the Senocular AS3 TransformTool in Flex</title>
		<link>http://joelhooks.com/2008/04/20/using-the-senocular-as3-transformtool-in-flex/</link>
		<comments>http://joelhooks.com/2008/04/20/using-the-senocular-as3-transformtool-in-flex/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 17:01:31 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

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

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

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

		<guid isPermaLink="false">http://joelhooks.com/2008/04/20/using-the-senocular-as3-transformtool-in-flex/</guid>
		<description><![CDATA[Hey,I am so interested about that you had ever used the ‘TransformTool’ library in your Flex project. But there is little examples showing how to use it in flex, Would you please share some example about how to use ‘TransformTool’ in Flex? I have tried as such a way:
but it failed at line
canvas.addChild(defaultTool);
Can you give [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Hey,I am so interested about that you had ever used the ‘TransformTool’ library in your Flex project. But there is little examples showing how to use it in flex, Would you please share some example about how to use ‘TransformTool’ in Flex? I have tried as such a way:</p>
<p>but it failed at line<br />
canvas.addChild(defaultTool);<br />
Can you give any hints? Thanks.</p></blockquote>
<p>Like most pure AS3 display classes, the <a href="http://www.senocular.com/demo/TransformToolAS3/TransformTool.html">TransformTool</a> needs to be added to a UIComponent wrapper to function properly in Flex.</p>

<object	type="application/x-shockwave-flash"
			data="http://joelhooks.com/examples/transformTool/TransformToolFlexExample.swf"
			width="490"
			height="500">
	<param name="movie" value="http://joelhooks.com/examples/transformTool/TransformToolFlexExample.swf" />
</object>
<p><a href="http://joelhooks.com/examples/transformTool">Source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/04/20/using-the-senocular-as3-transformtool-in-flex/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.598 seconds -->
