<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Brian Kotek: Inversion of Control - Development</title>
			<link>http://www.briankotek.com/blog/index.cfm</link>
			<description>Brian Kotek on ExtJS, DeftJS, CoffeeScript, Java, Groovy, Grails, Design Patterns, and Object-Oriented Programming</description>
			<language>en-us</language>
			<pubDate>Fri, 24 May 2013 13:51:27 -0700</pubDate>
			<lastBuildDate>Tue, 22 Nov 2011 08:39:00 -0700</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>brian428@briankotek.com</managingEditor>
			<webMaster>brian428@briankotek.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>brian428@briankotek.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Thoughts on Flex and HTML5</title>
				<link>http://www.briankotek.com/blog/index.cfm/2011/11/22/Thoughts-on-Flex-and-HTML5</link>
				<description>
				
				It has now been a little over a week since Adobe revealed its plans for the mobile Flash player and the Flex SDK. Now that the dust has started to settle and some additional information has been made available, I wanted to give my candid impression of what these announcements mean.

I&apos;ll begin by stating the obvious: Adobe did a very poor job of coordinating and delivering these announcements. Anything I say at this point will simply be beating a dead horse. This was a PR disaster and one can only hope they learn something (ideally, many somethings) from sifting through the wreckage. I won&apos;t dwell any further on this since we have no control over what happened and I&apos;m interested in looking at what these announcements mean going forward.

I suspect that the news that Adobe was stopping work on the mobile Flash player didn&apos;t actually surprise very many people. Further, I doubt many people actually care much. Yes, it&apos;s nice to be able to view Flash content on my Android tablet. And yes, its easy to forget that the existing 11.1 player will continue to work for a long time and allow people to keep viewing the vast majority of Flash content. But no one was building browser-based mobile Flash sites. Why? Because you still had to create a non-Flash version of it if you wanted to target all mobile devices. Once the sting of all the &quot;Steve Jobs Won&quot; gloating wears off, I believe most people will see the wisdom of this decision. Some people appear to have a problem with this choice, but no one I know really cared at all about this part of Adobe&apos;s recent announcements.

So now we move on to the other big news: Adobe announcing that the Flex SDK would become an Apache project and would go forward under non-Adobe governance. This took a lot of people by surprise, to put it mildly.

First off, let me say that I don&apos;t have an issue with the idea of Flex going fully open-source. Yes, Flex was already &quot;open-source&quot;, but we all know it really wasn&apos;t. You could view the code, but Adobe still exerted complete control over what changes were made. Anyone who ever tried to submit a patch or improvement can attest to this. Those restrictions are now gone. I firmly believe that if this announcement had been made at MAX, rather than in the middle of this PR breakdown, the cheering from the audience would have brought the roof down.

I know a number of the people on the Spoon project, many of whom will probably be part of the group which will govern the ongoing work on the Flex SDK. They&apos;re all very bright people and I have little doubt that the SDK will actually see some nice benefits from this move. So from a purely technical standpoint, I think this can and probably will be a good thing.

However, regardless of what you think about the SDK move, another portion of Adobe&apos;s announcement overshadowed even this news. In a post that will probably live in infamy, some of the Flex management stated &quot;In the long-term, we believe HTML5 will be the best technology for enterprise application development.&quot;  

How Adobe failed to predict the resulting uproar I have no idea. But apparently they didn&apos;t. As a result, we saw an explosion of questions and concerns that essentially boiled down to: Is Adobe saying Flex is dead?

I&apos;ll admit I wondered this myself. Given this statement, what was I supposed to tell the clients to whom I&apos;ve evangalized Flex? Is my investment in Flex now ashes? I was angry and confused. Then I tried to detach myself from my emotional reaction and consider the situation objectively. I want to share a few of my thoughts and conclusions about this.

First, one has to consider the harsh reality that Adobe never really figured out how to make any money on Flex. Their only real revenue came from Flash Builder, and it seems highly unlikely to me that sales of FB offset the money they&apos;ve spent on Flex. And even that revenue is further reduced by the presence of competing tools like FlashDevelop and IntelliJ IDEA. Considered in this light, Adobe&apos;s decision to reduce the amount of resources it dedicates to Flex does make some sense, even if we don&apos;t necessarily like it. Offloading part of that cost onto the community is one way they can try to make those numbers even out.

Next, I&apos;m not sure about everyone else, but I for one always believed that &lt;i&gt;eventually&lt;/i&gt; we&apos;d be able to build Flex-like apps in HTML. Some of this can be done already, but it is disjointed, using a mishmash of libraries, and painful. Building RIAs in JavaScript is agonizing compared to Flex and AS3. But that&apos;s slowly changing as the tools get better and the libraries become more refined and standardized. My guess is that in two or three years we&apos;ll start seeing real parity with Flex on both features and tooling. I knew this before Adobe&apos;s announcement, so does it really change much? Or did the announcement, as poorly as it was delivered, serve as a stark reminder that Flex is in some ways a bridge between now and this eventual HTML-based future?

I think this may be where some of the pain is coming from. No one wants to be told that the platform they&apos;re heavily invested in is probably going to be supplanted in the coming years. But can anyone really look at the current situation and draw another conclusion? Adobe seems to have two options here: keep pouring resources into Flex and delay the switchover a bit, or start changing direction and begin the task of improving HTML tooling from a RIA perspective. It&apos;s clear which way they&apos;ve chosen to go.

So where does that leave us? Like many folks, I poked around the web last week just to get an idea of the current state of HTML RIA development. It wasn&apos;t pretty. I found dozens of libraries, frameworks, UI components, tools, and workarounds to mimic proper OO features in JavaScript. To put it bluntly, it&apos;s total chaos. 

