<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Andy Li’s Blog - web 2.0</title><link href="https://blog.onthewings.net/" rel="alternate"></link><link href="http://feeds.feedburner.com/tag/web-20/feed/atom.xml" rel="self"></link><id>https://blog.onthewings.net/</id><updated>2009-04-08T10:28:00+08:00</updated><entry><title>Deep Linking for AJAX</title><link href="https://blog.onthewings.net/2009/04/08/deep-linking-for-ajax/" rel="alternate"></link><published>2009-04-08T10:28:00+08:00</published><updated>2009-04-08T10:28:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-04-08:/2009/04/08/deep-linking-for-ajax/</id><summary type="html">&lt;p&gt;I have just made a independent study on “deep linking for &lt;span class="caps"&gt;AJAX&lt;/span&gt;” for the
course Web 2.0 technology. Seems that most of the info on the web about
deep linking implementation are for Flash web site but not &lt;span class="caps"&gt;AJAX&lt;/span&gt;’s, so I
release my report and presentation slide here …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have just made a independent study on “deep linking for &lt;span class="caps"&gt;AJAX&lt;/span&gt;” for the
course Web 2.0 technology. Seems that most of the info on the web about
deep linking implementation are for Flash web site but not &lt;span class="caps"&gt;AJAX&lt;/span&gt;’s, so I
release my report and presentation slide here hoping can help somebody.&lt;/p&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="356" marginheight="0" marginwidth="0" scrolling="no" src="//www.slideshare.net/slideshow/embed_code/1262036" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" width="427"&gt; &lt;/iframe&gt;
&lt;p&gt;&lt;div style="margin-bottom:5px"&gt; &lt;strong&gt; &lt;a href="https://www.slideshare.net/andy_li/deep-linking-for-ajax-presentation" target="_blank" title="Deep Linking For Ajax Presentation"&gt;Deep Linking For Ajax Presentation&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href="http://www.slideshare.net/andy_li" target="_blank"&gt;Andy Li&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;/p&gt;
&lt;hr/&gt;
&lt;h2&gt;What is Deep Linking&lt;/h2&gt;
&lt;p&gt;Deep Linking is a &lt;span class="caps"&gt;URL&lt;/span&gt; that point to a specific resource like a web page
or a file. User can access the resource directly through the &lt;span class="caps"&gt;URL&lt;/span&gt; without
further navigation (i.e.. bypassing “home” or “portal” page).&lt;/p&gt;
&lt;h2&gt;Why is Deep Linking Important&lt;/h2&gt;
&lt;p&gt;Deep linking is originally a build-in function of the web, enabling the
web pages to be interconnected, letting the users go to a specific
resource easily by clicking on the links from any web page. Without deep
linking, the web sites will become too separated and cannot be called as
a “web”.&lt;/p&gt;
&lt;p&gt;Moreover, deep linking is the basic requirement for bookmarking. Since
bookmarking is keeping the &lt;span class="caps"&gt;URL&lt;/span&gt; of a specific web page (or any other
resources), if the page itself do not have its own &lt;span class="caps"&gt;URL&lt;/span&gt;, there is no way
to bookmark it.&lt;/p&gt;
&lt;p&gt;Search engines, which index the web pages like we bookmark them, require
heavily on deep linking too. Search engines find the links on a page and
follow the links to index the pages. Texts or other resources that can
only be triggered to shown by script will be ignored by (most of the)
search engines. So deep linking has its value of &lt;span class="caps"&gt;SEO&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;To conclude, it is the matter of usability. Wherever the deep links are
presented, e.g.. bookmark menu, search results, they are more usable since
they are more likely to satisfy users’ needs and nearly all web-related
software works with deep links since it is the architecture of the web.&lt;/p&gt;
&lt;h2&gt;The Situation of &lt;span class="caps"&gt;AJAX&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Since the contents of &lt;span class="caps"&gt;AJAX&lt;/span&gt; sites are loaded by script in client side,
they do not own a &lt;span class="caps"&gt;URL&lt;/span&gt; by default. i.e.. There is no deep link to that
loaded content. It is a product of what &lt;span class="caps"&gt;AJAX&lt;/span&gt; intended to do: to prevent
reloading of the whole page.&lt;/p&gt;
&lt;p&gt;What is worse is when the user click the back button in the browser, the
page would not reload the previous content but go the page before
visiting the site. It is because the back button is implemented to track
the change of &lt;span class="caps"&gt;URL&lt;/span&gt; but not the change of content.&lt;/p&gt;
&lt;p&gt;Most of the time it does not matter since the loaded content is very
small and subtle, for example validation of forms or log in result or
hot posts. They are not the main content of the page so no deep link is
reasonable. But if there are some cases that the main content is loaded
by &lt;span class="caps"&gt;AJAX&lt;/span&gt;, deep linking should be implemented.&lt;/p&gt;
&lt;hr/&gt;
&lt;h2&gt;How to Implement Deep Linking for &lt;span class="caps"&gt;AJAX&lt;/span&gt;&lt;/h2&gt;
&lt;h3&gt;Low Level Concept&lt;/h3&gt;
&lt;p&gt;There is a trick that use ‘#’ in the &lt;span class="caps"&gt;URL&lt;/span&gt;. The ‘#’ is known as a hash,
which is originally used for links that link to the same page. For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;amp;lt;a href="#C4"&amp;amp;gt;See also Chapter 4.&amp;amp;lt;/a&amp;amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The above link will link to the anchor tag with attribute ‘name’ equals
to ‘C4’. When clicked, the page will scrolled to the element.&lt;/p&gt;
&lt;p&gt;It is used for implementing deep linking for &lt;span class="caps"&gt;AJAX&lt;/span&gt; because the browser
would not refresh the page when the link is clicked.&lt;/p&gt;
&lt;p&gt;What we need to do is when the page loaded, check the &lt;span class="caps"&gt;URL&lt;/span&gt; to see if
there is any hash value, do the loading if needed. After that, listen
for the change of the hash in the navigation bar. When it is changed,
get the value and do the according operation.&lt;/p&gt;
&lt;p&gt;For the links, simply append some hash like ‘http://someURL/#info’ to
let JavaScript to detect the values.&lt;/p&gt;
&lt;p&gt;The above actions can be done trivially by using the following property:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;window.location.hash
&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Use of Libraries&lt;/h3&gt;
&lt;p&gt;There are quite a few libraries for deep linking. They are already
stable and widely used in commercial projects. We can use these
libraries to avoid reinventing the wheel.&lt;/p&gt;
&lt;p&gt;I coded two minimal demos for the two libraries (which are different
from below), which can be viewed at
&lt;a href="/files/2009/deep-linking-for-ajax-demo/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;SWFAddress (&lt;a href="http://www.asual.com/swfaddress/"&gt;http://www.asual.com/swfaddress/&lt;/a&gt;)&lt;/h4&gt;
&lt;p&gt;It is originally made for Flash, since Flash is facing the same deep
linking problem. The library is supporting both Flash and &lt;span class="caps"&gt;AJAX&lt;/span&gt;, sharing
the same core JavaScript to detect and change hash values.&lt;/p&gt;
&lt;p&gt;The most simple example is first link the library in head:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;amp;lt;script type="text/javascript" src="swfaddress/swfaddress.js"&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And then declare a function to handle the change of hash value and add
the listener.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"text/javascript"&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;handleChange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evt&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pathNames&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'info'&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//load info page&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pathNames&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'contact'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//load contact page&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//load default page&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;SWFAddress&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SWFAddressEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CHANGE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleChange&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="err"&gt;/script&amp;amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;More examples can be found on
&lt;a href="http://www.asual.com/swfaddress/samples/"&gt;http://www.asual.com/swfaddress/samples/&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;History, JQuery plug-in (&lt;a href="http://plugins.jquery.com/project/history"&gt;http://plugins.jquery.com/project/history&lt;/a&gt;)&lt;/h4&gt;
&lt;p&gt;This is a the plug-ins written for jQuery.&lt;/p&gt;
&lt;p&gt;To use it, similar to SWFAddress, first link to the JavaScript file
after jQuery:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;amp;lt;script type="text/javascript" src="jquery.js"&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;
&amp;amp;lt;script type="text/javascript" src="jquery.history.js"&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And then declare a function to handle the change of hash value. This
plug-in unlike SWFAddress, it do not auto listen the change of &lt;span class="caps"&gt;URL&lt;/span&gt;. So
we need to set up our own function to do so or as below bind the
function to the anchor tags.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"text/javascript"&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;pageload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//load some page&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//load default page&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;ready&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="c1"&gt;// Initialize history plugin.&lt;/span&gt;
&lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;init&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pageload&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;live&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"click"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;attr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"href"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;charAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'#'&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;attr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"href"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/^.*#/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;   &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="err"&gt;/script&amp;amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;hr/&gt;
&lt;h2&gt;Limitation&lt;/h2&gt;
&lt;p&gt;Note that although using the above technique, the user can now bookmark
the deep link and using the ‘back button’ as normal, &lt;span class="caps"&gt;SEO&lt;/span&gt; problem is
still not solved. It is because the technique require use of JavaScript,
which is ignored by most of the search engines.&lt;/p&gt;
&lt;p&gt;The workaround is making a non-&lt;span class="caps"&gt;AJAX&lt;/span&gt; version of the web site. Not only it
can solve the &lt;span class="caps"&gt;SEO&lt;/span&gt; problem, it can provide a fall-back when JavaScript is disabled.&lt;/p&gt;
&lt;hr/&gt;
&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="dquo"&gt;“&lt;/span&gt;Deep Linking” in the World Wide Web, &lt;span class="caps"&gt;W3C&lt;/span&gt;&lt;br/&gt;
&lt;a href="http://www.w3.org/2001/tag/doc/deeplinking.html"&gt;http://www.w3.org/2001/tag/doc/deeplinking.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deep Linking is Good Linking, useit.com&lt;br/&gt;
&lt;a href="http://www.useit.com/alertbox/20020303.html"&gt;http://www.useit.com/alertbox/20020303.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deep Linking in Flash and &lt;span class="caps"&gt;AJAX&lt;/span&gt; Applications, Christian Cantrell&lt;br/&gt;
&lt;a href="http://weblogs.macromedia.com/cantrell/archives/2005/06/deep_linking_in.html"&gt;http://weblogs.macromedia.com/cantrell/archives/2005/06/deep_linking_in.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Unique URLs - Ajax Patterns&lt;br/&gt;
&lt;a href="http://ajaxpatterns.org/Unique_URLs"&gt;http://ajaxpatterns.org/Unique_URLs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SWFAddress, Asual&lt;br/&gt;
&lt;a href="http://www.asual.com/swfaddress/"&gt;http://www.asual.com/swfaddress/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;History, JQuery Plug-in&lt;br/&gt;
&lt;a href="http://plugins.jquery.com/project/history"&gt;http://plugins.jquery.com/project/history&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deep Linking, Wikipedia&lt;br/&gt;
&lt;a href="http://en.wikipedia.org/wiki/Deep_linking"&gt;http://en.wikipedia.org/wiki/Deep_linking&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="web 2.0"></category><category term="web usability design and engineering"></category></entry><entry><title>Multimedia element in the web, without sound and video?</title><link href="https://blog.onthewings.net/2009/03/27/multimedia-element-in-the-web-without-sound-and-video/" rel="alternate"></link><published>2009-03-27T09:02:00+08:00</published><updated>2009-03-27T09:02:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-03-27:/2009/03/27/multimedia-element-in-the-web-without-sound-and-video/</id><summary type="html">&lt;p&gt;Recently JavaScript and &lt;span class="caps"&gt;CSS&lt;/span&gt; is becoming more and more powerful. Like the
experiment shown in &lt;a href="http://www.chromeexperiments.com/"&gt;Chrome Experiment&lt;/a&gt;, we can see that the browser
is now really capable to handle all those texts, images and  animations
(at least in the near future, since there is still &lt;span class="caps"&gt;IE&lt;/span&gt; need to catch up …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently JavaScript and &lt;span class="caps"&gt;CSS&lt;/span&gt; is becoming more and more powerful. Like the
experiment shown in &lt;a href="http://www.chromeexperiments.com/"&gt;Chrome Experiment&lt;/a&gt;, we can see that the browser
is now really capable to handle all those texts, images and  animations
(at least in the near future, since there is still &lt;span class="caps"&gt;IE&lt;/span&gt; need to catch up).
But yes, multimedia means not only these three but also sound and video.
As I can see there is no really “standard” way to handle that currently.&lt;/p&gt;
&lt;p&gt;It is funny that sound and video can only be presented in a web page
with the help of plug-ins. For videos, most of them are served by Flash
Player, like &lt;a href="http://youtube.com"&gt;YouTube&lt;/a&gt; and &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;. And very popular among the
design agencies and artists, mov files are used, which presented by
Quicktime player. Without the plug-ins, no browser can show video. Sound
is most likely embed in Flash and actually not many website make use of
sounds (I’m not talking about those annoying background music okay?).&lt;/p&gt;
&lt;p&gt;I don’t understand why the browsers/web standards seem to be not
interested to have native support of sound and video. If they care about
those animations, image manipulations, round corners, vector graphics
etc., they should support sound and video too.&lt;/p&gt;
&lt;p&gt;Actually I have an idea, seems so crazy but it works - making Flash
player built into the browser. Maybe not using Adobe’s Flash Player, if
anybody mind that is not open source, or Adobe crazily disallow to do
so. But there are other open source ones, like &lt;a href="http://www.gnashdev.org/"&gt;Gnash&lt;/a&gt; and &lt;a href="http://swfdec.freedesktop.org/wiki/"&gt;swfdec&lt;/a&gt;,
although they may not support all the features but better than nothing.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;</content><category term="Flash"></category><category term="web 2.0"></category></entry><entry><title>Multi-threading simulation</title><link href="https://blog.onthewings.net/2009/03/12/multi-threading-simulation/" rel="alternate"></link><published>2009-03-12T02:59:00+08:00</published><updated>2009-03-12T02:59:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-03-12:/2009/03/12/multi-threading-simulation/</id><summary type="html">&lt;p&gt;JavaScript performance is becoming more and more critical since we are
all obsessed with developing &lt;span class="caps"&gt;CPU&lt;/span&gt;-hungry stuff like &lt;a href="http://www.pixastic.com/lib/"&gt;pixastic&lt;/a&gt;
(manipulate image in JavaScript), &lt;a href="http://box2d-js.sourceforge.net/"&gt;Box2D.js&lt;/a&gt; (2D physic simulation).
Sometime these  computational expensive calculations will block the user
from interacting with the &lt;span class="caps"&gt;UI&lt;/span&gt; and freeze the screen. So, some developer …&lt;/p&gt;</summary><content type="html">&lt;p&gt;JavaScript performance is becoming more and more critical since we are
all obsessed with developing &lt;span class="caps"&gt;CPU&lt;/span&gt;-hungry stuff like &lt;a href="http://www.pixastic.com/lib/"&gt;pixastic&lt;/a&gt;
(manipulate image in JavaScript), &lt;a href="http://box2d-js.sourceforge.net/"&gt;Box2D.js&lt;/a&gt; (2D physic simulation).
Sometime these  computational expensive calculations will block the user
from interacting with the &lt;span class="caps"&gt;UI&lt;/span&gt; and freeze the screen. So, some developer
start asking for multi-threading in JavaScript.&lt;/p&gt;
&lt;p&gt;Multi-threading is a technology that let a program split into several
threads and let them run in parallel. For example the visual part
including the &lt;span class="caps"&gt;UI&lt;/span&gt; is running in one thread and some other work like
zipping a file is run in another thread. In that case the &lt;span class="caps"&gt;UI&lt;/span&gt; will not
need to wait for the zipping process and able to respond to user input.&lt;/p&gt;
&lt;p&gt;Sadly, this is not implemented in JavaScript (or we should say not
implemented in the browsers?). But there are still some developers
finding ways to simulate multi-threading. Although the tricks may not
really solve the problem completely, but still are very useful to be
learned. Here are two of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.sitepoint.com/article/multi-threading-javascript/"&gt;http://www.sitepoint.com/article/multi-threading-javascript/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dojotoolkit.org/book/dojo-book-0-9/part-5-dojox/dojox-timing"&gt;http://www.dojotoolkit.org/book/dojo-book-0-9/part-5-dojox/dojox-timing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And recently, there is a &lt;a href="http://cssecodemonkeys.wordpress.com/2009/03/06/threading-in-flex/"&gt;threading library for Flex&lt;/a&gt;, which use
similar techniques as above to simulate threading.&lt;/p&gt;</content><category term="web 2.0"></category></entry><entry><title>Meanings behind the fancy transition effects</title><link href="https://blog.onthewings.net/2009/03/02/meanings-behind-the-fancy-transition-effects/" rel="alternate"></link><published>2009-03-02T22:59:00+08:00</published><updated>2009-03-02T22:59:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-03-02:/2009/03/02/meanings-behind-the-fancy-transition-effects/</id><summary type="html">&lt;p&gt;It is quite popular that websites have more and more “&lt;span class="caps"&gt;AJAX&lt;/span&gt; animation
effects”(which should be JavaScript animation effects actually…). Many
&lt;span class="caps"&gt;AJAX&lt;/span&gt; learners are obsessed with adding fancy animated effects on there
web page, and sometimes, adding it without thinking the particular
effect’s meaning, will actually confuse or disturb …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It is quite popular that websites have more and more “&lt;span class="caps"&gt;AJAX&lt;/span&gt; animation
effects”(which should be JavaScript animation effects actually…). Many
&lt;span class="caps"&gt;AJAX&lt;/span&gt; learners are obsessed with adding fancy animated effects on there
web page, and sometimes, adding it without thinking the particular
effect’s meaning, will actually confuse or disturb the end users.&lt;/p&gt;
&lt;p&gt;In the following, I will follow &lt;a href="http://script.aculo.us/"&gt;script.aculo.us&lt;/a&gt;‘s effect naming. You
may see the live effects in its &lt;a href="http://wiki.github.com/madrobby/scriptaculous/combination-effects-demo"&gt;wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are quite a few animation effects that are common, like fade
in/out, blind up/down, slide up/down. They can be seen easily over the
web and their meanings are obvious: to bring things in or out. But there
is still some different among them.&lt;/p&gt;
&lt;p&gt;For &lt;em&gt;fade&lt;/em&gt;, the transition is much smoother then the others since there
is no moving part. It should be applied on things that do not need much
attention, like changing top banner’s background image, just let the
users focus on what they are reading.&lt;/p&gt;
&lt;p&gt;For &lt;em&gt;blinding/sliding&lt;/em&gt;, the sense of changing is stronger. One of their
special usages is to resize things, like panels. Since resizing panels
often leads to change of layout, if there is no transition, the user may
not be able to catch up with the movement of the page elements.&lt;/p&gt;
&lt;p&gt;Some less popular effects like puff, shake are more easily to be used wrong.&lt;/p&gt;
&lt;p&gt;For &lt;em&gt;puff&lt;/em&gt;, since the animation ends with zero alpha, some developers
may use it as disappearing effect, but that’s wrong. Since Mac &lt;span class="caps"&gt;OSX&lt;/span&gt; is
using puff for a visual effect on opening files/programs, many Mac user
may be confused if you use it on removing elements.&lt;/p&gt;
&lt;p&gt;For &lt;em&gt;shake&lt;/em&gt;, some developers may think that it can draw user’s attention
effectively. Really, but we should use it carefully since shaking will
cause the user not able to see the elements inside the shaking area
easily. So, it takes time to let the shake stop and refocus on the
element’s details and it may disturb the user’s work.&lt;/p&gt;</content><category term="web 2.0"></category><category term="web usability design and engineering"></category></entry><entry><title>The right way to work with a web service</title><link href="https://blog.onthewings.net/2009/02/23/the-right-way-to-work-with-a-web-service/" rel="alternate"></link><published>2009-02-23T00:51:00+08:00</published><updated>2009-02-23T00:51:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-02-23:/2009/02/23/the-right-way-to-work-with-a-web-service/</id><summary type="html">&lt;p&gt;Mash-up is certainly a big feature of web 2.0. It make use of different
open web services to create creative apps, or even artworks. But
creative is creative, “hacking” open APIs with some way might not be so appropriate.&lt;/p&gt;
&lt;h2&gt;Let say here is a blogging &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;span class="caps"&gt;API&lt;/span&gt; lets …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Mash-up is certainly a big feature of web 2.0. It make use of different
open web services to create creative apps, or even artworks. But
creative is creative, “hacking” open APIs with some way might not be so appropriate.&lt;/p&gt;
&lt;h2&gt;Let say here is a blogging &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;span class="caps"&gt;API&lt;/span&gt; lets people write and read blogs in the server. For security
reason, the web service do not allow &lt;span class="caps"&gt;HTML&lt;/span&gt; appears in the post content.
Certainly, as a user, we hate this feature since plain text is boring
and a text-only blog is likely nobody would like to read. So, developers
(and even bloggers) will try their best to create some workarounds.&lt;/p&gt;
&lt;p&gt;One developer thinks that he might encode the blog content in his
software before sending to the web service, so the server will not
recognize the &lt;span class="caps"&gt;HTML&lt;/span&gt; stuff and store the whole content. When retrieving
back, the content is decoded before showing up to the users.&lt;/p&gt;
&lt;h2&gt;What’s wrong?&lt;/h2&gt;
&lt;p&gt;Firstly, the security problem that “patched” by filtering out &lt;span class="caps"&gt;HTML&lt;/span&gt; is
come back again, like we are back to the starting point. Secondly, since
the &lt;span class="caps"&gt;API&lt;/span&gt; is open, that means there are other software/programs that will
make use of the &lt;span class="caps"&gt;API&lt;/span&gt;, and they all do not know the decoding method used
by the developer. So, the end users of that developer’s software will be
likely blogging encoded posts that no one can read without using the
same software. Thirdly, this may break the terms of use of the &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;There is no hope in that case?&lt;/h2&gt;
&lt;p&gt;If you want &lt;span class="caps"&gt;HTML&lt;/span&gt;, no, there is no hope. But you might still implement
other methods to work with the &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;For example, Twitter is very similar to this case, micro blogging with
plain text, but there is &lt;a href="http://twitpic.com/"&gt;TwitPic&lt;/a&gt;, which store the picture in other
server and insert the link of the picture to the tweet. Users of TwitPic
is certainly seeing their picture displayed beautifully. And the normal
Twitter users can still see the picture by clicking on the links. The
idea is similar to “graceful degrading”.&lt;/p&gt;</content><category term="web 2.0"></category></entry><entry><title>Some research on JavaScript benchmark</title><link href="https://blog.onthewings.net/2009/02/16/some-research-on-javascript-benchmark/" rel="alternate"></link><published>2009-02-16T14:02:00+08:00</published><updated>2009-02-16T14:02:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-02-16:/2009/02/16/some-research-on-javascript-benchmark/</id><summary type="html">&lt;p&gt;Since I am going to make a benchmark for ActionScript performance across
different browser/platform, I take a look into the JavaScript benchmark
to see if I can simply port one to be used in ActionScript.&lt;/p&gt;
&lt;p&gt;The most famous ones should be Apple’s &lt;a href="http://www2.webkit.org/perf/sunspider-0.9/sunspider.html"&gt;SunSpider&lt;/a&gt;, Google’s &lt;a href="http://v8.googlecode.com/svn/data/benchmarks/v3/run.html"&gt;V8
Benchmark Suite …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Since I am going to make a benchmark for ActionScript performance across
different browser/platform, I take a look into the JavaScript benchmark
to see if I can simply port one to be used in ActionScript.&lt;/p&gt;
&lt;p&gt;The most famous ones should be Apple’s &lt;a href="http://www2.webkit.org/perf/sunspider-0.9/sunspider.html"&gt;SunSpider&lt;/a&gt;, Google’s &lt;a href="http://v8.googlecode.com/svn/data/benchmarks/v3/run.html"&gt;V8
Benchmark Suite&lt;/a&gt;, Mozilla’s &lt;a href="http://dromaeo.com/"&gt;Dromaeo&lt;/a&gt;. All the benchmarks are
compose of several test areas, basically including some basic JavaScript
operation test like Array manipulations, some more practical based test
like regular expression, ray-tracing etc.&lt;/p&gt;
&lt;p&gt;V8 Benchmark Suite consist 6 tests which has the least tests among the
three. But when I take a look into the source code, the testes are very
long. It even overrides Math.random() to a seeded random generator.&lt;/p&gt;
&lt;p&gt;SunSpider’s structure seems to be more simple and the tests inside are
more easy to read (although less documented compares to V8’s). I think
it should be not that hard to port to &lt;span class="caps"&gt;AS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I still do not have time to look into Dromaeo’s source but it has quite
a lot of tests. And some of the tests includes &lt;span class="caps"&gt;DOM&lt;/span&gt; and use of library
like jQuery and Prototype, which is not quite appropriate to be ported.&lt;/p&gt;
&lt;p&gt;My target should be porting SunSpider. But there is still some things to
be considered like whether to use &lt;span class="caps"&gt;AS&lt;/span&gt;’s build-in library, coverage of
Graphic manipulation etc. More researches are needed ;-) .&lt;/p&gt;</content><category term="web 2.0"></category><category term="web usability design and engineering"></category></entry><entry><title>Here is another reason Flash is better than AJAX for web apps</title><link href="https://blog.onthewings.net/2009/02/05/here-is-another-reason-flash-is-better-than-ajax-for-web-apps/" rel="alternate"></link><published>2009-02-05T00:56:00+08:00</published><updated>2009-02-05T00:56:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-02-05:/2009/02/05/here-is-another-reason-flash-is-better-than-ajax-for-web-apps/</id><summary type="html">&lt;p&gt;&lt;a href="http://www.appleinsider.com/articles/09/01/27/ie8s_javascript_performance_lags_well_behind_safari_chrome.html"&gt;AppleInsider | &lt;span class="caps"&gt;IE8&lt;/span&gt;’s JavaScript performance lags well behind Safari, Chrome&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Above is a recent article on the JavaScript performance of the
next-generation web browsers/rendering engines, including &lt;span class="caps"&gt;IE8&lt;/span&gt;, Firefox
3.1, Webkit r40220, Chrome 2.0.158.0 and Opera 10.&lt;/p&gt;
&lt;p&gt;From the test result in the article, we can …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="http://www.appleinsider.com/articles/09/01/27/ie8s_javascript_performance_lags_well_behind_safari_chrome.html"&gt;AppleInsider | &lt;span class="caps"&gt;IE8&lt;/span&gt;’s JavaScript performance lags well behind Safari, Chrome&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Above is a recent article on the JavaScript performance of the
next-generation web browsers/rendering engines, including &lt;span class="caps"&gt;IE8&lt;/span&gt;, Firefox
3.1, Webkit r40220, Chrome 2.0.158.0 and Opera 10.&lt;/p&gt;
&lt;p&gt;From the test result in the article, we can see that the performance of
&lt;span class="caps"&gt;JS&lt;/span&gt; varies a lot across the browsers (up to 1:10). This make developing
cross-platform web apps using &lt;span class="caps"&gt;AJAX&lt;/span&gt; much more difficult since you need to
make it as lightweight as possible.&lt;/p&gt;
&lt;p&gt;Developing in Flash would not face this problem because swf content runs
inside the virtual machine. Although it has been claimed that Flash
content runs relatively slower under Mac, but the different is not
noticeable in most cases. And the performance of ActionScript (3) is A
&lt;span class="caps"&gt;LOT&lt;/span&gt; higher than JavaScript in any browser.&lt;/p&gt;
&lt;p&gt;When developing large scale &lt;span class="caps"&gt;CPU&lt;/span&gt; hungry web apps, you better use Flash
instead of &lt;span class="caps"&gt;AJAX&lt;/span&gt;. (for other stuff, &lt;span class="caps"&gt;AJAX&lt;/span&gt; may be better, or a lot better…)&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;PS&lt;/span&gt;. I’ve googled around for some benchmarks on &lt;span class="caps"&gt;AS&lt;/span&gt;/&lt;span class="caps"&gt;JS&lt;/span&gt; to prove my point,
but seems that there is no recent benchmark that aims for this (only &lt;a href="http://www.jamesward.com/blog/2007/04/30/ajax-and-flex-data-loading-benchmarks/"&gt;a
2007 one&lt;/a&gt;). Hopefully I will have time to do it by myself in this week.&lt;/p&gt;</content><category term="Flash"></category><category term="web 2.0"></category></entry><entry><title>Quick way to put desktop apps online</title><link href="https://blog.onthewings.net/2009/01/25/quick-way-to-put-desktop-apps-online/" rel="alternate"></link><published>2009-01-25T01:02:00+08:00</published><updated>2009-01-25T01:02:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-01-25:/2009/01/25/quick-way-to-put-desktop-apps-online/</id><summary type="html">&lt;p&gt;I do not know if my idea have already been used somewhere. Anyway I
would share the idea here to see if it can inspire anybody.&lt;/p&gt;
&lt;p&gt;Nowadays desktop apps and web-based software (or SaaS or anything
similar) are emerging. Google works hard to let its &lt;a href="http://docs.google.com"&gt;docs&lt;/a&gt;, &lt;a href="http://www.google.com/reader"&gt;reader&lt;/a&gt;
to work offline …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I do not know if my idea have already been used somewhere. Anyway I
would share the idea here to see if it can inspire anybody.&lt;/p&gt;
&lt;p&gt;Nowadays desktop apps and web-based software (or SaaS or anything
similar) are emerging. Google works hard to let its &lt;a href="http://docs.google.com"&gt;docs&lt;/a&gt;, &lt;a href="http://www.google.com/reader"&gt;reader&lt;/a&gt;
to work offline. Many innovative web-based apps are coming, like
&lt;a href="http://aviary.com/"&gt;Aviary, the web-based design tools&lt;/a&gt;. And there are desktop version of
&lt;a href="http://twitter.com"&gt;Twitter&lt;/a&gt;, &lt;a href="http://www.ebay.com/"&gt;eBay&lt;/a&gt;, &lt;a href="http://www.flickr.com/"&gt;Flickr&lt;/a&gt;. Netbooks are targeted to serf the
net, which is making use of SaaS to compensate netbooks’ low computing
power. And there are  already people asking for a web-based &lt;span class="caps"&gt;OS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;But it is hard to put all the things in the cloud, at least it needs a
lot of money to get that storage to store all your music and video…
And the private stuff, transferring through the Internet is already
taking risk. So how to make them available to you anywhere like SaaS?&lt;/p&gt;
&lt;p&gt;The answer is a web interface of a software. It isn’t a new thing since
&lt;a href="http://www.videolan.org/vlc/"&gt;&lt;span class="caps"&gt;VLC&lt;/span&gt; Player&lt;/a&gt;, &lt;a href="http://www.emule-project.net/"&gt;eMule&lt;/a&gt;, &lt;a href="http://www.winamp.com/"&gt;Winamp&lt;/a&gt;(slightly different approach) and
possibly more software already have this function. The software itself
has a build-in web server, that make you access the service from
anywhere by typing the computer’s &lt;span class="caps"&gt;IP&lt;/span&gt; address. And yup, it is like telnet
that let you control the computer and the files, but even more like
remote desktop that give you a better interface, and with less bandwidth dependency.&lt;/p&gt;
&lt;p&gt;My idea is one step forward, not only to provide a web interface but
also a web service, like some &lt;span class="caps"&gt;REST&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt;. This can let developer make
their own web interface and host the interface elsewhere, further reduce
bandwidth dependency. It can also let developers make some mash up,
which is now between the desktop and the Internet but not only the
Internet itself.&lt;/p&gt;
&lt;p&gt;What we developer should do is to remember to provide such Internet
accessible &lt;span class="caps"&gt;API&lt;/span&gt; when developing desktop software. And it is even better
to draft a standard for other developers.&lt;/p&gt;</content><category term="web 2.0"></category></entry><entry><title>Time for me to start blogging on web 2.0</title><link href="https://blog.onthewings.net/2009/01/17/time-for-me-to-start-blogging-on-web-20/" rel="alternate"></link><published>2009-01-17T18:36:00+08:00</published><updated>2009-01-17T18:36:00+08:00</updated><author><name>Andy Li</name></author><id>tag:blog.onthewings.net,2009-01-17:/2009/01/17/time-for-me-to-start-blogging-on-web-20/</id><summary type="html">&lt;p&gt;For this semester, I am attending the course “Web 2.0 Technologies” and
I am required to blog things. The first post will come very soon! Stay tuned!&lt;/p&gt;</summary><content type="html">&lt;p&gt;For this semester, I am attending the course “Web 2.0 Technologies” and
I am required to blog things. The first post will come very soon! Stay tuned!&lt;/p&gt;</content><category term="web 2.0"></category></entry></feed>