<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.23476-</id>
  <updated>2009-11-16T15:30:15Z</updated>
  <title>Comments for Advanced Flex Deep Linking with URLKit (http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.23476</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=23476" title="Advanced Flex Deep Linking with URLKit" />
    <published>2008-09-30T15:00:00Z</published>
    <updated>2008-10-14T17:27:30Z</updated>
    <title>Advanced Flex Deep Linking with URLKit</title>
    <summary>

One of the difficulties for rich internet applications (RIA&apos;s), is attempting to preserve the traditional browser experience for the user.  With Flex applications, there are several barriers to this kind of experience.  First, end users are used to using the back and forward buttons to navigate through an a site.  Second, users expect each state of an application to be reflected in its URL.  Third, users expect that they can bookmark a specific state of an application and return to it at a later time.  URLKit addresses these issues in Flex 2/3 applications, and it formed the base of the deep linking support inside of Flex 3.  If you are a Flex developer this a tool that you should certainly be familiar with.

Note: URLKit was developed by Joe Berkovitz of NoteFlight and Todd Rein of Adobe Systems.</summary>
    <author>
      <name>David Tucker</name>
      <uri>http://www.davidtucker.net/</uri>
    </author>
    
    <category term="Features" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[<div class="ap_r" style="margin: 0 16px 16px 16px;"><a href="http://www.insideria.com/dtucker/urlkit/urlkit-large.jpg" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/dtucker/urlkit/urlkit-small.jpg" alt="urlkit" title="Click to enlarge" width="148"/></a></div>

<p>One of the difficulties for rich internet applications (RIA's), is attempting to preserve the traditional browser experience for the user.  With Flex applications, there are several barriers to this kind of experience.  First, end users are used to using the back and forward buttons to navigate through an a site.  Second, users expect each state of an application to be reflected in its URL.  Third, users expect that they can bookmark a specific state of an application and return to it at a later time.  <a href="http://code.google.com/p/urlkit/" target="_blank">URLKit</a> addresses these issues in Flex 2/3 applications, and it formed the base of the deep linking support inside of Flex 3.  If you are a Flex developer this a tool that you should certainly be familiar with.</p>

<p><em><strong>Note:</strong> URLKit was developed by Joe Berkovitz of <a href="http://www.noteflight.com/" target="_blank">NoteFlight</a> and Todd Rein of <a href="http://www.adobe.com/" target="_blank">Adobe Systems</a>.</em></p>

<h2><strong>Introduction to URLKit</strong></h2>

<p>Flex 2 provided the history management functionality.  There are several reasons why this isn't a complete solution for an application that needs to preserve as much of the traditional browser experience as possible.  The developer has little control over the specific URL and how it maps to the specific state of the application (the URL's are automatically created by the Flex application).  This also makes it nearly impossible to preserve a URL structure for a future version of the application.</p>

<p>URLKit seeks to extend this type of technology by giving the developer fine-grained bi-directional control over the relationship between the URL and the application's state.  It allows you to declare URL mappings for a state of your application within MXML.  To understand how this functions inside of Flex, you can view the following sample application that comes bundled with URLKit:</p>

<p><a href="http://www.davidtucker.net/staging/urlkit/sample/" target="_blank">URLKit Sample Application</a> (developed by Joe Berkovitz and Todd Rein)</p>

<h2><strong>The Theory Behind URLKit</strong></h2>

<p>If you are not familiar with Flex / Flash deep linking technologies, this concept may seem strange.  How can the url change without reloading the entire Flex application?  In fact any change to the core URL or query string would cause the entire application to reload.  However, there is an element of the URL that can be changed - and the page will not reload: anything after the hash symbol.  Typically in HTML this is used with 'named anchors', but in this case this string can be used to map the state of a Flex application.  Consider the following URL's:</p>

<p>
http://www.davidtucker.net/SampleApplication.html<br />
http://www.davidtucker.net/SampleApplication.html#/state1/product1
</p>

<p>Both of these URL's would load the same page.  Also, if someone entered the first URL, and then he entered the second URL - the page would not reload.  This is the core idea behind deep linking with URLKit.  In addition, a layer of JavaScript exists between the Flex application and the browser managing the bi-directional communication between the two.  With these pieces in place, effective deep linking in Flex can meet all of the criteria for maintaining the traditional browser experience.</p>  

<h2><strong>Preparing Your Application for URLKit</strong></h2>

<p>URLKit can function in both Flex 2 and Flex 3, but the procedure for setting up these environments for URLKit is different.  If you are using Flex 2, check out the article listed at the end of this tutorial, "Using Flex 3&#8217;s Deep Linking Features in Flex 2".</p>

<p>You will first need to obtain URLKit from <a href="http://code.google.com/p/urlkit/" target="_blank">here</a>.  Once you have downloaded and expanded the file, you will want to look for the urlkitFlex3.swc file inside of the urlkit/bin directory.  This will need to be added to your project's build path for URLKit to function properly.  Once you have added this to your application, you are ready to start working with URLKit.</p>

<h2><strong>A Basic Example</strong></h2>

<p>With this knowledge, you can build a simplistic example that will illustrate this functionality.  URLKit has four different rules for mapping URL's to an application's state.  I will cover these in depth later, but for this example, I will be using <strong>UrlValueRule</strong> which maps a single value in the URL to a property within the application.</p>

<p>For any URLKit rule to work, you need to have a single instance of the URLBrowserManager component in your application.  This is the component that connects URLKit to the BrowserManager inside of Flex 3.  Without this, your rules will not work.</p>

<p>In the following example, I created an application with a ViewStack.  This ViewStack contains six Box components.  I want to be able to map the selectedIndex on the ViewStack to a property in the URL.  Since we are using UrlValueRule (later in this article, you will learn about another rule that would work better in this situation), we can map this property to a value inside of the URL.</p>

<div class="acode" style="overflow:auto;padding: 10px;"><div style="overflow-x:visible;">
<code language="perl">
<pre>
&lt;url:FlexBrowserManagerAdapter applicationState="{urlRules}" /&gt;
&lt;url:UrlValueRule id="urlRules" urlFormat=";view=*"
	sourceValue="mainVS.selectedIndex" defaultValue="0" /&gt;</pre>
</code>

</div></div>

<p><a href="http://www.davidtucker.net/staging/urlkit/one/" target="_blank">Sample Application</a> (view source enabled)</p>

<h2><strong>Know the Rules</strong></h2>

<p>As I mentioned previously, UrlValueRule is not the only value that you can use with URLKit.  By default, URLKit has four different rules:</p>

<ul>

<li><a href="http://www.davidtucker.net/docs/urlkit/urlkit/rules/UrlValueRule.html" target="_blank">UrlValueRule</a> - As show previously, this rule enables the developer to map a portion of the URL to a property of the application.  When using the UrlValueRule in this manner, the two values (the URL and the application property) are both bound to each other which means that a change in one will mean a change in the other.  If you do not wish to use the binding, UrlValueRule also dispatches a change event which can also be used to trigger a change in state.<br />
</li>

<li><a href="http://www.davidtucker.net/docs/urlkit/urlkit/rules/UrlNavigatorRule.html" target="_blank">UrlNavigatorRule</a> - I mentioned previously that our application could have benefitted from a different rule other than UrlValueRule.  UrlNavigatorRule is designed specifically to work with Accordian's, NavBar's, TabNavigator's, and ViewStack's.  So, instead of having to map the URL value to the selectedIndex property, you simply need to tell the rule what navigator it needs to point to.  It handles the rest.  <a href="http://www.davidtucker.net/staging/urlkit/two/" target="_blank">Sample UrlNavigatorRule Example</a> (View Source Enabled)</li>

<li><a href="http://www.davidtucker.net/docs/urlkit/urlkit/rules/UrlDelegateRule.html" target="_blank">UrlDelegateRule</a> - This rule allows the developer to pass off a portion of the URL mapping to another rule (or rule set).  This is commonly used so that the main application can pass off a portion of the mapping to a child component.  In that way the URL can reflect the state of nested components.  For this to work properly, you will need to use the next rule, UrlRuleSet.</li>

<li><a href="http://www.davidtucker.net/docs/urlkit/urlkit/rules/UrlRuleSet.html" target="_blank">UrlRuleSet</a> - This rule allows you to group multiple rules together so that a single URL can be parsed for multiple values.  It also allows you to state in which way you want to the child rules to match the URL.</li>

</ul>

<p>By using these rules, you can accomplish sophisticated deep linking through multiple nested components inside of Flex.</p>

<h2><strong>Using Multiple Rules</strong></h2>

<p>UrlRuleSet enables you to chain multiple rules together: with each rule taking a piece of the URL and working with it.  To illustrate this point, I created a simple example that extends our previous one.  Now, both the ViewStack's selected child and the color of those children are bound to the URL.  This is defined within a UrlRuleSet like this:</p>

<div class="acode" style="overflow:auto;padding: 10px;"><div style="overflow-x:visible;">
<code language="perl">
<pre>
&lt;url:UrlRuleSet id="urlRules"&gt;
	&lt;url:UrlNavigatorRule id="viewRule" urlFormat=";view=*"
		title="Application View" viewStack="{mainVS}" /&gt;
	&lt;url:UrlValueRule id="colorRule" urlFormat=";color=*"
		numberValue="{bgColor}"
		change="bgColor = colorRule.numberValue" defaultValue="0"/&gt;
&lt;/url:UrlRuleSet&gt;</pre>
</code>

</div></div>

<p>The application now also contains a color picker at the bottom that lets the user pick the color.  When either the color or view is changed, both are reflected in the URL. 

<p>In this example - there is one important distinction to make.  The two links below both contain the same color value.  If everything works, both of these examples should come up with a dark red background.  If you go to the following URL, everything should work as planned:</p>

<p><a href="http://www.davidtucker.net/staging/urlkit/three/#;view=View0;color=10027008" target="_blank">http://www.davidtucker.net/staging/urlkit/three/#;view=View0;color=10027008</a></p>

<p>However, the following link does not work correctly:</p>

<p><a href="http://www.davidtucker.net/staging/urlkit/three/#;color=10027008" target="_blank">http://www.davidtucker.net/staging/urlkit/three/#;color=10027008</a></p>

<p>The reason lies with the <code>type</code> property for the UrlRuleSet.  UrlRuleSet allows you to match URL's in one of three ways:</p>

<ul>

<li><strong>all</strong> (default) - When the type property is set to 'all', every rule inside of the UrlRuleSet must match the URL.  If even one rule does not match the URL, none of the rules are mapped.  </li>
<li><strong>any</strong> - If the type property is set to 'any', some of the child rules may be mapped - and others won't be.</li>
<li><strong>one</strong> - For the times when the type property is set to 'one', only the first rule in the UrlRuleSet that matches the URL will be mapped.</li>

</ul>

<p>This explains the reason that the second example above did not work correctly.  If you pass in a color alone, the viewRule is not matched.  However, because the color has a default value, you can pass in the view alone, and the rules will be mapped.  Consider the following example:</p>

<p><strong>URL:</strong> /index.html#/view1;minValue=2;maxValue=10</p>

<div class="acode" style="overflow:auto;padding: 10px;"><div style="overflow-x:visible;">
<code language="perl">
<pre>
&lt;url:UrlRuleSet id="urlRules" type="all"&gt;
	&lt;url:UrlNavigatorRule id="viewRule" urlFormat="/*"
		title="Application View" viewStack="{mainVS}" /&gt;
	&lt;url:UrlValueRule id="minValueRule" urlFormat=";minValue=*"
		sourceValue="this.minValue" /&gt;
	&lt;url:UrlValueRule id="maxValueRule" urlFormat=";maxValue=*"
		sourceValue="this.maxValue" /&gt;
	&lt;url:UrlValueRule id="sortOrderRule" urlFormat=";sortOrder=*"
		sourceValue="this.sortOrder" /&gt;
&lt;/url:UrlRuleSet&gt;</pre>
</code>

</div></div>

<p>There are four child rules for the above UrlRuleSet.  In this example, the type property of the UrlRuleSet is 'all'.  This means that all of the rules must match for any of them to be mapped.  In this case (with the URL listed above), none of the rules would be mapped.  If the type property was set to 'any' the first three rules would be executed since they have matched in the URL.  Finally, if the type property was set to 'one', only the first rule would executed (since it is the first child rule of the UrlRuleSet that matches the URL).</p>

<p>With the previous examples as evidence, the defaultValue property can be very important.  It can directly affect the way in which URL's are parsed.  If it cannot match a portion of the URL it will just default to the defaultValue.  Every rule that you consider 'optional' or every value that you do not want reflected in the URL all the time - should have a defaultValue set.  Also, if there is a default state that the application resides in, you probably need to set a defaultValue for its URL mapping rule.</p>

<h2><strong>Delegating Responsibility</strong></h2>

<p>As stated earlier, URLKit can map the state not only in the root file, but also in child components.  To accomplish this, you will use the UrlDelegateRule.  The UrlDelegateRule will in most cases will need only one parameter, 'rule', which will be the rule that the mapping will be delegated to.</p>

<p>When working with UrlNavigatorRule's there is a property that eases the use of UrlDelegateRule's.  According to the URLKit documentation, "navigatorChildRule is a special, bindable, property on UrlNavigatorRule, that returns a child&#8217;s URL rules.  It updates whenever the selected child of the navigator changes."  The developer could also choose to use an expression in place of navigatorChildRule (which would be required if you were using another rule besides UrlNavigatorRule).  However, for this to work properly, each UrlRuleSet in the child components must have an id of 'urls'.</p>

<p>In the following example, there are three levels of nesting within the application:</p>

<ul>

<li><strong>Main.mxml</strong> - The root of the application contains a TabNavigator with three child components of type SampleView.  It has a UrlRuleSet that takes the first portion of the URL and delegates the rest of the URL to the currently selected child component of TabNavigator.</li>
<li><strong>SampleView.mxml</strong> - This component contains another TabNavigator with three child components of type ChildView.  It contains a UrlRuleSet (with an id of 'urls').  The rule set contains a UrlNavigatorRule that maps the first portion of the URL.  The remaining portion of the URL is delegated to the currently selected child of the TabNavigator.</li>
<li><strong>ChildView.mxml</strong> - This component contains an Accordian with three child components of type HBox.  It has a single UrlNavigatorRule that maps the final portion of the URL to the Accordian.</li>

</ul>

<div class="ap_c" style="margin: 16px;"><a href="http://www.insideria.com/dtucker/urlkit/appDiagram-large.jpg" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/dtucker/urlkit/appDiagram-small.jpg" alt="appDiagram-large.jpg" title="Click to enlarge" width="400"/></a><div class="apcaption">Figure 1. UrlDelegateRule Sample Application</div></div>

<p><a href="http://www.davidtucker.net/staging/urlkit/four/" target="_blank">Sample Application</a> (view source enabled)</p>

<h2><strong>Conclusion</strong></h2>

<p>Hopefully, you see the value of having a deep linking tool as powerful as URLKit in your arsenal.  If URLKit is more than what you need, you may want to check out the basic Flex 3 Deep Linking functionality.  I have included links to LiveDocs below where you can get additional information on its functionality.</p>

<h2><strong>Resources</strong></h2>

<p>
<a href="http://code.google.com/p/urlkit/" target="_blank">URLKit at Google Code</a><br />
<a href="http://www.davidtucker.net/docs/urlkit/" target="_blank">URLKit Documentation</a><br />
<a href="http://www.joeberkovitz.com/blog/2007/12/12/using-flex-3s-deep-linking-features-in-flex-2/" target="_blank">Using Flex 3&#8217;s Deep Linking Features in Flex 2</a><br />
<a href="http://livedocs.adobe.com/flex/3/html/help.html?content=deep_linking_3.html" target="_blank">Flex 3 - Using the BrowserManager</a><br />
<a href="http://livedocs.adobe.com/flex/3/langref/mx/managers/BrowserManager.html" target="_blank">Flex 3 Language Reference - BrowserManager</a>
</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2043489</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2043489" />
    <title>Comment from Steve W on 2008-09-30</title>
    <author>
        <name>Steve W</name>
        <uri>http://www.cfuser.net</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.cfuser.net">
        <![CDATA[<p>Thanks for the information.  Any idea if this will be baked into Flex 4?</p>]]>
    </content>
    <published>2008-09-30T16:22:52Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2043492</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2043492" />
    <title>Comment from David Tucker on 2008-09-30</title>
    <author>
        <name>David Tucker</name>
        <uri>http://www.davidtucker.net</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.davidtucker.net">
        <![CDATA[<p>My assumption is that the current deep linking that was introduced in Flex 3 will remain, but URLKit will remain a separate project.</p>]]>
    </content>
    <published>2008-09-30T17:04:42Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2043509</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2043509" />
    <title>Comment from Adnan Doric on 2008-09-30</title>
    <author>
        <name>Adnan Doric</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>There is no preloader in "URLKit Sample Application".<br />
Is this because of deep linking ?</p>

<p>If yes, it is not very usefull for the moment.</p>

<p>( Firefox 3.0.3 / FP 9.0.124 )</p>]]>
    </content>
    <published>2008-10-01T01:19:55Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2044009</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2044009" />
    <title>Comment from matthew on 2008-10-10</title>
    <author>
        <name>matthew</name>
        <uri>http://www.creativewebsitedesigner.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.creativewebsitedesigner.com">
        <![CDATA[<p>thank u r information    </p>

<p>it very  useful</p>

<p>u r blog Is very  nice</p>

<p>      <br />
</p>]]>
    </content>
    <published>2008-10-10T12:03:00Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2044077</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2044077" />
    <title>Comment from Hyder Alamgir on 2008-10-11</title>
    <author>
        <name>Hyder Alamgir</name>
        <uri>http://alamgirdesigns.blogspot.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://alamgirdesigns.blogspot.com">
        <![CDATA[<p>Until I read the comment by Adnan, I thought the sample application was improperly compiled. If the preloader malfunctions when an app implements the URLKit, I personally think most developers will be inclined to avoid it.</p>

<p>I still think the project is a great tool for flex devs. Keep up the good work!</p>]]>
    </content>
    <published>2008-10-11T11:24:15Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2044093</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2044093" />
    <title>Comment from multik on 2008-10-11</title>
    <author>
        <name>multik</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>This is not working in opera browser.</p>]]>
    </content>
    <published>2008-10-11T16:59:00Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2044170</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2044170" />
    <title>Comment from David Liu on 2008-10-13</title>
    <author>
        <name>David Liu</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>There is no preloader for any Flex application when using "#" in URL. This is a known bug for now. </p>