We&apos;re a long way from being able to drop Flex and start building enterprise RIAs in HTML. Which is fine with me. The projects I&apos;m currently involved in are multi-year efforts built with Flex, and these aren&apos;t going away. I&apos;ll be building and maintaining apps with Flex for quite a while.

On the other hand, the writing seems to be on the wall. This isn&apos;t going to last forever. Developers who have been around the block a few times know it is always a bad idea to put all of your eggs in one basket. So I&apos;ll be keeping my eye on the HTML RIA space, trying things out as that platform coalesces. GWT looks interesting, especially paired with Groovy and SmartGWT. So does brunch.io. Trying out new technologies is one of the things I love about programming, and that&apos;s certainly not about to stop.

Will this change on the horizon amount to a career and knowledge &quot;reset&quot;? Is everything we&apos;ve worked so hard to learn going to be thrown out the window? From my point of view, absolutely not. Looking around at the HTML/JS world, I see a lot of people trying to solve problems that we&apos;ve already gone through. Solid OO design? Rich client models? Real-time messaging? Persistent client state? Separation of UI from client-side logic? Large-scale event-driven applications? Architecting and managing huge RIA codebases?

Sound familiar? They should, because they&apos;re probably problems you&apos;ve already dealt with a number of times. The programming language might change, and the UI component APIs may shift, but these fundamental problems aren&apos;t going anywhere. And I think experienced Flex developers are going to be very well suited to helping businesses and clients solve those problems, both now and in the future. Even if the platform eventually shifts to HTML5. As they say, the only constant is change. And honestly, life would be pretty boring any other way.
				
				</description>
				
				
				<category>Development</category>
				
				<category>Flex</category>
				
				<category>Personal</category>
				
				<pubDate>Tue, 22 Nov 2011 08:39:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2011/11/22/Thoughts-on-Flex-and-HTML5</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Spark Skins, Components, and Presentation Models</title>
				<link>http://www.briankotek.com/blog/index.cfm/2011/7/14/Spark-Skins-Components-and-Presentation-Models</link>
				<description>
				
				In the Flex 3.x world, I adopted the Presentation Model pattern and applied it just about everywhere. Separating the non-view logic made perfect sense, far better than the code-behind approach, and cleaned up the view components wonderfully.

Then Spark came along in Flex 4, and things have changed. The framework now has built-in support for separating the &quot;view&quot; (skin) from the &quot;controller&quot; (host component). As I&apos;ve been using skinning more and more, I&apos;ve come to wonder if or how the presentation model approach applies in the Spark skin world.

To try and answer that question, I created a fairly simple but non-trivial test application that creates the same views and behavior in three ways. I&apos;ve heard each of these three ways mentioned at various times by various people, so I used them as the most commonly proposed options:

&lt;ul&gt;
&lt;li&gt;Supply a presentation model to both the skin and the host component, and let it act as a bridge between the two. In other words, the skin knows nothing about the host component, and the host component knows nothing about the skin. Create the PM as a self-contained set of methods and properties that can be applied to any relevant skin or host component. In essence, if the skin is the &quot;view&quot; and the component is the &quot;controller&quot;, the PM is the &quot;model&quot; in this mini-MVC configuration.&lt;/li&gt;
&lt;li&gt;Supply a presentation model to only the host component, and have the host component push state into the skin. In this case, the skin knows nothing about the host component, but the host component it tightly coupled to the skin.&lt;/li&gt;
&lt;li&gt;Drop the presentation model approach completely. All behavior and properties are held in the host component, and the skin binds to host properties and invokes methods on the host. In this setup, the host knows nothing about the skin, but the skin is tightly coupled to the host.&lt;/li&gt;
&lt;/ul&gt;

After building all of these, there are pros and cons to each approach. And some definitely seem to have more pros or more cons than others. The one thing I tend to focus on is what kind of change and what kind of reuse each approach allows for. If you &lt;a href=&quot;http://www.briankotek.com/blog/files/pmskinning/SkinPMTests.html&quot; target=&quot;_blank&quot;&gt;view the running test application&lt;/a&gt;, you&apos;ll see I&apos;ve noted some thoughts on each in the sidebar. View source is also enabled, so if you want to look through the code or download it, feel free.

I&apos;m very interested to hear other people&apos;s thoughts on this as well. So if you have an opinion on this, or any issues with how I&apos;ve built any of these versions, by all means please comment below!
				
				</description>
				
				
				<category>Development</category>
				
				<category>Design Patterns</category>
				
				<category>Flex</category>
				
				<pubDate>Thu, 14 Jul 2011 12:37:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2011/7/14/Spark-Skins-Components-and-Presentation-Models</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Swiz Console 1.2, and an introduction to AOP in ActionScript</title>
				<link>http://www.briankotek.com/blog/index.cfm/2011/7/6/Swiz-Console-12-and-an-introduction-to-AOP-in-ActionScript</link>
				<description>
				
				First just a quick note that I have updated the Swiz Console to version 1.2, which maintains parity with Swiz version 1.2. This update adds a tab to show views that have been processed with ViewAdded and ViewRemoved. As always, you can grab the swc or the source at &lt;a href=&quot;https://github.com/brian428/Swiz-Console&quot; target=&quot;_blank&quot;&gt;my GitHub repository&lt;/a&gt;.

