<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bill White&#039;s Blog &#124; HTML5 / Javascript / d3 / iOS / Data Visualizations / Flex</title>
	<atom:link href="http://www.billdwhite.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.billdwhite.com/wordpress</link>
	<description></description>
	<lastBuildDate>Wed, 03 Apr 2013 01:11:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Two More Intellij Plugins Updated</title>
		<link>http://www.billdwhite.com/wordpress/2013/01/28/two-more-intellij-plugins-updated/</link>
		<comments>http://www.billdwhite.com/wordpress/2013/01/28/two-more-intellij-plugins-updated/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 12:52:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=599</guid>
		<description><![CDATA[Just an FYI for IntelliJ users: I&#8217;ve updated 2 more existing plugins that had been left for dead: SVG Viewer 2 &#8211; Github Source Code Lock 1.2 &#8211; Github Source Both of these were plugins that looked mildly useful but <a class="more-link" href="http://www.billdwhite.com/wordpress/2013/01/28/two-more-intellij-plugins-updated/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Just an FYI for IntelliJ users: I&#8217;ve updated 2 more existing plugins that had been left for dead:</p>
<ul>
<li><a href="http://plugins.jetbrains.net/plugin?pr=idea&#038;pluginId=7170">SVG Viewer 2</a> &#8211; <a href="http://github.com/billdwhite/intellij-plugins-svgviewer2">Github Source</a></li>
<li><a href="http://plugins.jetbrains.net/plugin?pr=idea&#038;pluginId=7151">Code Lock 1.2</a> &#8211; <a href="http://github.com/billdwhite/intellij-plugins-codelock">Github Source</a></li>
</ul>
<p>Both of these were plugins that looked mildly useful but would throw errors when used with the latest version of the IntelliJ Idea. The email address for the original author of the SVG Viewer&#8217;s was no longer valid so I just reversed the binaries and fixed it so you can now view SVGs within the IDE. (That plugin now works in pretty much all Intellij platformed products except AppCode which appears to not have the Batik library in the classpath by default; however, I was unable to figure out how to specify &#8216;everything except AppCode&#8217; in the dependency section of the plugin.xml so I just left it as Intellij Idea only). As for Code Lock, the source was available and the author said he done with the plugin so I just patched it and posted it. The source for both plugins is available from my Github page. Hopefully others will get some use out of these.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2013/01/28/two-more-intellij-plugins-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SyncEdit 2 &#8211; An (updated) IntelliJ IDEA Plugin</title>
		<link>http://www.billdwhite.com/wordpress/2012/12/29/syncedit-2-an-updated-intellij-idea-plugin/</link>
		<comments>http://www.billdwhite.com/wordpress/2012/12/29/syncedit-2-an-updated-intellij-idea-plugin/#comments</comments>
		<pubDate>Sat, 29 Dec 2012 23:50:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=571</guid>
		<description><![CDATA[I have been a huge fan of JetBrain&#8217;s IntelliJ IDEA development tool for nearly a decade. I use it almost daily and I love that the makers of this tool have included a path for users to add functionality to <a class="more-link" href="http://www.billdwhite.com/wordpress/2012/12/29/syncedit-2-an-updated-intellij-idea-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have been a huge fan of <a href="http://www.jetbrains.com/idea/">JetBrain&#8217;s IntelliJ IDEA</a> development tool for nearly a decade. I use it almost daily and I love that the makers of this tool have included a path for users to add functionality to the IDE on their own using <a href="http://www.jetbrains.com/idea/plugins/index.html">custom plugins</a>.</p>
<p>One feature that I have missed is <a href="http://plugins.jetbrains.net/plugin?pr=idea&#038;pluginId=214">SyncEdit</a> which works somewhat like the variable refactoring currently available in IntelliJ. However, where as the current refactoring functionality lets you operate on code variables that the editor recognizes, SyncEdit allows you to highlight a custom range within the editor and then change any word within that range while simultaneously updating any corresponding words that also exist within the selected region.  </p>
<p>This feature was available as a plugin which was originally written by Nathan Brown but has not been updated in over six years and simply no longer works with the latest version of IntelliJ. I tried to contact him to get his original source code but I never heard back.  Since there was no license on the code and it was published on the IntelliJ plugins site for free, I simply reversed the available plugin, got it working and <a href="https://github.com/billdwhite/intellij-plugins-syncedit2">re-posted it as an open source implementation</a> in hopes that it can be used and improved.  (UPDATE: Nathan contacted me and supplied me with his original source so I hope to update the 2.0 codebase soon with anything that I missed)</p>
<p>I have never written an IntelliJ plugin before and you need to understand some of the inner workings of their architecture to truly know what you are doing. However, I was able to get it up and running again and I even tweaked a few thing to get the plugin to select only words instead of subsets of words as the first version did since it seemed to cause more problems than it solved. I was able to find on a few other blogs with some tips on ways to <a href="http://www.skorkin.com/2011/06/how-to-implement-the-sync-edit-feature-from-delphi-ide-inside-visual-studio-ide-using-dxcore/">implement SyncEdit</a> and get <a href="http://whyjava.wordpress.com/2010/05/04/finding-all-the-indexes-of-a-whole-word-in-a-given-string-using-java/">whole word selection</a> working better. The code certain needs some tweaks but it seems to work at least as well as the previous version and better yet, it is open for anyone else to help improve it.</p>
<p>See the image below for a better idea of how it works.  You just highlight a range of code, then select a word and change it. Any other instances of that word will also be updated.  It ends up being a more flexible method of find-and-replace.  Yes, there are other ways to do this that already exist but I find this way to be very intuitive and easy to execute. </p>
<p>You can get the source code <a href="http://github.com/billdwhite/intellij-plugins-syncedit2">here from GitHub</a> and the <a href="http://github.com/billdwhite/intellij-plugins-syncedit2/raw/master/syncedit2.jar">plugin file is here</a>. The <a href="http://plugins.jetbrains.net/plugin/?idea&#038;pluginId=7147">IntelliJ plugin page is here</a> and is awaiting approval.</p>
<p><center><img src="/wordpress/wp-content/images/syncedit-feature.gif"></img></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2012/12/29/syncedit-2-an-updated-intellij-idea-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>D3 Treemap with Title Headers</title>
		<link>http://www.billdwhite.com/wordpress/2012/12/16/d3-treemap-with-title-headers/</link>
		<comments>http://www.billdwhite.com/wordpress/2012/12/16/d3-treemap-with-title-headers/#comments</comments>
		<pubDate>Sun, 16 Dec 2012 14:26:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[D3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=496</guid>
		<description><![CDATA[The D3 library is really a great way to create data visualizations in HTML5. I absolutely love it and its treemap is especially powerful. I wanted to create a treemap that showed grouping headers like the JIT version that has <a class="more-link" href="http://www.billdwhite.com/wordpress/2012/12/16/d3-treemap-with-title-headers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[The <a href="https://github.com/mbostock/d3">D3 library</a> is really a great way to create data visualizations in HTML5. I absolutely love it and its <a href="https://github.com/mbostock/d3/wiki/Treemap-Layout">treemap</a> is especially powerful. I wanted to create a treemap that showed grouping headers like the JIT version that has been around for a while, but it took a little more work to get D3 to do the same thing. I <a href="https://groups.google.com/forum/#!msg/d3-js/TO5xjTDgjBY/x3JYN2yHWJkJ">came across a post</a> that showed the attempts of others to create the same thing and I wanted to show the code of how I did it in case others are interested.

I created two versions: the first uses SVG labels which are nice because you can measure them to decide what room is available for displaying a label in a given cell. However, wrapping is much more involved and ended up creating a second version which uses embedded HTML divs to create self wrapping labels which seem to look a little better. I also modified the examples of others in the thread so instead of showing labels where there is enough room to see them, I instead took the approach of showing labels for given group when that group was selected.

&nbsp;

&nbsp;

So here is the first example which uses divs for the labels: (<a href="/wordpress/wp-content/js/treemap_headers_01.html">link to code</a>) (<a href="http://bl.ocks.org/4325239">bl.ocks.org</a>)

<center>
<div><iframe src="/wordpress/wp-content/js/treemap_headers_01.html" style="border: 2px solid #444444; border-radius: 3px;" height="450" width="650" scrolling="no"></iframe> 
</div>
</center>&nbsp;

&nbsp;

&#8230;and here is the second version which uses SVG text elements: (<a href="/wordpress/wp-content/js/treemap_headers_02.html">link to code</a>) (<a href="http://bl.ocks.org/4325246">bl.ocks.org</a>)

<center>
<iframe src="/wordpress/wp-content/js/treemap_headers_02.html" style="border: 2px solid #444444; border-radius: 3px;" height="450" width="650" scrolling="no"></iframe>
</center>UPDATE:
Here is the third version which uses IDs instead of the name so duplicates titles will work (notice the two &#8216;display&#8217; groups on the left side): (<a href="/wordpress/wp-content/js/treemap_headers_03.html">link to code</a>)

<center>
<iframe src="/wordpress/wp-content/js/treemap_headers_03.html" style="border: 2px solid #444444; border-radius: 3px;" height="450" width="650" scrolling="no"></iframe>
</center>]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2012/12/16/d3-treemap-with-title-headers/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PureMVC Pipes Ported to Native Javascript</title>
		<link>http://www.billdwhite.com/wordpress/2012/10/18/puremvc-pipes-ported-to-native-javascript/</link>
		<comments>http://www.billdwhite.com/wordpress/2012/10/18/puremvc-pipes-ported-to-native-javascript/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 03:12:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=450</guid>
		<description><![CDATA[When I ported PureMVC over to Dojo I could not pass up the chance to port over the the Pipes utility as well. I initially created a Dojo-flavored version, but since the main Javascript distribution of PureMVC is framework independent, <a class="more-link" href="http://www.billdwhite.com/wordpress/2012/10/18/puremvc-pipes-ported-to-native-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>When I <a href="http://www.billdwhite.com/wordpress/?p=425" title="PureMVC port with Dojo">ported PureMVC over to Dojo</a> I could not pass up the chance to port over the <a href="http://github.com/PureMVC/puremvc-as3-util-pipes/wiki" title="PureMVC Pipes">the Pipes utility</a> as well.  I initially created a <a href="http://github.com/billdwhite/dojo-puremvc/tree/master/src/org/puremvc/js/multicore/utilities" title="PureMVC Pipes - Dojo Version">Dojo-flavored version</a>, but since the main <a href="http://github.com/PureMVC" title="PureMVC on GitHub">Javascript distribution of PureMVC</a> is framework independent, I figured that Pipes should be as well.</p>
<p>For those who are unfamiliar with Pipes, it is basically a way to create multiple PureMVC applications, each with its own core, so that they can be loaded and unloaded as modules within a main application or shell.  It can get a little confusing and may appear to be overkill at first glance, but I think the end result proves to be worth the effort.</p>
<p>I posted the <a href="http://github.com/billdwhite/puremvc-js-pipes" title="PureMVC Pipes JS">native version here</a>.  I also created a <a href="http://github.com/billdwhite/puremvc-js-pipes/tree/master/pipes-define" title="PureMVC Pipes JS using puremvc.define">variation</a> that uses the <a href="http://forums.puremvc.org/index.php?topic=1992.0" title="puremvc.define">puremvc.define</a> function to create a more clearly defined OO structure.  I really like that approach better but the first version mimics the coding style found in the currently supported PureMVC Javascript implementation.</p>
<p>I also created a demo based on <a href="http://www.tekool.net/blogfiles/puremvc_flex_modules_and_pipes/project/PureMVC_FlexModulesAndPipes.html" title="Tekool's Pipes Demo">Tekool&#8217;s AS3 Pipes Demo</a>:</p>
<ul>
<li><a href="http://www.billdwhite.com/wordpress/wp-content/demos/PipesDemo/pipes/src-demo/index.html" title="PureMVC Pipes JS - Native">Demo [native version]</a></li>
<li><a href="http://www.billdwhite.com/wordpress/wp-content/demos/PipesDemo/pipes-define/src-demo/index.html" title="PureMVC Pipes JS - Define Version">Demo [puremvc.define version]</a>
<pre><em>*they are identical in appearance and behavior</em></pre>
</li>
</ul>
<p>If you are looking to learn more about Pipes, check out the following links which cover the conceptual use of Pipes, albeit in a Actionscript/Flex format.</p>
<ul>
<li><a href="http://www.tekool.net/blog/2009/06/14/puremvc_flex_modules_and_pipes/" title="Tekool - Flex modules with PureMVC Pipes Simple Demo">Tekool &#8211; Flex modules with PureMVC Pipes Simple Demo</a></li>
<li><a href="http://joelhooks.com/2009/05/18/piping-the-machine-puremvc-multicore-with-pipes-and-the-finite-state-machine-fsm/" title="Joel Hooks - Piping the Machine">Joel Hooks &#8211; Piping the Machine</a></li>
<li><a href="http://www.joshuaostrom.com/2008/06/15/understanding-puremvc-pipes/" title="Joshua Ostrom - Understanding PureMVC Pipes">Joshua Ostrom &#8211; Understanding PureMVC Pipes</a></li>
<li><a href="http://www.websector.de/blog/2008/06/21/a-basic-puremvc-multicore-as3-example-using-pipes-utility-and-modules/" title="Jens Krause - Basic PureMVC Multicore AS3 Example">Jens Krause &#8211; A basic PureMVC MultiCore AS3 Example</a></li>
</ul>
<p>(Update:  I had to change the reference from Shell.js to Shelll.js because wordpress seems to think that any file named Shell.js is dangerous and blocks access to it which was breaking the demo.  I updated both html pages with Shelll which points to Shelll.js to make it work)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2012/10/18/puremvc-pipes-ported-to-native-javascript/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PureMVC in Dojo</title>
		<link>http://www.billdwhite.com/wordpress/2012/10/17/puremvc-in-dojo/</link>
		<comments>http://www.billdwhite.com/wordpress/2012/10/17/puremvc-in-dojo/#comments</comments>
		<pubDate>Wed, 17 Oct 2012 18:50:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=425</guid>
		<description><![CDATA[Having moved on from Flex to Javascript more than a year ago, I&#8217;ve continually run into the problem of trying to find frameworks to support large-scale Javascript applications that are truly robust and scalable. It is harder than I thought, <a class="more-link" href="http://www.billdwhite.com/wordpress/2012/10/17/puremvc-in-dojo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Having moved on from Flex to Javascript more than a year ago, I&#8217;ve continually run into the problem of trying to find frameworks to support large-scale Javascript applications that are truly robust and scalable.  It is harder than I thought, and that is at least partially due to the inherently fast-and-loose nature of Javascript.  In the Flex world, Actionscript 3.0 was a dream for Java coders like myself that loved strongly typed languages with deep OO roots.  Javascript is whatever you want it to be at any given moment: it can be as structured or chaotic as the author desires and still work.  This is what makes it so malleable and useful while managing to make me insane at the same time.</p>
<p>Scalable systems however, require structure.  Sure, you can build a scalable application using quick and dirty techniques, but you will be leaving out an overlooked and vital component: maintainability. If you are the only one who can figure out what the hell the code does, then what good is it?  If no one can build upon the scaffolding you have provided, you can end up with a massive hotel with only one occupant.</p>
<p>There are a ton Javascript frameworks out there, but in the Flex world, my framework of choice was <a href="https://github.com/PureMVC" title="PureMVC on GitHub">PureMVC</a>. As far back as 2008-2009 PureMVC fans wanted to create an implementation using Javascript.  Almost immediately they ran into the quandary of how to use it with their own libraries such as ExtJS, Prototype, Mootools, etc.  Individual developer started <a href="http://forums.puremvc.org/index.php?board=64.0" title="PureMVC JS Implementations">porting it to their framework of choice</a>, but this meant having multiple codebases to maintain instead of one.  The decision was ultimately made to <a href="https://github.com/PureMVC/puremvc-js-multicore-framework/wiki" title="PureMVC Javscript">settle on a single native version</a> that could used by everyone.  At the time, I was working with what would eventually become <a href="http://dojotoolkit.org/" title="Dojo Toolkit">Dojo 1.7</a>, complete with AMD which was the &#8220;next big thing&#8221; to hit the Javascript world.  I created my own port of PureMVC to work with <a href="http://dojotoolkit.org/features/1.6/async-modules" title="Dojo 1.6 with AMD">Dojo 1.6 using AMD</a> and I recently <a href="https://github.com/billdwhite/dojo-puremvc" title="PureMVC version for Dojo with AMD">posted it here</a> for anyone who needs it. In fact, I went one step further and created a Dojo version of the PureMVC <a href="http://forums.puremvc.org/index.php?topic=2052.0" title="Pipes in PureMVC for Dojo">Pipes</a> utility as well. It is great to be able to load the PureMVC code on an as-needed basis with AMD.  </p>
<p>However, <a href="http://forums.puremvc.org/index.php?topic=2052.msg9143#msg9143" title="PureMVC in Dojo forum post">Cliff is correct</a> that in the long run, someone will have to keep that codebase in sync with any future PureMVC changes that come down the pipeline.  So the best move is probably to utilize the native implementation of PureMVC and integrate it with the framework of your choosing.  The issue then becomes: &#8220;How do I integrate it with <insert framework name here>?&#8221;.  Some developers have shown us the way for libraries like <a href="http://www.tekool.net/blog/2011/01/30/puremvc-native-javascript-port/" title="Prototype with PureMVC-JS native">Prototype</a>, <a href="https://github.com/PureMVC/puremvc-js-demo-employeeadmin" title="ExtJS with PureMVC JS native">ExtJS</a> and others.  However, there is not as much information on how to use PureMVC-JS native with Dojo, so I decided to post some examples on how to do it based on <a href="http://forums.puremvc.org/index.php?topic=2052.msg9146#msg9146" title="Using PureMVC JS native with Dojo">Cliff&#8217;s suggestions</a>.</p>
<p>The <a href="https://github.com/billdwhite/puremvc-js-native-todo" title="PureMVC-JS TodoMVC with Native Implementations">first demo</a> shows you how to create your implementation classes for Mediators, Proxies and Commands using PureMVCs &#8220;define style&#8221;, which means you use the puremvc.define function to create the OO structures that allows your MyMediator class to extend from Mediator in the PureMVC library. Only the main application and the view components are writing with Dojo. The argument for this way of integrating Dojo with PureMVC is that none of the PureMVC classes are reliant upon your framework and if you choose to switch from Dojo to something else, your PureMVC classes will required very few modifications.  This makes sense, but I&#8217;m not sold on this entirely.  First off, if you chance from Dojo to another framework, even if your PureMVC classes still work, the other 80% of your code will have to be changed. On top of that, while I like the <a href="http://forums.puremvc.org/index.php?topic=1992.0" title="PureMVC Define Style">clear and easy to use puremvc.define</a> functionality,  I would rather have all of my Dojo code look like Dojo code rather than have lots of code using puremvc.define while the rest uses Dojo&#8217;s define() function and style. Also, if you use the puremvc.define function, you have to make sure you load those classes up front and order them correctly.  You get none of the beauty that AMD provides when it comes to loading what you need when you need it.</p>
<p><a href="http://htmlpreview.github.com/?https://github.com/billdwhite/puremvc-js-native-todo/blob/master/demo/src/index.html#/" title="Native Todo">Run Demo 1</a></p>
<p>The <a href="https://github.com/billdwhite/puremvc-js-dojo-todo" title="PureMVC-JS TodoMVC with Dojo Implementations">second demo</a> shows the same application but this time, the Mediators, Proxies and Commands are all built with Dojo and inherit from the classes defined in the PureMVC library.  So I only have to load the puremvc.js file at the start of the application and my Mediators, Proxies, and Commands will all load when they are needed.  Dojo will also include them in compressed layer file which is created by my build process prior to deployment so I get a clean seperation between the code I wrote and the code supplied by the PureMVC library.  </p>
<p><a href="http://htmlpreview.github.com/?https://github.com/billdwhite/puremvc-js-dojo-todo/blob/master/demo/src/index.html#/" title="Native Todo">Run Demo 2</a></p>
<p>The second method just feels better to me, but you decide for yourself:  Here is a code-comparison of a controller class for each demo:</p>
<p><strong>PureMVC define style</strong>:</p>
<pre line="1" lang="javascript">
puremvc.define({
        name: 'todomvc.controller.command.PrepModelCommand',
        parent: puremvc.SimpleCommand
    },

    // INSTANCE MEMBERS
    {
        /**
         * Register Proxies with the Model
         * @override
         */
        execute: function(notification) {
            this.facade.registerProxy(new todomvc.model.proxy.TodoProxy());
        }
    }
);
</pre>
<p><strong>Dojo Style</strong>:</p>
<pre line="1" lang="javascript">
define(
    [
        "dojo/_base/declare",
        "todomvcdojo/model/proxy/TodoProxy"
    ],
    function(declare, TodoProxy) {

        var PrepModelCommand = declare("todomvc.controller.command.PrepModelCommand", puremvc.SimpleCommand, {
            /**
             * Register Proxies with the Model
             * @override
             */
            execute: function(notification) {
                this.facade.registerProxy(new TodoProxy());
            }
        });

        return PrepModelCommand;
    }
);
</pre>
<p>Both work fine but for now I&#8217;m sticking with the second approach.  <img src='http://www.billdwhite.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2012/10/17/puremvc-in-dojo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Flex, HTML5 or iOS:  Where are things going?</title>
		<link>http://www.billdwhite.com/wordpress/2011/11/12/flex-html5-or-ios-where-are-things-going/</link>
		<comments>http://www.billdwhite.com/wordpress/2011/11/12/flex-html5-or-ios-where-are-things-going/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 22:44:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[OpenLaszlo]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=389</guid>
		<description><![CDATA[Given the big announcements this past week from Adobe regarding their abandonment of the mobile Flash Player, along with their statements about their plans for Flex, I figure it is time for me to chime in with my own thoughts. <a class="more-link" href="http://www.billdwhite.com/wordpress/2011/11/12/flex-html5-or-ios-where-are-things-going/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Given the big announcements this past week <a href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/201111/110811AdobeFinancialAnalystMeeting.html" title="Adobe press release">from Adobe</a> regarding their <a href="http://finance.yahoo.com/news/Adobe-cuts-Flash-development-rb-3894689622.html?x=0&#038;.v=1" title="Yahoo article on Adobe">abandonment of the mobile Flash Player</a>, along with their <a href="http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html" title="Flex Questions">statements about their plans for Flex</a>, I figure it is time for me to chime in with my own thoughts.</p>
<p>I cannot say I was surprised by these announcements. Technology waves happen all the time and I have jumped to different platforms many times over the past two decades. In my PwC and IBM Consulting days, I worked in Lotus Notes and Domino until it became easier to build database driven web applications with Java Server Pages sprinkled with Javascript (soon to be Ajax) code. Then in 2003, I decided to jump again, this time to whatever could save me from the hacky nature of Javascript and pain of multi-browser support.</p>
<p>So I started looking at alternatives. Flash was an obvious choice but was still mainly for artistic designers looking to create static content. <a href="http://www.openlaszlo.org/" title="Open Laszlo">Open Laszlo</a> initially won me over with it&#8217;s ease of use and low cost. At least until Macromedia jumped into the fray with Royale (which would ultimately become Adobe Flex a couple of years later) shortly afterward. It would take another year before Adobe would figure out that no one wanted to pay $15,000 per CPU for a server to generate SWF files, especially since that step is unnecessary to begin with. By the time Flex 2.0 came out, Adobe had wised up on how to monetize Flex and things really took off. Flex and the Flash Player had finally accomplished what Java Applets and the JVM set out to do but never achieved: <em>provide a portable and consistent web-based platform for complex applications</em>. I jumped on the Flex bandwagon and never looked back&#8230;until a little over a year ago.</p>
<p>That&#8217;s when it was becoming apparent that Steve Jobs was slowly being proven correct about the shortcomings of the mobile Flash experience. At the time, I did not feel they were wrong but they did not offer any real alternatives. They claimed HTML5 was the future but since no browsers fully implemented that specification (and <a href="http://html5readiness.com/" title="HTML5 readiness">still don&#8217;t</a>), it seemed like a non-starter. The goal was still to write cool-looking, complex applications in a real programming language using a powerful IDE for a consistent runtime environment, and the Flex+Flash combination still seemed like the only offering that provided anything close to that.</p>
<p>However, the more I looked again at HTML and Javascript, I realized that the tooling had dramatically improved, especially with the emergence of two things: javascript libraries and browsers with debugging facilities. I knew those technologies had appeared years before, but it was their maturity that now caught my attention. Unlike some developers, I fully embrace the latest technology available to programmers. I&#8217;m a firm believer in IDE&#8217;s over a vi editor, debuggers over trace statements, and profiling tools over timestamps placed at the start and end of methods. It now seemed possible to create dynamic web apps that ran well in more than one browser, and the whole thing could be developed quickly without going blind from staring at alert dialogs with vague &#8216;blah is undefined&#8217; javascript error messages. Don&#8217;t get me wrong, Javascript is still every bit as hacky as before, but <a href="http://jquery.com/" title="jQuery">jQuery</a>, <a href="http://dojotoolkit.org/" title="Dojo">Dojo</a> and <a href="http://www.sencha.com/products/extjs/" title="ExtJS">ExtJS</a> help shield you from much of that pain.</p>
<p>The real challenge will be to figure out how to create the same results in HTML5/Javascript that I was doing in Flex. Take drawing for example: the capabilities of SVG and the HTML5 Canvas fall short of what the Flash player can do when combined with Actionscript and Flex, but tools like <a href="http://easeljs.com/" title="Easel JS">EaselJS</a>, <a href="http://raphaeljs.com/" title="Raphael JS">Raphael</a>, and <a href="http://keith-wood.name/svgRef.html" title="jQuery SVG">JQuery SVG</a> are avenues to get you part of the way there. Even Keith Peters is working on <a href="http://www.apress.com/9781430236658" title="Foundation HTML5 Animation with Javascript">a book to help Flex developers make the transition</a> that strongly mirrors his <a href="http://www.apress.com/9781590595183" title="Foundation Actionscript Animation">Actionscript version</a>.</p>
<p>I honestly can say I&#8217;m surprised at how brief the Flex wave has been. I figured it would last 10 years, but it seems to be more like 6 if you figure that Flex 2.0 was released in 2006 and I expect a fairly strong decline by the end of 2012. </p>
<p>And no, Flex will not go away but it is reasonable to expect that the demand for it will. I will continue to use it where applicable, but over the past year or so, I&#8217;ve moved heavily into HTML5 and Javascript as well as Objective-C and the iOS platform. Seeing that the performance of HTML5 web applications running in mobile Safari is still a little slow for my tastes, native iOS applications have become very attractive. All of this partly explains the severe reduction in my blog posts over the past year or so, combined with the fact that I&#8217;m a father now and family time is very appealing these days.</p>
<p>So in summary, I&#8217;m still doing my best to create neat stuff, but these days it is with a different set of tools. Geoff Sterns sums up my thoughts exactly at the end of <a href="http://blog.deconcept.com/2011/11/12/flash-is-dead-long-live-the-internet/" title="Geoff Sterns">this post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2011/11/12/flex-html5-or-ios-where-are-things-going/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex 4.5 is out!</title>
		<link>http://www.billdwhite.com/wordpress/2011/05/03/flex-4-5-is-out/</link>
		<comments>http://www.billdwhite.com/wordpress/2011/05/03/flex-4-5-is-out/#comments</comments>
		<pubDate>Tue, 03 May 2011 05:38:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=383</guid>
		<description><![CDATA[After weeks of waiting since the mid-April announcement, Flex 4.5 and FlashBuilder 4.5 are finally available. Download it here!]]></description>
				<content:encoded><![CDATA[<p>After weeks of waiting since the mid-April announcement, Flex 4.5 and FlashBuilder 4.5 are finally available.  Download it <a href="http://opensource.adobe.com/wiki/display/site/Home">here</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2011/05/03/flex-4-5-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tile Options Demo using Flex 4</title>
		<link>http://www.billdwhite.com/wordpress/2010/05/11/tile-options-demo-using-flex-4/</link>
		<comments>http://www.billdwhite.com/wordpress/2010/05/11/tile-options-demo-using-flex-4/#comments</comments>
		<pubDate>Tue, 11 May 2010 20:25:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=373</guid>
		<description><![CDATA[In a previous post, I showed a demo of a custom list component created with Degrafa.  I received a request for the same application done with Flex 4 and FXG, so I spent a little time converting it over and <a class="more-link" href="http://www.billdwhite.com/wordpress/2010/05/11/tile-options-demo-using-flex-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In a <a href="http://www.billdwhite.com/wordpress/?p=44">previous post</a>, I showed a demo of a custom list component created with Degrafa.  I received a request for the same application done with Flex 4 and FXG, so I spent a little time converting it over and here is the result.  (** requires Flash Player 10)<br />
<span id="more-373"></span><br />
 I&#8217;m sure I could have used the new features of Flex 4 even more efficiently than I did, so please feel free to let me know how to improve upon this implementation if you have any suggestions.</p>
<p><a href="http://www.billdwhite.com/wordpress/wp-content/demos/TileOptionsDemoFlex4/srcview/index.html">View Source</a></p>
<p id="tileOptionsDemoFlex4Paragraph" align="center">
<object width="560" height="575">
<param name="movie" value="/wordpress/wp-content/demos/TileOptionsDemoFlex4/TileOptionsDemoFlex4.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="560" height="575" src="/wordpress/wp-content/demos/TileOptionsDemoFlex4/TileOptionsDemoFlex4.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2010/05/11/tile-options-demo-using-flex-4/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Core Flex 4 &#8211; Filters in spark.filters vs flash.filters</title>
		<link>http://www.billdwhite.com/wordpress/2010/04/13/core-flex-4-filters-in-spark-filters-vs-flash-filters/</link>
		<comments>http://www.billdwhite.com/wordpress/2010/04/13/core-flex-4-filters-in-spark-filters-vs-flash-filters/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 03:48:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=307</guid>
		<description><![CDATA[After looking briefly at the API docs, I noticed that there are duplicates of several of the filter classes with the same name.  For example, there is a DropShadowFilter in the spark.filters package and there is another one by the <a class="more-link" href="http://www.billdwhite.com/wordpress/2010/04/13/core-flex-4-filters-in-spark-filters-vs-flash-filters/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>After looking briefly at the API docs, I noticed that there are duplicates of several of the filter classes with the same name.  For example, there is a <strong>DropShadowFilter</strong> in the <strong>spark.filters</strong> package and there is another one by the same name in the <strong>flash.filters</strong> package.<br /> <span id="more-307"></span><br /> After looking at the source for the <strong>DropShadowFilter</strong> in the <strong>spark.filters</strong> package, it appears that the filters in the <strong>spark.filters</strong> package are basically just wrappers that return their flash.filters packaged equivalent from the clone() method.  I&#8217;m guessing that they just wanted to create filters that fell inside the spark package structure that could be improved or extended at a later time.  You can easily replace this: <code>&lt;s:DropShadowFilter /&gt;</code> with this: <code>&lt;mx:DropShadowFilter /&gt;</code> and get the same result.</p>
<p>Any one have a better explanation?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2010/04/13/core-flex-4-filters-in-spark-filters-vs-flash-filters/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Core Flex 4 &#8211; Elements vs Children</title>
		<link>http://www.billdwhite.com/wordpress/2010/04/08/core-flex-4-elements-vs-children/</link>
		<comments>http://www.billdwhite.com/wordpress/2010/04/08/core-flex-4-elements-vs-children/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 18:15:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://www.billdwhite.com/wordpress/?p=296</guid>
		<description><![CDATA[When I started using Flex 4 I tried to get up to speed by using the new version in a manner similar to its predecessor until I came across roadblocks or when I determined I was able to take advantage <a class="more-link" href="http://www.billdwhite.com/wordpress/2010/04/08/core-flex-4-elements-vs-children/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>When I started using Flex 4 I tried to get up to speed by using the new version in a manner similar to its predecessor until I came across roadblocks or when I determined I was able to take advantage of the new features I had heard about such as skinning, states, etc. I quickly found that there were some obvious Flex questions that I was not able to answer without diving into the API docs and by playing with some examples so I could truly understand what is going on.   I knew from past experience that Halo was hiding a lot of the dirty details about what was going on in the display list, but once you start using Spark, you will come to see just how much Halo was really doing under the covers and why Spark is a much more &#8216;honest&#8217; way of working with the display list.<br /> <span id="more-296"></span></p>
<p>One of the first things I hit was the term &#8216;elements&#8217;.  What is an element?  Is it the same thing as a child?  Initially I concluded that elements where just another way of saying children (wrong).  I figured that all elements where child components and vice versa.  Then I noticed that some of the methods that I was expecting to find inside the new containers (as well as some of the existing ones) were missing. Where is getElements()?  How do I find out how many elements I have?  Can I just use <strong>getChildren()</strong> and treat the result like an <strong>IVisualElement</strong> (which itself was a mystery to me at the time).</p>
<p>So I started to <em>really</em> read the API docs, Flex source and blog postings about these topics.  I also tried to decipher the slides shows that some bloggers posted about the great new features of Flex 4, but it turns out the slides do not make much sense if you do not have the audio of the presentation to go along with them.</p>
<p>Finally, I started to put together some very basic demos that would help me explore the new world of elements and help me figure out what I was really doing when it came to using the new Spark containers.</p>
<p>I&#8217;ll start by stating the questions I had at the time. Question number one was &#8220;How do I get the all the elements of a spark container?&#8221;  I was expecting a getElements() method similar to the familiar <strong>getChildren()</strong> method from Flex 3.  Instead, what you have are two properties: <strong>numElements</strong> and <strong>numChildren</strong>.  To obtain all of the elements of a container, you can use a for-loop with the numElements count and call the getElementAt() method for each one.  Pretty obvious after you realize there is no getElements convenience method. Question number two was: &#8220;what is the difference between an element and a child?&#8221;.  Let&#8217;s look at the difference between elements and children&#8230;.</p>
<p>An element is basically anything that implements the <strong>IVisualElement</strong> interface.  A child is anything that extends from <strong>DisplayObject</strong>.  When trying to determine if a component is an element or a child or both, remember that a <strong>UIComponent</strong> is a descendant of DisplayObject, so all UIComponents are DisplayObjects and therefore can be children. Also know that UIComponent implements IVisualElement so all UIComponents are considered &#8216;elements&#8217;.  However, this does not mean that all DisplayObjects are elements.  A DisplayObject that is parented by a container (ie, contained within that container) is a child of that container.  But it is only an element of that container if it also implements IVisualElement.  So when is a DisplayObject a child of a container and when is a DisplayObject an element of that container?  Some examples showing different types of containers will answer this question.</p>
<p>In the first example, we look at the result when the container in question is an older Halo container (in this case, a Halo Panel).  Because Panel is a descendant of <strong>DisplayObjectContainer</strong>, it has the <strong>addChild()</strong> method.  In addition, because it descends from <strong>Container</strong> (which implements <strong>IVisualElementContainer</strong>), it also has the <strong>addElement()</strong> method.  We will see that the Container&#8217;s implementation of the IVisualElementContainer interface is just a facade to the display list API but it is implemented here so that it will have the same methods that we find in the newer Spark containers that also implement IVisualElementContainer.</p>
<p>So we can add both children and elements to this container.  However, we cannot add just any type of element to it. There is a difference between VisualElements and GraphicElements.  VisualElements implement the <strong>IVisualElement</strong> interface, but GraphicElements implement an extension of IVisualElement called IGraphicElement which has some extra features that the container needs to know about. Therefore, some elements (such as the GraphicElement) cannot be added directly to the Halo Panel.  The compiler will complain that it needs to be wrapped in a Group container first. More on why in a second&#8230;.</p>
<p>The Panel in the following example contains several UIComponents including another Halo Panel, a Spark Panel, some Halo Buttons, some Spark Buttons and a SkinnableContainer with child components of its own. (Note that the components inside the SkinnableContainer will NOT be children of the Panel.  They are children of the SkinnableContainer.)   All of these components are DisplayObjects so they are all &#8216;children&#8217;.  Clicking the &#8216;Show Children&#8221; button reveals as much.  In addition, all of these components are UIComponents (which implements IVisualElement) so they are all &#8216;elements&#8217; as well.</p>
<p><a href="http://www.billdwhite.com/wordpress/wp-content/demos/CoreFlex4ElementsDemo/srcview/CoreFlex4ElementsDemo01.html">View Source</a></p>
<p align="center">
<object width="550" height="600">
<param name="movie" value="/wordpress/wp-content/demos/CoreFlex4ElementsDemo/CoreFlex4ElementsDemo01.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="550" height="600" src="/wordpress/wp-content/demos/CoreFlex4ElementsDemo/CoreFlex4ElementsDemo01.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>Now take a look at the next example.  This time the container in question is a Spark Group.  Like the Halo Panel in the previous example, Group is a descendant of DisplayObjectContainer so it has the addChild() method and because it implements IVisualElementContainer, we can add IVisualElements (&#8216;elements&#8217;) to it as well using addElement().  The Group container can also handle GraphicElements such as a Rect (a Rectangle GraphicElement) which the Halo Panel could not.  This is because, unlike the Halo Panel, the Group object knows how to display GraphicElements in an optimized manner.  What does that mean? Read on&#8230;</p>
<p>GraphicElements require a little more involvement from their parent containers than do regular VisualElements.  The key here is the <strong>IGraphicElement</strong> interface that GraphicElements implement.  As I mentioned before, it is an extension of the IVisualElement interface (which is why GraphicElements can be added to the Group through the Group&#8217;s addElement() method).  But GraphicElements are not DisplayObjects so they cannot be seen unless they get &#8216;drawn&#8217; onto another DisplayObject by their parent.  So if you add a Rectangle to a Group, the Group will also need to have a DisplayObject to draw the Rectangle on so it will show up in that Group.  Just to optimize things a bit, the Group can actually reuse the same DisplayObject to draw multiple GraphicElements when possible.  The container can use any DisplayObject that implements ISharedDisplayObject to draw the GraphicElement. In the first example, the Halo Panel could not do this so it could not draw GraphicElements in this optimized manner.  Thus, the compiler gave an error saying you have to wrap it in a container that can deal with this.  The Group container can do this so GraphicElements can be added to a Group.</p>
<p>One other thing to note: while some GraphicElements will allow the Group parenting them to create a DisplayObject for that GraphicElement to be drawn in, others will create their own DisplayObjects to be drawn in, and this interface (IGraphicElement) allows the parent Group to manage that DisplayObject even though the parent Group did not create it.(ie to add the DisplayObject as a child so the IGraphicElement can be drawn into it).</p>
<p>So what does this mean?  It means that in our next example, the number of children is not the same as the number of elements.  This example uses the same set of components from the first example, but it adds 4 rectangles which are GraphicElements. The children are all IVisualElements. However, they are not all children.  The rectangles are GraphicElements which do not descend from DisplayObject.  BUT, the Group knows that it needs to add DisplayObjects so that the GraphicElements can be drawn inside the container.  The rectangles are different sizes and rotations so the Group decided to add two new DisplayObjects to draw the four rectangles on. Pretty cool, huh?</p>
<p><a href="http://www.billdwhite.com/wordpress/wp-content/demos/CoreFlex4ElementsDemo/srcview/CoreFlex4ElementsDemo02.html">View Source</a></p>
<p align="center">
<object width="550" height="800">
<param name="movie" value="/wordpress/wp-content/demos/CoreFlex4ElementsDemo/CoreFlex4ElementsDemo02.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="550" height="800" src="/wordpress/wp-content/demos/CoreFlex4ElementsDemo/CoreFlex4ElementsDemo02.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>Now look at example 3.  Instead of a Group, we are using a SkinnableContainer. The SkinnableContainer has the same set of components as the previous example.  But, the SkinnableContainer uses a Skin for its visual representation and that Skin is the first and only child of the SkinnableContainer.  The SkinnableContainer&#8217;s default Skin class is comprised of a Rectangle (for the border) and a Group called the ContentGroup which all skins for containers need so Flex know where to add children to the container.</p>
<p>So this example illustrates the fact that, while the SkinnableContainer has 10 elements, it only has one child: the Skin of the SkinnableContainer.  In turn, that skin has only one child:  the ContentGroup Group component.  You may be asking &#8220;why are there not 2 children of the Skin: one being the ContentGroup and the other being the DisplayObject for the Rectangle (serving as the border) to be drawn in?  The answer is because the Skin class descends from the Group class and Groups will add DisplayObjects when necessary to draw any GraphicElements they contain.  In this case, no new DisplayObjects were required.  The Skin class just drew the Rect GraphicElement directly onto itself.  It can do this because the Skin&#8217;s ancestor, the Group class, also implements <strong>ISharedDisplayObject</strong> which means that it can serve as a shared DisplayObject used to draw GraphicElements when necessary.  So the Skin manages the DisplayObjects used to render the GraphicElement, and the in this case, the DisplayObject it is using to draw on is itself!  If you added other Rectangles to a custom skin and assigned that to the SkinnableContainer, the Skin might decide it needed more DisplayObjects to draw those other Rectangles and you would therefore see more children in the Skin&#8217;s child list.</p>
<p>One other thing to note is that the number of elements stays the same when you look at the element list for the SkinnableContainer, its Skin, and the Skin&#8217;s ContentGroup.  If you look at the source for SkinnableContainer, you will see that it determines the numElements value by getting the corresponding numElements value from the currentContentGroup so basically it is just re-routing you to its content group when you query for elements.  Likewise, the Skin of the SkinnableContainer does something similar.  It extends from Group, which gets the numElements property from its internal mxmlContent property which is an array of visual content children for this Group.  Both of these are analogous to the RawChildren property of the Panel container which you used to get ALL the children of the Panel rather than just the children that you added to the Panel which came from the getChildren() method.</p>
<p><a href="http://www.billdwhite.com/wordpress/wp-content/demos/CoreFlex4ElementsDemo/srcview/CoreFlex4ElementsDemo03.html">View Source</a></p>
<p align="center">
<object width="550" height="750">
<param name="movie" value="/wordpress/wp-content/demos/CoreFlex4ElementsDemo/CoreFlex4ElementsDemo03.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="550" height="750" src="/wordpress/wp-content/demos/CoreFlex4ElementsDemo/CoreFlex4ElementsDemo03.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>After reading all of this, it may not seem any clearer than when you started.  You basically have to familiarize yourself with the inheritance hierarchy and relationship between 7 different classes/interfaces:</p>
<p>1. DisplayObject<br /> 2. UIComponent<br /> 3. Container,<br /> 4. IVisualElement,<br /> 5. IGraphicElement,<br /> 6. IVisualElementContainer<br /> 7. ISharedDisplayObject</p>
<p>Once you know who these fit together, you&#8217;ll soon understand the difference between elements and children.  I&#8217;m sure I&#8217;ve messed up some of the facts and gotten a few things wrong so feel free to put corrections in the comments section if you think I&#8217;m way off base on any of this.  <img src='http://www.billdwhite.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>UPDATE:  Check out these links for more information on this and related topics:</p>
<ul>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+DOM+Tree+API">Article on the Gumbo DOM Tree API</a> (this is full of great detail on this topic)</li>
<li><a href="http://flexponential.com/2009/12/08/differences-between-ivisualelement-parent-and-ivisualelement-owner/">Nice example</a> on the the difference between the owner and parent of a component.  Very nice.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.billdwhite.com/wordpress/2010/04/08/core-flex-4-elements-vs-children/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.345 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-21 22:04:55 -->

<!-- Compression = gzip -->