<p>Refer to: <a href="http://www.mail-archive.com/flexcoders@yahoogroups.com/msg99894.html">http://www.mail-archive.com/flexcoders@yahoogroups.com/msg99894.html</a></p>

<p>and: <a href="http://bugs.adobe.com/jira/browse/SDK-14162">http://bugs.adobe.com/jira/browse/SDK-14162</a></p>

<p>Just to give credit to URLKit, not their fault.<br />
</p>]]>
    </content>
    <published>2008-10-13T19:17:08Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2044304</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2044304" />
    <title>Comment from sky on 2008-10-15</title>
    <author>
        <name>sky</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>thanks David, that is a great article.</p>]]>
    </content>
    <published>2008-10-15T22:39:28Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2044637</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2044637" />
    <title>Comment from Adnan Doric on 2008-10-23</title>
    <author>
        <name>Adnan Doric</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>@David Liu</p>

<p>Indeed, sorry if it wasn't clear. Deep linking is broken and not useful atm. URLKit can be useful for lot of people even if I'll stick to SWFAddress.</p>]]>
    </content>
    <published>2008-10-23T09:40:13Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2044725</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2044725" />
    <title>Comment from Laith Juwaidah on 2008-10-25</title>
    <author>
        <name>Laith Juwaidah</name>
        <uri>http://www.ljuwaidah.org</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.ljuwaidah.org">
        <![CDATA[<p>When I try using navBar with a ToggleButtonBar I get an error, anyone can help me with this? I modified the code fourth example so it looks something like this:<br />
<br />
        <br />
        <br />
</p>]]>
    </content>
    <published>2008-10-25T17:52:43Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2045153</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2045153" />
    <title>Comment from david on 2008-10-30</title>
    <author>
        <name>david</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>In the fist sample (http://www.davidtucker.net/staging/urlkit/one/#), how to prevent an out of index exception of the stackview. Because users can enter URL with negative index (like view = -1)</p>

<p>Thank you</p>]]>
    </content>
    <published>2008-10-30T14:34:33Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2045918</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2045918" />
    <title>Comment from Dil on 2008-11-07</title>
    <author>
        <name>Dil</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p><br />