In other news, Chris Scott put up a blog entry on the Swiz site with &lt;a href=&quot;http://swizframework.org/post.cfm/introduction-to-aspect-oriented-programming-for-actionscript&quot; target=&quot;_blank&quot;&gt;an overview of aspect-oriented programming in AS3&lt;/a&gt;. One might speculate that this is a lead-in to some very cool stuff coming in the Swiz framework, if one were so inclined...;-)
				
				</description>
				
				
				<category>Development</category>
				
				<category>Flex</category>
				
				<category>Swiz</category>
				
				<pubDate>Wed, 06 Jul 2011 10:35:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2011/7/6/Swiz-Console-12-and-an-introduction-to-AOP-in-ActionScript</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Fix for Using Subclipse Keyboard Shortcuts</title>
				<link>http://www.briankotek.com/blog/index.cfm/2011/6/8/Fix-for-Using-Subclipse-Keyboard-Shortcuts</link>
				<description>
				
				Just a note for anyone who uses Subclipse within Eclipse to work with a Subversion repository. In the past, you could easily assign keyboard shortcuts within Eclipse for SVN update, commit, etc. In the newer builds of Eclipse I couldn&apos;t get this to work.

After searching Google, I found the answer in &lt;a href=&quot;http://subclipse.tigris.org/issues/show_bug.cgi?id=1159&quot; target=&quot;_blank&quot;&gt;this Subclipse ticket&lt;/a&gt;. In order to get the shortcuts to work, you must go to Window &gt; Customize Perspective, then under the Command Groups Availability tab, check the SVN option. It may require a restart of Eclipse, but the Subclipse keyboard shortcuts will now work.
				
				</description>
				
				
				<category>Development</category>
				
				<category>General</category>
				
				<pubDate>Wed, 08 Jun 2011 12:38:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2011/6/8/Fix-for-Using-Subclipse-Keyboard-Shortcuts</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Swiz 1.0 Is Ready, and Updated Module and Chaining Demos</title>
				<link>http://www.briankotek.com/blog/index.cfm/2010/12/15/Swiz-10-Is-Ready-and-Updated-Module-and-Chaining-Demos</link>
				<description>
				
				Today marks a big milestone in development of the Swiz framework for Flex and ActionScript: the team is proud to announce that version 1.0 has been released. This has been coming for a while, but we wanted to be sure we weren&apos;t rushing things and that the framework was really solid and ready for the 1.0 designation.

&lt;a href=&quot;http://www.swizframework.org/assets/content/swiz-framework-v1.0.0.zip&quot; target=&quot;_blank&quot;&gt;Download the final Swiz 1.0 distribution&lt;/a&gt;, which contains the swc, API docs, and source code. If you like, &lt;a href=&quot;http://swizframework.jira.com/wiki/display/SWIZ/Release+Notes&quot; target=&quot;_blank&quot;&gt;check out the release notes&lt;/a&gt; to see what&apos;s new since RC2. Finally, the &lt;a href=&quot;http://wiki.swizframework.org/&quot; target=&quot;_blank&quot;&gt;wiki documentation&lt;/a&gt; has been updated to reflect the new changes.

To go along with the final 1.0 release, I&apos;ve pushed some updated demo apps to the &lt;a href=&quot;https://github.com/swiz/swiz-examples&quot; target=&quot;_blank&quot;&gt;swiz-examples Github repository&lt;/a&gt; to show more of the chaining API and the inter-module communication options that Swiz brings to the table. If you&apos;d rather see running code, I&apos;ve got the &lt;a href=&quot;http://www.briankotek.com/blog/files/swiz_10_chaining_demo/SwizChainingDemo.html&quot; target=&quot;_blank&quot;&gt;Chaining Demo&lt;/a&gt; and &lt;a href=&quot;http://www.briankotek.com/blog/files/swiz_10_module_communication/Main.html&quot; target=&quot;_blank&quot;&gt;Module Communication Demo&lt;/a&gt; applications live on my site. The view source option is enabled, so feel free to browse the code to see what&apos;s going on.

That&apos;s all for now. I hope folks find the examples helpful!
				
				</description>
				
				
				<category>Development</category>
				
				<category>Flex</category>
				
				<category>Swiz</category>
				
				<pubDate>Wed, 15 Dec 2010 09:37:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2010/12/15/Swiz-10-Is-Ready-and-Updated-Module-and-Chaining-Demos</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>CFUnited Clean Code and Swiz Presentations Now Online</title>
				<link>http://www.briankotek.com/blog/index.cfm/2010/8/4/CFUnited-Clean-Code-and-Swiz-Presentations-Now-Online</link>
				<description>
				
				Just a quick note that, as promised, my presentations from CFUnited are now online!

&lt;a href=&quot;http://slidesix.com/view/Brian-Kotek--Clean-Code--CFUnited-2010&quot; target=&quot;_blank&quot;&gt;Clean Code&lt;/a&gt;

&lt;a href=&quot;http://slidesix.com/view/Brian-Kotek--Swiz--CFUnited-2010&quot; target=&quot;_blank&quot;&gt;The Swiz Framework for Flex and ActionScript&lt;/a&gt;

Thanks to all who attended!
				
				</description>
				
				
				<category>Development</category>
				
				<category>Flex</category>
				
				<category>Conferences</category>
				
				<category>Presentations</category>
				
				<category>Swiz</category>
				
				<pubDate>Wed, 04 Aug 2010 15:33:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2010/8/4/CFUnited-Clean-Code-and-Swiz-Presentations-Now-Online</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>An Awesome Alternative to a Traditional Mouse</title>
				<link>http://www.briankotek.com/blog/index.cfm/2010/2/25/An-Awesome-Alternative-to-a-Traditional-Mouse</link>
				<description>
				
				Like most of you, I sit in front of a computer for a large part of my day. Over time, sitting and working on the computer has caused me varying physical issues, like back, wrist, and elbow pain. To alleviate this, I bought a desk with an adjustable height, an ergonomic keyboard, and an Aeron chair. These have helped greatly. But the one issue that kept coming back was wrist pain. I tried several types of mice, with varying shapes, but none of them dealt completely with the issue. For me, a big part of the discomfort in my hand and elbow came from constantly reaching over for the mouse, as well as gripping it. It might sound silly to some, but when you do this thousands of times, it adds up!

