<?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>BirdBase</title>
	<atom:link href="http://birdbase.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://birdbase.org</link>
	<description>Flash/AS3 microsite development framework</description>
	<lastBuildDate>Fri, 21 Oct 2011 22:07:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hitman.com live for some months now</title>
		<link>http://birdbase.org/2011/10/hitman-com-live-for-some-months-now/</link>
		<comments>http://birdbase.org/2011/10/hitman-com-live-for-some-months-now/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 22:07:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=132</guid>
		<description><![CDATA[A high-profile use of Birdbase has been live since June, and we are happy to share. http://www.hitman.com/ From Square-Enix.]]></description>
			<content:encoded><![CDATA[<p>A high-profile use of Birdbase has been live since June, and we are happy to share.</p>
<p><a href="http://www.hitman.com/">http://www.hitman.com/</a></p>
<p>From Square-Enix.</p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/10/hitman-com-live-for-some-months-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quiet, and Stable</title>
		<link>http://birdbase.org/2011/10/quiet-and-stable/</link>
		<comments>http://birdbase.org/2011/10/quiet-and-stable/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 22:03:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=130</guid>
		<description><![CDATA[Not much to report Birdbase is stable, we&#8217;ve updated the dependencies internally and nothing broke, so that&#8217;s all good. Looking into buying a Flash Builder 4.5 licence so we can provide examples and tutorials for making iOS, Android and Blackberry apps. We tested it with the trial version and all we had to do was [...]]]></description>
			<content:encoded><![CDATA[<p>Not much to report <img src='http://birdbase.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Birdbase is stable, we&#8217;ve updated the dependencies internally and nothing broke, so that&#8217;s all good.</p>
<p>Looking into buying a Flash Builder 4.5 licence so we can provide examples and tutorials for making iOS, Android and Blackberry apps. We tested it with the trial version and all we had to do was ensure that the resources were bundled in. Easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/10/quiet-and-stable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release 0.8.3, FDT and the Demo Site</title>
		<link>http://birdbase.org/2011/06/release-0-8-3-fdt-and-the-demo-site/</link>
		<comments>http://birdbase.org/2011/06/release-0-8-3-fdt-and-the-demo-site/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 09:46:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Demos]]></category>
		<category><![CDATA[Releases]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=127</guid>
		<description><![CDATA[A user recently had a compilation issue on FDT; see here for the thread on Github. There was a stray dependency in the as3-navigator library which we took the opportunity to cleanup, as well as updating the AssetLoader to the latest version, 2.3.4. The fix worked out, and so the latest BirdBase is actually available [...]]]></description>
			<content:encoded><![CDATA[<p>A user recently had a compilation issue on FDT; <a href="https://github.com/vishvish/BirdBase-Demo-Site/issues/2">see here</a> for the thread on Github. There was a stray dependency in the as3-navigator library which we took the opportunity to cleanup, as well as updating the AssetLoader to the latest version, 2.3.4.</p>
<p>The fix worked out, and so the latest BirdBase is actually available within <a href="https://github.com/vishvish/BirdBase-Demo-Site">the demo site</a>, rather than on the BirdBase repo. We&#8217;ll get around to checking the core code and ensuring it really is a proper release before we update the main repo.</p>
<p>This means that the demo site should compile cleanly on Flash Builder, FDT and with Sprouts/Rake. Thanks to Alistair Colling for reporting the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/06/release-0-8-3-fdt-and-the-demo-site/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Release 0.8.2</title>
		<link>http://birdbase.org/2011/06/release-0-8-2/</link>
		<comments>http://birdbase.org/2011/06/release-0-8-2/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 15:21:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Releases]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=123</guid>
		<description><![CDATA[Apologies for the long break &#8211; we&#8217;ve been finishing off the production site. Trying to get the filesize and dependencies down as part of the optimization process. So here&#8217;s version 0.8.2.]]></description>
			<content:encoded><![CDATA[<p>Apologies for the long break &#8211; we&#8217;ve been finishing off the production site.</p>
<p>Trying to get the filesize and dependencies down as part of the optimization process. So here&#8217;s version 0.8.2.</p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/06/release-0-8-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deep linking with SWFAddress 2.5</title>
		<link>http://birdbase.org/2011/06/deep-linking-with-swfaddress-2-5/</link>
		<comments>http://birdbase.org/2011/06/deep-linking-with-swfaddress-2-5/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 15:10:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=121</guid>
		<description><![CDATA[The BirdBase Demo Site has been updated to use the latest &#8211; development version &#8211; of SWFAddress. If you see errors like this: [Fault] exception, information=ArgumentError: Error #1063: Argument count mismatch on com.asual.swfaddress::SWFAddress$/_setValue(). Expected 2, got 1. at Function/http://adobe.com/AS3/2006/builtin::apply() at flash.external::ExternalInterface$/_callIn() at Function/() Then update your SWFAddress Actionscript and Javascript from either the Demo Site [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="https://github.com/vishvish/BirdBase-Demo-Site">BirdBase Demo Site</a> has been updated to use the latest &#8211; development version &#8211; of SWFAddress.</p>
<p>If you see errors like this:<br />
<code><br />
[Fault] exception, information=ArgumentError: Error #1063: Argument count mismatch on com.asual.swfaddress::SWFAddress$/_setValue(). Expected 2, got 1.<br />
at Function/http://adobe.com/AS3/2006/builtin::apply()<br />
at flash.external::ExternalInterface$/_callIn()<br />
at Function/()<br />
</code></p>
<p>Then update your SWFAddress Actionscript and Javascript from either the Demo Site on Github or the <a href="https://swfaddress.svn.sourceforge.net/svnroot/swfaddress/trunk/swfaddress/src/">Asual repository here</a>.</p>
<p>The BirdBase Demo Site has been updated to use the latest BirdBase lib, 0.8.2, and we will push the changes into the BirdBase repo shortly.</p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/06/deep-linking-with-swfaddress-2-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tips: Updating Strings Dynamically</title>
		<link>http://birdbase.org/2011/05/tips-updating-strings-dynamically/</link>
		<comments>http://birdbase.org/2011/05/tips-updating-strings-dynamically/#comments</comments>
		<pubDate>Sun, 15 May 2011 23:08:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=109</guid>
		<description><![CDATA[Loading the strings initially A commenter just asked, &#8216;Docs say “The TextService supports runtime dynamic reloading of strings, so if these are reloaded, in say, a different language, all your IHaveUpdateableText instances will be reformatted and updated immediately.” How do I reload strings dynamically?&#8217; Good question. Let&#8217;s start by seeing how the strings are loaded [...]]]></description>
			<content:encoded><![CDATA[<h5>Loading the strings initially</h5>
<p>A commenter just asked, &#8216;Docs say “The <code>TextService</code> supports runtime dynamic reloading of strings, so if these are reloaded, in say, a different language, all your <code>IHaveUpdateableText</code> instances will be reformatted and updated immediately.”<br />
How do I reload strings dynamically?&#8217;</p>
<p>Good question. Let&#8217;s start by seeing how the strings are loaded in the first place.</p>
<p>The strings are kept &#8211; initially &#8211; in the configuration.yml file. It&#8217;s convenient and straightforward, and the section looks something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="yml" style="font-family:monospace;">strings:
    home_title:     &quot;Home Section&quot;
    media_title:    &quot;Media Section&quot;
    news_title:     &quot;News Section&quot;</pre></div></div>

<p>The configuration is loaded into the <code>ConfigurationService</code> by the <code>D_Services</code> command in <code>org.birdbase.framework.controller.core</code>.</p>
<p>Once the configuration is loaded successfully, we parse the YML into a dictionary and deliver it to various objects:</p>
<p>(<code>ConfigurationService</code>)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> handleComplete<span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span> <span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">try</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">d</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Dictionary</span> = YAML<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">decode</span><span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span> <span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Dictionary</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		setConfiguration<span style="color: #000000;">&#40;</span> <span style="color: #004993;">d</span> <span style="color: #000000;">&#41;</span>
		setStrings<span style="color: #000000;">&#40;</span> <span style="color: #004993;">d</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		setPreferences<span style="color: #000000;">&#40;</span> <span style="color: #004993;">d</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		setNavigation<span style="color: #000000;">&#40;</span> <span style="color: #004993;">d</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		eventDispatcher<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> StateEvent<span style="color: #000000;">&#40;</span> StateEvent<span style="color: #000066; font-weight: bold;">.</span>ACTION<span style="color: #000066; font-weight: bold;">,</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>CONFIGURING_SERVICES_COMPLETE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Error</span> <span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		fatal<span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		eventDispatcher<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> StateEvent<span style="color: #000000;">&#40;</span> StateEvent<span style="color: #000066; font-weight: bold;">.</span>ACTION<span style="color: #000066; font-weight: bold;">,</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>CONFIGURING_SERVICES_FAILED <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Line 104 above calls the <code>setStrings</code> function which basically sends the strings chunk of the parsed YML to the <code>TextService</code>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>78
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">textService<span style="color: #000066; font-weight: bold;">.</span>strings = <span style="color: #004993;">d</span><span style="color: #000066; font-weight: bold;">.</span>strings<span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>The TextService then updates any updateable components that are registered. And that&#8217;s it.</p>
<p>So, the way to update the strings dynamically is to simply set them on the <code>TextService</code> instance. But how do we load a new file in?</p>
<h5>Loading a new YML file of strings</h5>
<p>The new YML should look exactly like the strings section in the configuration.yml, although the values will be different:</p>

<div class="wp_syntax"><div class="code"><pre class="yml" style="font-family:monospace;">strings:
    home_title:     &quot;Accueil&quot;
    media_title:    &quot;Medias&quot;
    news_title:     &quot;Nouvelles&quot;</pre></div></div>

<p>So we ought to have an <code>URLLoader</code> to load this for us.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>Inject<span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> textService<span style="color: #000066; font-weight: bold;">:</span>ITextService<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">URLLoader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLLoader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> <span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> handleComplete <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;&lt;path/to/my/new/strings/file.yml&gt;&quot;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> handleComplete<span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">d</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Dictionary</span> = YAML<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">decode</span><span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span> <span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Dictionary</span><span style="color: #000066; font-weight: bold;">;</span>
	textService<span style="color: #000066; font-weight: bold;">.</span>strings = <span style="color: #004993;">d</span><span style="color: #000066; font-weight: bold;">.</span>strings<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>And the <code>TextService</code> will update all your registered components.</p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/05/tips-updating-strings-dynamically/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Release 0.7.6</title>
		<link>http://birdbase.org/2011/05/release-0-7-6/</link>
		<comments>http://birdbase.org/2011/05/release-0-7-6/#comments</comments>
		<pubDate>Thu, 12 May 2011 15:30:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Releases]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=107</guid>
		<description><![CDATA[A one-line fix that corrects the behaviour of a site to redirect to its root if you refresh the browser. https://github.com/vishvish/BirdBase]]></description>
			<content:encoded><![CDATA[<p>A one-line fix that corrects the behaviour of a site to redirect to its root if you refresh the browser.</p>
<p><a href="https://github.com/vishvish/BirdBase">https://github.com/vishvish/BirdBase</a></p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/05/release-0-7-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding BirdBase. #2: Navigator</title>
		<link>http://birdbase.org/2011/05/understanding-birdbase-2-navigator/</link>
		<comments>http://birdbase.org/2011/05/understanding-birdbase-2-navigator/#comments</comments>
		<pubDate>Wed, 11 May 2011 16:08:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Documentation]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=100</guid>
		<description><![CDATA[Deep-linking in BirdBase is provided by integrating the navigator-as3 library, written by Eric-Paul Lecluse. The navigator gives us a number of useful things: Ability to link one or more URL strings to an application view. A complete transition management to deal with moving from state to state. A way to change the state of the [...]]]></description>
			<content:encoded><![CDATA[<p>Deep-linking in BirdBase is provided by integrating the <code><a href="https://github.com/epologee/navigator-as3">navigator-as3</a></code> library, written by Eric-Paul Lecluse.</p>
<p>The navigator gives us a number of useful things:</p>
<ol>
<li>Ability to link one or more URL strings to an application view.</li>
<li>A complete transition management to deal with moving from state to state.</li>
<li>A way to change the state of the current view.</li>
</ol>
<p>Firstly, we may wish to map the URL &#8220;/news&#8221; to the NewsView. Easy. But suppose we want to map &#8220;/news/1&#8243; and &#8220;/news/2&#8243; to the NewsView as well? In our configuration, we can simply pass in an array: [ "/news", "/news/*" ] which covers all of those URLs.</p>
<p>Secondly, how does the transition management prove useful? Well, simply switching between views is possible, but may not be desirable, or there may be processing required during the switch, say some animation occurs. Well, <code>navigator-as3</code> has a few interfaces that may be implemented.</p>
<p><code>com.epologee.navigator.behaviors.IHasStateTransition</code> describes two methods, <code>transitionIn</code> and <code>transitionOut</code>. These are probably best implemented on the Mediator and are called by the Navigator when it wants to show or hide the view. There is one argument to both of these methods, a callback function. Your transition code lives in these methods and then the callback is fired to let the Navigator know that it may carry on.</p>
<p>Example of <code>transitionOut</code> method:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> transitionOut<span style="color: #000000;">&#40;</span> callOnComplete<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Function</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #009900; font-style: italic;">// put your code here</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">// fade view out</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">// cleanup</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">// fire callback</span>
&nbsp;
	callOnComplete<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>There is further information on the navigator-as3 <a href="http://https://github.com/epologee/navigator-as3">here</a>. It&#8217;s worth noting that Eric-Paul&#8217;s RobotLegs integration is in progress right now, and BirdBase DOES NOT use it anyway as per EP&#8217;s instructions. As BirdBase allows us to do view mapping directly in the configuration, BirdBase simply instantiates the elements of the navigator directly and maps Views and Mediators directly into the navigator.</p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/05/understanding-birdbase-2-navigator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding BirdBase. #1: Bootstrap</title>
		<link>http://birdbase.org/2011/05/understanding-birdbase-1-bootstrap/</link>
		<comments>http://birdbase.org/2011/05/understanding-birdbase-1-bootstrap/#comments</comments>
		<pubDate>Wed, 11 May 2011 14:50:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Documentation]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=60</guid>
		<description><![CDATA[Compiling a Main.as class and running a flash application is pretty easy if all you want to do is draw a square on screen and print &#8220;Hello, World!&#8221; into a TextField. Applications sometimes need to do a whole bunch of things before the user gets control. Examples: loading fonts loading images setting some default preferences [...]]]></description>
			<content:encoded><![CDATA[<p>Compiling a Main.as class and running a flash application is pretty easy if all you want to do is draw a square on screen and print &#8220;Hello, World!&#8221; into a TextField. Applications sometimes need to do a whole bunch of things before the user gets control. Examples:</p>
<ul>
<li>loading fonts</li>
<li>loading images</li>
<li>setting some default preferences</li>
<li>loading some text</li>
</ul>
<p>BirdBase handles these things during its Bootstrap process, and the class that runs all this is <code>BootManagement</code> in the <code>org.birdbase.framework.controller.boot</code> package. The Bootstrap runs a series of commands, one after the other, and waits for each one to complete successfully before moving onto the next one. This is run by code known as a Finite State Machine, or FSM. The FSM has its roots in the PureMVC framework, and was ported over to RobotLegs by Joel Hooks.</p>
<p>The command steps are found in the <code>org.birdbase.framework.controller.core</code> package, and labelled alphabetically from A to E, in the order that the Bootstrap runs them.</p>
<ol>
<li><strong>Preferences</strong>: initializes the application preferences model</li>
<li><strong>Navigator</strong>: creates and sets up the navigator library</li>
<li><strong>Models</strong>: prepares application models for use &#8211; assets, configuration, navigation, and text</li>
<li><strong>Services</strong>: starts the configuration service and loads the configuration from the filesystem</li>
<li><strong>Assets</strong>: loads boot-time assets</li>
</ol>
<p>The <code>BootManagement</code> class configures the FSM, and we will now break down the code to explain how each section works.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> static const FSM<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">XML</span> = 
    <span style="color: #000066; font-weight: bold;">&lt;</span>fsm initial=<span style="color: #000000;">&#123;</span>STARTING<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;!--</span> THE INITIAL STATE <span style="color: #000066; font-weight: bold;">--&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;</span>state <span style="color: #004993;">name</span>=<span style="color: #000000;">&#123;</span>STARTING<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>STARTED<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>CONFIGURING_PREFERENCES<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>START_FAILED<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>FAILING<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;/</span>state<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">&lt;</span>state <span style="color: #004993;">name</span>=<span style="color: #000000;">&#123;</span>CONFIGURING_PREFERENCES<span style="color: #000000;">&#125;</span> changed=<span style="color: #000000;">&#123;</span>CONFIGURE_PREFERENCES<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>CONFIGURING_PREFERENCES_COMPLETE<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>CONFIGURING_NAVIGATOR<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>CONFIGURING_PREFERENCES_FAILED<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>FAILING<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;/</span>state<span style="color: #000066; font-weight: bold;">&gt;</span></pre></div></div>

<p>SNIP&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">        <span style="color: #000066; font-weight: bold;">&lt;</span>state <span style="color: #004993;">name</span>=<span style="color: #000000;">&#123;</span>LOADING_ASSETS<span style="color: #000000;">&#125;</span> changed=<span style="color: #000000;">&#123;</span>LOAD_ASSETS<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>LOAD_ASSETS_COMPLETE<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>STARTING_APPLICATION<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>LOAD_ASSETS_FAILED<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>FAILING<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;/</span>state<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">&lt;</span>state <span style="color: #004993;">name</span>=<span style="color: #000000;">&#123;</span>STARTING_APPLICATION<span style="color: #000000;">&#125;</span> changed=<span style="color: #000000;">&#123;</span>START_APPLICATION<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>START_APPLICATION_COMPLETE<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>READY<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
            <span style="color: #000066; font-weight: bold;">&lt;</span>transition action=<span style="color: #000000;">&#123;</span>START_APPLICATION_FAILED<span style="color: #000000;">&#125;</span> <span style="color: #004993;">target</span>=<span style="color: #000000;">&#123;</span>FAILING<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;/</span>state<span style="color: #000066; font-weight: bold;">&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;!--</span> READY TO ACCEPT BROWSER OR USER NAVIGATION <span style="color: #000066; font-weight: bold;">--&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;</span>state <span style="color: #004993;">name</span>=<span style="color: #000000;">&#123;</span>READY<span style="color: #000000;">&#125;</span> changed=<span style="color: #000000;">&#123;</span>GO<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;!--</span> REPORT FAILURE FROM ANY STATE <span style="color: #000066; font-weight: bold;">--&gt;</span>
        <span style="color: #000066; font-weight: bold;">&lt;</span>state <span style="color: #004993;">name</span>=<span style="color: #000000;">&#123;</span>FAILING<span style="color: #000000;">&#125;</span> changed=<span style="color: #000000;">&#123;</span>FAIL<span style="color: #000000;">&#125;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
    <span style="color: #000066; font-weight: bold;">&lt;/</span>fsm<span style="color: #000066; font-weight: bold;">&gt;;</span></pre></div></div>

<p>SNIP&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">    commandMap<span style="color: #000066; font-weight: bold;">.</span>mapEvent<span style="color: #000000;">&#40;</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>LOAD_ASSETS<span style="color: #000066; font-weight: bold;">,</span>            E_Assets<span style="color: #000066; font-weight: bold;">,</span> StateEvent<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    commandMap<span style="color: #000066; font-weight: bold;">.</span>mapEvent<span style="color: #000000;">&#40;</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>GO<span style="color: #000066; font-weight: bold;">,</span>                     ApplicationReady<span style="color: #000066; font-weight: bold;">,</span> StateEvent<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    commandMap<span style="color: #000066; font-weight: bold;">.</span>mapEvent<span style="color: #000000;">&#40;</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>FAIL<span style="color: #000066; font-weight: bold;">,</span>                   ApplicationFault<span style="color: #000066; font-weight: bold;">,</span> StateEvent<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    eventDispatcher<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> StateEvent<span style="color: #000000;">&#40;</span> StateEvent<span style="color: #000066; font-weight: bold;">.</span>ACTION<span style="color: #000066; font-weight: bold;">,</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>STARTED <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<ul>
<li>Each <code>state</code> node above describes a command step, and within the step we are most interested in the <code>transition</code> nodes.</li>
<li>Each state will map to a command. Your command will at least succeed or fail, and for each of those outcomes, we define a transition.</li>
<li>Once the application state is <code>STARTED</code> on line 30, the target is <code>CONFIGURING_PREFERENCES</code>. Move to the CONFIGURING_PREFERENCES state. You can see on line 120 that we are mapping the &#8220;changed&#8221; attribute <code>CONFIGURE_PREFERENCES</code> to the command <code>A_Preferences</code> in <code>org.birdbase.framework.controller.core</code>.</li>
<li>How do we know <code>CONFIGURING_PREFERENCES </code>is complete? Or has failed? The <code>onComplete</code> method in <code>A_Preferences</code>:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onComplete<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	eventDispatcher<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> StateEvent<span style="color: #000000;">&#40;</span> StateEvent<span style="color: #000066; font-weight: bold;">.</span>ACTION<span style="color: #000066; font-weight: bold;">,</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>CONFIGURING_PREFERENCES_COMPLETE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<ul>
<li>This declares that <code>BootManagement.CONFIGURING_PREFERENCES_COMPLETE</code>. And <code>BootManagement</code> moves onto the next step, which is <code>CONFIGURING_NAVIGATOR</code> and not displayed in the snippet above. But eventually, assuming successful completion of each step, we end up at your context:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">commandMap<span style="color: #000066; font-weight: bold;">.</span>mapEvent<span style="color: #000000;">&#40;</span> BootManagement<span style="color: #000066; font-weight: bold;">.</span>START_APPLICATION<span style="color: #000066; font-weight: bold;">,</span> StartApplication<span style="color: #000066; font-weight: bold;">,</span> StateEvent<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<ul>
<li>And that fires your <code>StartApplication</code> command. And we call the <code>ApplicationReady</code> command in BirdBase to startup the navigator and hand over control to the user.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/05/understanding-birdbase-1-bootstrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Demo Application v1.0</title>
		<link>http://birdbase.org/2011/05/demo-application-v1-0/</link>
		<comments>http://birdbase.org/2011/05/demo-application-v1-0/#comments</comments>
		<pubDate>Wed, 11 May 2011 12:55:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Demos]]></category>

		<guid isPermaLink="false">http://birdbase.org/?p=77</guid>
		<description><![CDATA[Get it here: https://github.com/vishvish/BirdBase-Demo-Site. See the demo in action here: http://demo.birdbase.org/demo-application/v1.0/]]></description>
			<content:encoded><![CDATA[<p>Get it here: <a href="https://github.com/vishvish/BirdBase-Demo-Site">https://github.com/vishvish/BirdBase-Demo-Site</a>.</p>
<p>See the demo in action here: <a href="http://demo.birdbase.org/demo-application/v1.0/">http://demo.birdbase.org/demo-application/v1.0/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://birdbase.org/2011/05/demo-application-v1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