David, <br />
Thank you for providing a detailed information about urlkit. <br />
I was trying to implement this in my app and faced the following issues</p>

<p>1) In your first sample application (viewstack) we cannot move backward up to "0" position, as it was the first screen - how can we set it to that initial step? (the defaultValue is set to "0") </p>

<p><br />
2) downloaded urlkit from googlecode is having a tag prefix as  instead of </p>

<p>Hope you can help me</p>

<p>Thanks<br />
Dil<br />
</p>]]>
    </content>
    <published>2008-11-07T23:14:36Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2045919</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2045919" />
    <title>Comment from Dil on 2008-11-07</title>
    <author>
        <name>Dil</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p><br />
David, <br />
Thank you for providing a detailed information about urlkit. <br />
I was trying to implement this in my app and faced the following issues</p>

<p>1) In your first sample application (viewstack) we cannot move backward up to "0" position, as it was the first screen - how can we set it to that initial step? (the defaultValue is set to "0") </p>

<p><br />
2) downloaded urlkit from googlecode is having a tag prefix as  instead of </p>

<p>Hope you can help me</p>

<p>Thanks<br />
Dil<br />
</p>]]>
    </content>
    <published>2008-11-07T23:15:35Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2046560</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2046560" />
    <title>Comment from Rob on 2008-11-19</title>
    <author>
        <name>Rob</name>
        <uri>http://www.pixelbox.net</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.pixelbox.net">
        <![CDATA[<p>This is great, I look forward to implementing it soon!</p>]]>
    </content>
    <published>2008-11-19T11:53:54Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2047622</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2047622" />
    <title>Comment from Lance on 2008-11-29</title>
    <author>
        <name>Lance</name>
        <uri>http://www.systemsofseven.com/blog</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.systemsofseven.com/blog">
        <![CDATA[<p>Man, this is great!  I got to using URLKit in like 5 minutes from this, awesome!</p>

<p>I am still wondering how this compares to SWFAddress, because their google analytics and sitemap features sound interesting.  Would this be possible with URLKit?</p>

<p>Thanks!<br />
Lance</p>]]>
    </content>
    <published>2008-11-29T10:47:14Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2048905</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2048905" />
    <title>Comment from Rich Tretola on 2008-12-15</title>
    <author>
        <name>Rich Tretola</name>
        <uri>http://www.insideria.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com">
        <![CDATA[<p>David,</p>

<p>What is the event that you can listen for when the URL address is rewritten?<br />
</p>]]>
    </content>
    <published>2008-12-15T17:47:55Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2054414</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2054414" />
    <title>Comment from leo on 2009-03-03</title>
    <author>
        <name>leo</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>David Liu said: </p>