Then, about six months ago, I found a blurb about the &lt;a href=&quot;http://ergo.contourdesign.com/products/product-detail.aspx?id=50&quot; target=&quot;_blank&quot;&gt;RollerMouse Free&lt;/a&gt; on some tech site. Having used it daily for a while, I can say that this mouse is an excellent option to a traditional mouse.

The RollerMouse sits directly under your keyboard, just past the space bar. To control the cursor, you roll a bar up, down, and side to side. It sounds bizarre, but it works very nicely and was easy to get used to. The bar moves very smoothly, and is very accurate. You can easily move it with your thumbs, and you barely have to move your hands off the keyboard, or you can use your fingertips. Either way, it&apos;s far better than reaching over for a normal mouse.

I still keep a regular mouse as well, but I use it pretty infrequently (except for gaming!). This odd new RollerMouse is the workhorse now. I just wanted to mention this device in case anyone else has similar problems and was frustrated trying to solve them. I was uncertain about how this thing would work out, but it really does work well. There&apos;s a video at the product web site which shows how it works in more detail, if you&apos;re interested to see it in action.
				
				</description>
				
				
				<category>Development</category>
				
				<category>Computers</category>
				
				<category>Personal</category>
				
				<pubDate>Thu, 25 Feb 2010 09:30:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2010/2/25/An-Awesome-Alternative-to-a-Traditional-Mouse</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>My CFinNC Presentations at SlideSix</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/10/22/My-CFinNC-Presentations-at-SlideSix</link>
				<description>
				
				I&apos;ve uploaded my &lt;a href=&quot;http://www.cfinnc.com&quot; target=&quot;_blank&quot;&gt;CFinNC&lt;/a&gt; presentations to SlideSix for anyone who&apos;s interested:

&lt;a href=&quot;http://slidesix.com/view/Brian-Kotek--CFinNC--OO-Design-Principles-Final&quot; target=&quot;_blank&quot;&gt;Object-Oriented Design Principles&lt;/a&gt;

&lt;a href=&quot;http://slidesix.com/view/Swiz--Brian-Kotek--CFinNC&quot; target=&quot;_blank&quot;&gt;Introduction to Swiz&lt;/a&gt;

Overall, CFinNC was great. I actually had to work for a large chunk of the weekend so aside from presenting and mingling with folks later in the evening, I didn&apos;t get to attend many other sessions. That said, everything looked top-notch while I was there. The conference unfolded very smoothly and all of the attendees seemed very engaged. Hats off to Dan Wilson and the entire volunteer team for pulling this off! This conference definitely held its own against the other CF conferences I&apos;ve attended. It was very difficult to tell that it was completely free. Hopefully we can do it again next year!
				
				</description>
				
				
				<category>Development</category>
				
				<category>ColdFusion</category>
				
				<category>OOP CF</category>
				
				<category>Flex</category>
				
				<category>Conferences</category>
				
				<category>Presentations</category>
				
				<category>Swiz</category>
				
				<pubDate>Thu, 22 Oct 2009 12:02:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/10/22/My-CFinNC-Presentations-at-SlideSix</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Flex DataGridColumn Complex Properties Bug and Workaround</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/10/9/Flex-DataGridColumn-Complex-Properties-Bug-and-Workaround</link>
				<description>
				
				One Flex limitation I&apos;ve had to work around for a long time is the need for having a complex property name as the dataField for a DataGridColumn, like this:

&lt;code&gt;&lt;mx:DataGridColumn headerText=&quot;Client&quot; dataField=&quot;client.name&quot; /&gt;&lt;/code&gt;

I had written a nice, generic, custom labelFunction as well as a custom NestedPropertyDataGridColumn to handle this, and it all seemed to work well.

I just discovered that the Flex team had addressed this in the Flex 3.4 SDK update, though I don&apos;t think you&apos;d ever know it since I couldn&apos;t find any actual note that this was added. The only reason I discovered this was actually looking at the source code, and then finding &lt;a href=&quot;https://bugs.adobe.com/jira/browse/SDK-9801&quot; target=&quot;_blank&quot;&gt;this ticket&lt;/a&gt; in the Flex issue tracker.

So yay, we can use complex properties in our DataGridColumns now! Except...&lt;a href=&quot;http://bugs.adobe.com/jira/browse/SDK-23643&quot; target=&quot;_blank&quot;&gt;it&apos;s broken&lt;/a&gt;.

Ugh. Really, guys on the Flex team? This was added and no one ever bothered to click on the column to sort it? Hmph.

Anyway, as one workaround, you can use a custom DataGridColumn combined with a custom Sort to get proper sorting in most cases:

&lt;code&gt;js|
package com.briankotek.util.datagrid
{

import mx.collections.ListCollectionView;
import mx.controls.DataGrid;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.core.mx_internal;
use namespace mx_internal;

/**
 * A custom DataGridColumn that supports sorting a column that has a nested child property path for the dataField value.
 */
public class DataGridColumnNested extends DataGridColumn
{
	public function DataGridColumnNested( columnName : String = null )
	{
		super( columnName );
	}

	/**
	 * Override itemToLabel to force a ComparableSort custom sort class onto the parent DataGrid dataProvider.
	 * This works around a bug in sorting columns with complex property names in the dataField value.
	 * @param data
	 * @return
	 */
	override public function itemToLabel( data : Object ) : String
	{
		var parent : DataGrid;
		if( owner &amp;&amp; owner is DataGrid )
		{
			parent = owner as DataGrid;

			if( hasComplexFieldName &amp;&amp; parent &amp;&amp; parent.sortableColumns &amp;&amp; parent.dataProvider is ListCollectionView &amp;&amp;
				(
					!( ListCollectionView( parent.dataProvider ).sort ) ||
					!( ListCollectionView( parent.dataProvider ).sort is ComparableSort )
				)
			  )
			{
				ListCollectionView( parent.dataProvider ).sort = new ComparableSort();
			}
		}
		return super.itemToLabel( data );
	}

}
}
&lt;/code&gt;

&lt;code&gt;js|
package com.briankotek.util.datagrid
{
import mx.collections.Sort;
import mx.collections.SortField;

/**
 * Custom Sort class that forces the correct compareFunction for a given field to be used.
 */
public class ComparableSort extends Sort
{
	public function ComparableSort()
	{
		super();
	}

	override public function findItem( items:Array, values:Object, mode:String, returnInsertionIndex:Boolean = false, compareFunction:Function = null ):int
	{
		if( !compareFunction &amp;&amp; fields &amp;&amp; fields.length &amp;&amp; fields[0] is SortField &amp;&amp; SortField( fields[0] ).compareFunction )
		{
			compareFunction = SortField( fields[0] ).compareFunction;
		}
		return super.findItem( items, values, mode, returnInsertionIndex, compareFunction );
	}
}
}
&lt;/code&gt;

This forces the custom Sort class onto the grid&apos;s dataProvider, and then forces the correct compareFunction from the SortField to be used by the Sort&apos;s findItem() method. Hopefully we&apos;ll get a fix for this soon, but in the meantime, maybe this workaround will help out some other folks.
				
				</description>
				
				
				<category>Development</category>
				
				<category>Flex</category>
				
				<pubDate>Fri, 09 Oct 2009 12:57:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/10/9/Flex-DataGridColumn-Complex-Properties-Bug-and-Workaround</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>On the CFPanel Podcast with Mark Mandel and Barney Boisvert</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/9/4/On-the-CFPanel-Podcast-with-Mark-Mandel-and-Barney-Boisvert</link>
				<description>
				
				I&apos;m happy to say I&apos;ll be participating in the &lt;a href=&quot;http://cfpanel.com/index.cfm/2009/9/3/Episode-5--ColdFusion-and-Java-Integration&quot; target=&quot;_blank&quot;&gt;CFPanel Podcast&lt;/a&gt; on September 8 at 8 PM EST. We&apos;ll be discussing ColdFusion and Java integration. I hope to add some helpful substance to the conversation, but I&apos;m really looking forward to hearing what Mark (who created JavaLoader) and Barney (who created CFGroovy) have to say.

Listen in if you can, or check out the Connect recording afterwards. Thanks!
				
				</description>
				
				
				<category>Development</category>
				
				<category>ColdFusion</category>
				
				<category>Java</category>
				
				<category>Groovy</category>
				
				<category>Presentations</category>
				
				<pubDate>Fri, 04 Sep 2009 12:11:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/9/4/On-the-CFPanel-Podcast-with-Mark-Mandel-and-Barney-Boisvert</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>ColdFusion and OOP - Match Made in Heaven, or Long Road to Hell?</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/7/14/ColdFusion-and-OOP--Match-Made-in-Heaven-or-Long-Road-to-Hell</link>
				<description>
				
				Hal Helms, Ben Nadel and I recorded a conversation over the weekend on the subject of OO in CF. I&apos;m supporting the position that OO is still a good thing in CF, Hal disagrees, and Ben is undecided. As you might expect, Hal is left a trembling husk as the weight of my arguments unmercifully crushes him. You know those scenes in superhero movies where someone gets punched so hard they end up in a crater in the ground? It&apos;s like that. Only worse.

In all seriousness though, it was a very fun talk and I think there are some solid points made from all involved, but I&apos;ll let you, gentle reader, be the judge. &lt;a href=&quot;http://epicenter-public.s3.amazonaws.com/ColdFusion-and-OOP--Match-Made-in-Heaven-or-Long-Road-to-Hell.mp3&quot; target=&quot;_blank&quot;&gt;You can download the recording here&lt;/a&gt;.

In the interest of keeping any discussion on this topic from fragmenting, we&apos;ve decided to disable comments on our respective blog entries and instead created a &lt;a href=&quot;http://groups.google.com/group/coldfusionoo&quot; target=&quot;_blank&quot;&gt;Google Group&lt;/a&gt; to act as a central sounding board. Hopefully this isn&apos;t too inconvenient, I realize it&apos;s something of a departure from the norm, but let&apos;s see how that works.

I&apos;m not sure yet whether this will turn into any kind of regular discussion, but I suppose it could. We&apos;ll just have to see what folks think! Thanks.
				
				</description>
				
				
				<category>Development</category>
				
				<category>ColdFusion</category>
				
				<category>OOP CF</category>
				
				<pubDate>Tue, 14 Jul 2009 06:29:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/7/14/ColdFusion-and-OOP--Match-Made-in-Heaven-or-Long-Road-to-Hell</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>HTML 5 Isn&apos;t Going to Kill Flash</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/7/9/HTML-5-Isnt-Going-to-Kill-Flash</link>
				<description>
				
				Lately I&apos;ve seen a number of blog posts and news stories touting HTML 5 as some sort of Flash Killer in the RIA space. Am I the only one shaking my head at this?