<p>There is no preloader for any Flex application when using "#" in URL. This is a known bug for now. </p>

<p>Refer to: <a href="http://copilka.info/">http://copilka.info/</a></p>

<p>and: <a href="http://tsitologiya.ru/">http://tsitologiya.ru/</a></p>]]>
    </content>
    <published>2009-03-03T16:46:37Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2066405</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2066405" />
    <title>Comment from johnsmth.smith15 on 2009-06-18</title>
    <author>
        <name>johnsmth.smith15</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Let's get one thing out of the way - Flex 2 is not a replacement for Flash. Flash 9 will hopefully arrive some time near christmas and a preview was released on Labs today. Flex was the first to to leverage the possibilties of the new Flash Player 9 but if you download the AS3 extension from <a href="http://www.firstwebhosting.net/dedicated-hosting.html">dedicated hosting</a> Labs you can code AS3 in Flash 8 today. Flex is a tool for building applications. It has no Timeline, no Library, no drawing tools. It is primarily a tool to create applications based on a set of easy extendable components that connects to data services on the web. It may be used by designers to lay out the forms in an application, but it is created with Programmers in mind for <a href="http://www.firstwebhosting.net/website-design.html">web site design</a></p>]]>
    </content>
    <published>2009-06-18T07:26:10Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2068265</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2068265" />
    <title>Comment from Jochen Szostek on 2009-07-14</title>
    <author>
        <name>Jochen Szostek</name>
        <uri>http://www.appletree.be</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.appletree.be">
        <![CDATA[<p>Does this still work with Flex 4?</p>

<p>Because I get: </p>

<p>TypeError: Error #1009: Cannot access a property or method of a null object reference.<br />
	at urlkit.rules::FlexBrowserManagerAdapter/initializeState()[/Users/joeb/Work/urlkit/urlkit/src/urlkit/rules/FlexBrowserManagerAdapter.as:284]<br />
	at urlkit.rules::FlexBrowserManagerAdapter/syncState()[/Users/joeb/Work/urlkit/urlkit/src/urlkit/rules/FlexBrowserManagerAdapter.as:239]<br />
	at Function/http://adobe.com/AS3/2006/builtin::apply()<br />
	at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:10408]<br />
	at mx.core::UIComponent/callLaterDispatcher()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:10348]</p>