First off, let me say I&apos;m thrilled that HTML 5 is in the works, and that the markup language is being improved. I could say it&apos;s about time, but I won&apos;t. (I guess I just did though!)

That said, the people claiming that HTML 5 is going to kill Flash seem to have a pretty poor memory. According to the editor of HTML 5, &lt;a href=&quot;http://blogs.techrepublic.com.com/programming-and-development/?p=718&quot; target=&quot;_blank&quot;&gt;it&apos;s not going to become a proposed recommendation until 2022&lt;/a&gt;. That&apos;s over a decade, folks. That&apos;s a long, looooong time.

Think back a decade. Remember 1999? Most people were using IE 4. There was no AJAX, and there were no RIAs. There were no social networks. There was no Twitter, and no iPhone. Now project that kind of change forward 10 years, only double the rate of change. So much is going to happen before HTML 5 is widely adopted that it&apos;s not even funny. Heck, something might even kill Flash. But it&apos;s not going to be HTML 5.

And even if the new spec offers some kind of parity with Flash, Flex, and Silverlight, it&apos;s not like the existing RIA platforms are going to stand still. There will be huge advances over the next decade. So being, among other things, a Flex developer, I&apos;m probably biased here. But I just don&apos;t see what all the fuss is about. An updated spec is great, and I sure it will find many uses and offer a lot of interesting features. But to trot this out as yet another Flash Killer seems unrealistic at best, and reeks of ulterior motives at worst. What do you think? Am I right? Or am I just blinded by my association with Flex?
				
				</description>
				
				
				<category>Development</category>
				
				<category>Flex</category>
				
				<pubDate>Thu, 09 Jul 2009 07:17:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/7/9/HTML-5-Isnt-Going-to-Kill-Flash</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>OO Can&apos;t Ruin Businesses, but People Can</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/5/26/OO-Cant-Ruin-Businesses-but-People-Can</link>
				<description>
				
				Blogging newcomer Marc Funaro made a provocative first post over the weekend with his entry &lt;a href=&quot;http://www.advantexllc.com/blog/post.cfm/how-oo-almost-destroyed-my-business&quot; target=&quot;_blank&quot;&gt;How OO Almost Destroyed My Business&lt;/a&gt;. It has gotten a lot of comments, some supporting him, and some taking issue with his conclusions. I started to comment but decided it would be better to generate a secondary discussion rather than add onto the already long thread.

Marc says he picked up ColdFusion as a non-programmer, and had good success with it until fairly recently. With the movement toward object-oriented development that is happening in the ColdFusion world, he ran into trouble. He read some books, some blogs, and took a class on Java development. And he ended up overwhelming himself with unnecessary complexity in terms of frameworks, design patterns, and OO architecture. He sums up the result of doing this pretty nicely:

&lt;blockquote&gt;&quot;The bottom line is, when you NEED to use some OO concept, YOU&apos;LL KNOW.  *That&apos;s* the time to start writing OO-style code, and only then... not everywhere else.&quot;&lt;/blockquote&gt;

Which is pretty good advice. It&apos;s something that any knowledgeable proponent of OO will tell you. I&apos;m sorry that it took him a good amount of time and frustration to reach that conclusion, but I&apos;m glad he finally did.

Where he goes wrong, though, starts right in the title of his entry. OO can&apos;t ruin anything, but people making bad decisions absolutely can. And what Marc did was make some bad decisions, because he was new to OO, confused, and, as he says, &quot;downloading one framework after another, piling them all into an application&quot;. This is like reading a book on construction, and then going out and trying to build the Taj Mahal when all that was needed was a garage.

Bad decisions don&apos;t mean a person is stupid or foolish. Smart people make bad decisions all the time (I&apos;m not conceited enough to call myself a smart person, but I definitely have made some bad decisions). Usually, it&apos;s simply a lack of knowledge or experience, or a failure to understand the implications of the choices you&apos;re making. But even that is OK, because when someone makes a bad decision, it can still have a positive outcome if it results in learning something. OO does not equate to using a framework, and it does not require the application of every design pattern under the sun. It&apos;s simply a way to organize code, manage complexity, and accommodate change. Sometimes, that is best served by using a framework like ColdSpring or Spring. Sometimes, design patterns can offer solutions to encapsulate variations in a system and cope with change. One of the key things anyone using OO must understand is that there are pros and cons to every decision, and multiple solutions to a given problem. The only way to learn how to assess these trade offs is through experience.

The reality is that a lot of ColdFusion applications don&apos;t require a massive OO system to power them. Many of the small- or medium-sized applications don&apos;t need an n-tier architecture loaded with abstractions and design patterns. But that doesn&apos;t mean that some of the good ideas of OO, like encapsulation, can&apos;t be used with big benefits. One doesn&apos;t need to turn every query into an array of objects. Just creating well-defined interfaces to expose behavior to the rest of an application will get you a long way. Once something is encapsulated, it&apos;s much easier to change it later if you need to. It might be just a few CFCs to wrap up the bulk of the logic and hide the implementation. That might be all that will ever be needed. But if (and, more likely, when) things get more complex and it comes time to start adopting a broader set of OO principles, you&apos;ll be in a much better position to do so.

However, there is another reality that can&apos;t be denied: in the debate between procedural and OO development, OO has won. It won many years ago. ColdFusion is one of the few languages left that supports procedural development to a large degree. If you want to keep being a software developer, or ever want to move to a language like ActionScript, C#, Java, Groovy, or Ruby, you&apos;re going to have to know OO. That&apos;s just how it is. And as Marc points out, even within the CF world, OO is taking over, and the number of jobs available to people without OO experience are going to keep getting smaller and smaller. Some folks may not like this and may attempt to rebel against the trend, but you can&apos;t stop the tide. OO is not going away, in fact, it&apos;s only going to get ever more ubiquitous. So it&apos;s probably in your best interest to learn about it. One doesn&apos;t have to use it on every project, nor does one have to use it to create a complex, over-engineered mess. But  experience is the best teacher, both in terms of learning OO and increasing your demand in the marketplace.

So, with respect to Marc, don&apos;t do what he did. Don&apos;t try to swallow the entire OO buffet in one bite. If you try, you&apos;ll fail. You&apos;ll get frustrated. And in that red haze, you&apos;ll probably miss the simple benefits of OO. Instead, learn what you can and take time to digest the information. Experiment with it, but don&apos;t get carried away. Apply what makes sense to you where you can, in small bits. Remember that the goal is to learn, but it is also to help you do what works for you and build applications that satisfy customers.

I suppose the bottom line is: Don&apos;t be afraid of OO. Be afraid of anyone who says that OO is the only way to build an application, and be just as afraid of anyone who blasts OO because they got carried away with it and got burned.
				
				</description>
				
				
				<category>Development</category>
				
				<category>ColdFusion</category>
				
				<category>OOP CF</category>
				
				<pubDate>Tue, 26 May 2009 10:32:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/5/26/OO-Cant-Ruin-Businesses-but-People-Can</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>SilverFlash Beta Released: A Joint RIA Platform from Adobe and Microsoft?!</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/4/1/SilverFlash-Beta-Released-A-Joint-RIA-Platform-from-Adobe-and-Microsoft</link>
				<description>
				
				Microsoft and Adobe just announced the public availability of a joint RIA platform called SilverFlash. While it is only in early beta, and the future plans are somewhat vague, this looks like it could be something quite interesting for Flash and Flex developers for several reasons.

First, it actually goes far beyond Microsoft&apos;s current Silverlight platform, in that it actually merges the Flash platform with the Windows Presentation Foundation (WPF). In some ways this seems similar to what Adobe AIR provides, except that the WPF extends much more deeply into the Windows operating system. That means a lot more power when doing desktop integration.

But obviously the real draw here is that we&apos;ll have a unified RIA platform that is backed by all the major players in the industry (even Sun is on board) and that runs on any operating system. Just imagine: the power and ubiquity of Flash combined with the stunning calendar widgets of Sliverlight, all wrapped in a Java applet. You can download the beta at &lt;a href=&quot;http://www.techcrunch.com/2009/04/01/april-fools-youtube-flails-amazon-cloud-computing-in-a-blimp-3d-chrome-browsing-google-master-ai/&quot; target=&quot;_blank&quot;&gt;the SilverFlash Launch website&lt;/a&gt;. This is going to do for RIAs what the Apple Newton did for handheld computing!
				
				</description>
				
				
				<category>Development</category>
				
				<category>General</category>
				
				<category>Flex</category>
				
				<pubDate>Wed, 01 Apr 2009 06:41:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/4/1/SilverFlash-Beta-Released-A-Joint-RIA-Platform-from-Adobe-and-Microsoft</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Is the ColdFusion Community&apos;s Generosity Encouraging Laziness?</title>
				<link>http://www.briankotek.com/blog/index.cfm/2009/3/27/Is-the-ColdFusion-Communitys-Generosity-Encouraging-Laziness</link>
				<description>
				
				I&apos;ve been using ColdFusion for a long time. When I started back in late 1997, I was a very novice programmer. There wasn&apos;t much in the way of mailing lists, online forums, or books. There was no Google, and there were no blogs. As a result, I developed what I&apos;d consider a pretty self-reliant nature on the subject of programming. I had to read the documentation, experiment, and try things out. And doing this, I was able to solve my problems.

I am a member of a number of public discussion forums and mailing lists, and have been for many years. I moderate several forums and lists. Over the years, I&apos;ve tried to help others by answering questions or pointing them in the right direction to solve their problems. I&apos;d like to hope that I&apos;ve helped save some people some of the pain and time that I had to go through when I was learning ColdFusion.

Lately I&apos;ve been seeing a disturbing trend: a rapidly increasing number of what I will call &quot;lazy questioners&quot;. Sure, some of these folks have always been around. But in the last six to twelve months it seems like the number of these people has been making a rapid upturn.

On the one hand, this might be good news: it seems to indicate that more new people are coming into the community. I think that&apos;s great. However, what I don&apos;t think is great is their approach to asking questions.

If you are also a member of one or more forums or mailing lists, have you also noticed the increasing number of questions like these?