<p>When changing it to Flex 4 code like this:</p>

<p><br />

	xmlns:fx="http://ns.adobe.com/mxml/2009" <br />
	xmlns:s="library://ns.adobe.com/flex/spark" <br />
	xmlns:mx="library://ns.adobe.com/flex/halo" <br />
    xmlns:url="http://www.allurent.com/2006/urlkit"<br />
    viewSourceURL="srcview/index.html"><br />
    </p>

<p>    <br />
    <br />
    <br />
    <br />
     <br />
    
        title="Application View {mainVS.selectedIndex}" <br />
        sourceValue="mainVS.selectedIndex"<br />
        defaultValue="0" /><br />
    	<br />
    <br />
    <br />
    <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
    </p>

<p>    <br />
    
        click="mainVS.selectedIndex = ( ( mainVS.selectedIndex == 5 ) ? 0 : mainVS.selectedIndex + 1 )" /><br />
    <br />
</p>]]>
    </content>
    <published>2009-07-14T14:20:38Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2068364</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2068364" />
    <title>Comment from Jochen Szostek on 2009-07-16</title>
    <author>
        <name>Jochen Szostek</name>
        <uri>http://www.appletree.be</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.appletree.be">
        <![CDATA[<p>FYI: Fixed the previous issue. <br />
It was just 2 lines of code that needed to be adjusted for Flex 4 compatibility.</p>

<p>Greets</p>]]>
    </content>
    <published>2009-07-16T07:45:15Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23476-comment:2068958</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23476" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/09/advanced-flex-deep-linking-wit-1.html#comment-2068958" />
    <title>Comment from Mark Foster on 2009-07-24</title>
    <author>
        <name>Mark Foster</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Helpful post.</p>

<p>Am I correct in the conclusion that URLKit is based around tags in the view for its implementation vs. managing state in ActionScript. </p>

<p>I am working with using a State Design pattern and a presentation model so the view is not really where I want my URL rules and logic. </p>

<p>If this is the case, I suspect swfAddress is better for my approach as I need to implement my url management in actionscript and it seems better adapted to that.</p>

<p>Comments? Thanks.</p>]]>
    </content>
    <published>2009-07-24T18:27:31Z</published>
  </entry>

</feed