&lt;ul&gt;&lt;li&gt;How do I invoke a trigger from ColdFusion?&lt;/li&gt;
&lt;li&gt;Why doesn&apos;t this work: &amp;lt;cfif IsDefined(&quot;#url.id#&quot;)&amp;gt;...&lt;/li&gt;
&lt;li&gt;Why does my if block always run: &amp;lt;cfparam name=&quot;url.id&quot; default=&quot;0&quot; /&amp;gt; &amp;lt;cfif IsDefined(&apos;url.id&apos;)&amp;gt;...&lt;/li&gt;
&lt;li&gt;How do I zip something in ColdFusion?&lt;/li&gt;
&lt;li&gt;What is wrong with my query? [paste SQL]&lt;/li&gt;
&lt;li&gt;This doesn&apos;t work please help me. [paste 300 lines of code]&lt;/li&gt;
&lt;li&gt;Why doesn&apos;t this work? #XMLParse( [string with invalid xml characters in it] )#&lt;/li&gt;
&lt;li&gt;Will this work? [paste code]
&lt;/li&gt;&lt;/ul&gt;

The list really goes on and on, these are just a few of the ones I recall seeing recently. If you&apos;re asking yourself &quot;what&apos;s wrong with those questions?&quot;, I&apos;ll tell you: either they&apos;re horribly presented questions or they could be solved in 30 seconds just by doing a Google search or actually looking at the documentation.

So what&apos;s the problem? The next response is probably &quot;just ignore the question if you don&apos;t have anything nice to say.&quot; That&apos;s a valid response. And it would work, provided that everyone else also followed it. But they don&apos;t. When questions like these come up (daily at this point), at least one good-natured person decides to try and help. They politely provide a useful answer. Which is admirable. I often do this myself. But after thinking about the overall situation, I&apos;ve come to the conclusion that it&apos;s actually a harmful choice. Here are some of the reasons why:

First, all this does is encourage the questioner&apos;s laziness. In fact, it encourages laziness for anyone asking a question. Why would someone bother to find an answer on their own when they see they can just ask someone else and know they&apos;ll get an answer?

It also means the person probably hasn&apos;t really learned much. They certainly haven&apos;t learned how to find the solution to a similar problem when (not if) they encounter one. The old adage &quot;Give a man a fish, feed him for a day. Teach a man to fish, feed him for a lifetime.&quot; has never been more applicable. Answering a lazy question almost guarantees more lazy questions in the future. The questioner is banking on the generosity of others, and allowing them to shift the time and effort onto a bunch of other people. And, unfortunately, it works.

Which leads directly into the next negative result, which is an overall decrease in the usefulness of the list or forum. Lazy questions decrease the signal to noise ratio of a resource. They take time and attention away from valid and well presented questions. And it&apos;s not just the initial answer. Often, when a lazy question is answered, it triggers a long exchange where the questioner says &quot;that still doesn&apos;t work&quot; or &quot;what about this variation&quot;. In response, the kind folks answering keep feeding into it, many times offering additional information that the questioner would have discovered themselves if they had put even minimal effort into solving their problem through Google or the documentation.

In essence, I think the ColdFusion community is too forgiving of lazy questions. I might get flak for saying this, but it&apos;s true: we&apos;re too nice when it comes to this issue.

Now to be clear, I&apos;m not saying we should be mean, or that we should stop answering questions. We should absolutely keep answering questions. I certainly will keep trying to help people. But anyone asking a question should understand that there is a certain minimum level of effort that should be met before you ask. To me, the minimum level of effort is:

&lt;ul&gt;&lt;li&gt;Have you actually tried to run the code? What was the result?&lt;/li&gt;
&lt;li&gt;If there is an error, be able to provide the exact error to the best of your ability&lt;/li&gt;
&lt;li&gt;Have you read the documentation?&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;Have you searched Google?&lt;/li&gt;
&lt;li&gt;Have you searched the past threads/messages?&lt;/li&gt;
&lt;li&gt;If the problem is SQL-related, have you run the query directly against the database, outside of CF?&lt;/li&gt;
&lt;li&gt;If you plan to paste code, have you eliminated all extraneous code and limited the code to only what is involved in the problem?&lt;/li&gt;
&lt;li&gt;Have you attempted minimal debugging with cfdump, cfabort, or cftrace?
&lt;/li&gt;&lt;/ul&gt;

This is not a lot to ask. In fact, this should be done out of common sense and common courtesy. If someone chooses not to meet this minimum level of effort, they should be met with a terse, blunt response, and NOT the answer to their question. There is a much more general and lengthy resource on this subject at &lt;a href=&quot;http://www.catb.org/~esr/faqs/smart-questions.html&quot; target=&quot;_blank&quot;&gt;the Smart Questions FAQ&lt;/a&gt;.

Here are a few situations where I say the questioner&apos;s laziness should be called out:

&lt;ul&gt;&lt;li&gt;The answer could be found by simply reading the documentation on the tag or function, and it is obvious that they have not&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;The answer could be found with a 30 second Google search&lt;/li&gt;
&lt;li&gt;The questioner is asking an advanced question on a complex subject when it is clear they have limited understanding of the subject or what they&apos;re even asking about, and they&apos;re expecting a free class on the subject (i.e. &quot;I don&apos;t know much SQL, but how do I write this complicated query&quot;)&lt;/li&gt;
&lt;li&gt;The questioner is asking if something will work when they haven&apos;t even tried to run it&lt;/li&gt;
&lt;li&gt;The questioner is asking others to write their code for them&lt;/li&gt;
&lt;li&gt;The questioner is pasting huge amounts of code and expecting others to sift through it
&lt;/li&gt;&lt;/ul&gt;

In many other communities, lazy questions are met with harsh responses that range from &quot;RTFM&quot; to &quot;JFGI&quot; to derisive abuse. I&apos;m not asking the community to go down that road. I love the fact that for the most part, the CF community is a very open and encouraging place. I just think that a small but growning number of people are taking advantage of that generous spirit. It&apos;s time to impose some minimal expectations on those who would ask for our time and assistance.

I&apos;m expecting this to trigger some interesting feedback (hopefully nothing too rough, but if you disagree and can point out some flaw with my logic here, by all means go for it). What do folks think about this issue, and what is the best way to deal with it?
				
				</description>
				
				
				<category>Development</category>
				
				<category>ColdFusion</category>
				
				<category>General</category>
				
				<category>Personal</category>
				
				<pubDate>Fri, 27 Mar 2009 15:10:00 -0700</pubDate>
				<guid>http://www.briankotek.com/blog/index.cfm/2009/3/27/Is-the-ColdFusion-Communitys-Generosity-Encouraging-Laziness</guid>
				
				
			</item>
			
		 	
			</channel></rss>