<?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"
	>

<channel>
	<title>unitstep.net &#187; Ajax</title>
	<atom:link href="http://unitstep.net/blog/category/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://unitstep.net</link>
	<description>the home of peter chng</description>
	<pubDate>Sun, 05 Oct 2008 17:42:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Google Chrome: What it offers</title>
		<link>http://unitstep.net/blog/2008/09/02/google-chrome-what-it-offers/</link>
		<comments>http://unitstep.net/blog/2008/09/02/google-chrome-what-it-offers/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 01:03:15 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[XHTML]]></category>

		<category><![CDATA[browsers]]></category>

		<category><![CDATA[chrome]]></category>

		<category><![CDATA[comparison]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[internet explorer]]></category>

		<category><![CDATA[opera]]></category>

		<category><![CDATA[reviews]]></category>

		<category><![CDATA[web2.0]]></category>

		<category><![CDATA[gears]]></category>

		<category><![CDATA[ie]]></category>

		<category><![CDATA[mozilla]]></category>

		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://unitstep.net/?p=411</guid>
		<description><![CDATA[
After much speculation yesterday, marked by a leaked web comic and finally an acknowledgment by Google, Google Chrome, the much anticipated web browser, is here.
I encourage you to download it and give it a try, as I did as soon as it came out.  Here are some of my initial impressions.
Overview
Google released a fairly [...]]]></description>
			<content:encoded><![CDATA[<p class="image align-right"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome.jpg" alt="Google Chrome" /></p>
<p>After much <a href="http://blogoscoped.com/archive/2008-09-01-n47.html">speculation yesterday</a>, marked by a <a href="http://www.google.com/googlebooks/chrome/index.html">leaked web comic</a> and finally an <a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html">acknowledgment by Google</a>, <a href="http://www.google.com/chrome/intl/en/features.html">Google Chrome</a>, the much anticipated web browser, <a href="http://googleblog.blogspot.com/2008/09/google-chrome-now-live.html">is here</a>.</p>
<p>I encourage you to <a href="http://www.google.com/chrome/index.html">download it</a> and give it a try, as I did as soon as it came out.  Here are some of my initial impressions.</p>
<h3>Overview</h3>
<p>Google released a fairly long <a href="http://www.google.com/googlebooks/chrome/">web comic</a> that delves into quite a bit of detail about Chrome - it&#8217;s not your typical comic!  Touted as being built &#8220;from scratch&#8221;, Chrome uses the WebKit rendering engine, the same one that powers Safari and Konqueror.</p>
<p class="image"><a href="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-2.jpg"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-2-300x207.jpg" alt="" title="google-chrome-2" width="300" height="207" class="alignnone size-medium wp-image-420" /></a></p>
<p>The first thing you notice is how minimal the &#8220;Chrome&#8221; or UI of Chrome is.  If you&#8217;re used to a half-dozen toolbars, buttons and widgets all over the place, Chrome will seem like a greenfield to you.  By default, there is only a tab bar and then an address bar containing back, forward, a combined reload-stop button and the address bar.  There are also buttons for bookmarking a site and for page and browser settings.  The bookmarks bar is not displayed unless you specifically change that setting.</p>
<p>Keyboard shortcuts are also present so that you don&#8217;t have to click through context menus.  If you&#8217;re used to the keyboard shortcuts of Firefox and IE7 you&#8217;ll be pleased to know that most of them transfer over without change: Ctrl-T opens a new Tab, Ctrl-W/Ctrl-F4 closes a tab, Alt-D focuses the address bar and Ctrl-J opens Downloaded Files.</p>
<p>The address bar also functions as a search bar, and this combination just makes sense.  It&#8217;s something I&#8217;ve always been doing using <a href="http://lifehacker.com/software/geek-to-live/geek-to-live-fifteen-firefox-quick-searches-129658.php">Firefox Quick Searches</a></p>
<p>By default the home/start page is set to set to show an Opera-style &#8220;<a href="http://www.opera.com/support/tutorials/flash/speeddial/">Speed Dial</a>&#8221; page containing most recently-accessed pages/bookmarks.  You can also configure Chrome to restore the previous tabs/websites on startup, which is my personal preference ever since I started using Firefox.</p>
<h3>Features</h3>
<p>Chrome integrates Google Gears to speed up supporting web applications and is an obvious effort by Google to self-promote. This is substantial since the download link for Chrome is on the main Google search page - no small feat considering only the most popular/important services get that sort of attention and furthermore the link is positioned dead center beneath the search field.</p>
<p class="image">
<a href="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-3.jpg"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-3-300x210.jpg" alt="" title="google-chrome-3" width="300" height="210" class="alignnone size-medium wp-image-422" /></a><br />
The address/search bar
</p>
<p>Chrome allows for quasi-<a href="http://en.wikipedia.org/wiki/Site_Specific_Browser">Site-Specific Browsers</a> by use of &#8220;Application Shortcuts&#8221;, which can be set for any website but are meant to be used mainly with web applications.  These allow you to open the target <acronym class="uttInitialism" title="Uniform Resource Locator">URL</acronym> in a browser window that does not have the menu or address bars and essentially serves as a blank canvas upon which the web application&#8217;s own UI can be displayed.  </p>
<p>This is similar to other SSBs such as <a href="https://wiki.mozilla.org/Prism">Mozilla Prism</a> or <a href="http://fluidapp.com/">Fluid</a> for the Mac, as they aim to bridge the gap between desktop and web applications to make their integration more seamless.</p>
<p>However, like <a href="http://blogoscoped.com/archive/2008-09-01-n47.html">Google Blogoscoped points out</a>, using such non-browser interfaces may condition the user to be more lax when entering their credentials and makes phishing attempts more viable since no <acronym class="uttInitialism" title="Uniform Resource Locator">URL</acronym> is displayed.  This is curious since security, &#8220;sandboxing&#8221; and general safe browsing were so high on Chrome&#8217;s feature list - this feature seems to help undo some good user practices of always confirming the <acronym class="uttInitialism" title="Uniform Resource Locator">URL</acronym> before entering credentials. </p>
<p>There are also some nice little enhancements as well - the combined address bar/search bar is very much like Firefox 3&#8217;s &#8220;awesome bar&#8221;.  Chrome also allows you to dynamically resize any <code>textarea</code> element, without the site designer having to code this specifically in JavaScript or some other client-side technology.</p>
<h3>Performance</h3>
<p>Each tab/window is a separate process and thus will show up separately in Task Manager; Chrome also offers its own Task Manager but the memory usage reported here differs from that in the Windows Task Manager.  To get the full picture, you have to click on the &#8220;Stats for nerds&#8221; link, which takes you to <code>about:memory</code></p>
<p class="image">
<a href="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-4.jpg"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-4-300x192.jpg" alt="" title="google-chrome-4" width="300" height="192" class="alignnone size-medium wp-image-424" /></a>
</p>
<p>This page displays the full memory usage details, and also, surprisingly, displays memory usage for any other web browsers also currently running! (I have confirmed that it will display Firefox 2/3, IE7 and Opera 9)</p>
<p class="image">
<a href="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-5.jpg"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-5-300x208.jpg" alt="" title="google-chrome-5" width="300" height="208" class="alignnone size-medium wp-image-425" /></a>
</p>
<p>Much talk has been made of this feature; indeed while it does use more resources, it also prevents a single site from bringing down the entire browser as only that tab/window will be affected.  To test this out, just terminate one of the instances of chrome.exe and you will see that tab&#8217;s screen into a &#8220;sad tab of death&#8221; with an amusing message.</p>
<p class="image">
<a href="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-1.jpg"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-1.jpg" alt="" title="google-chrome-1" width="346" height="313" class="alignnone size-full wp-image-415" /></a>
</p>
<h3>JavaScript</h3>
<p>Though JavaScript falls under the category of `Performance` I felt it deserves its own section because of the importance of JavaScript in web applications.  Chrome uses the Google-developed V8 JavaScript engine, which has also been <a href="http://code.google.com/apis/v8/">released as open source</a>.</p>
<p>The <a href="http://code.google.com/apis/v8/design.html">main points</a> of V8 are outlined at the Google Code page for the project, and are quite interesting.  One of the main improvements in performance is the use of a Virtual Machine (VM) for processing JavaScript.</p>
<p>The V8 Virtual Machine is different from say, the JVM (Java Virtual Machine) in that it compiles JavaScript source <em>directly to machine code</em>; there is no intermediate byte-code representation used and hence no interpreter is needed for this.  This seems to indicate that JavaScript performance might be faster on Chrome since there&#8217;s no intermediary. Google provides some <a href="http://code.google.com/apis/v8/benchmarks.html">benchmarks</a> to confirm this.</p>
<p>From some informal/unscientific preliminary testing, the V8 JavaScript engine in Chrome <em>does</em> appear to be quite fast; loading the same Digg topic in Firefox took longer than it did in Chrome. (Roughly 14 secs vs. 8 seconds over a few trials - and Chrome did not have the benefit of AdBlock Plus) I&#8217;d be <em>very</em> interested to see how Chrome stacks up against Firefox 3.1, considering the rumoured <a href="http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html">performance boosts</a> coming with it.</p>
<p>If Chrome has anything going for it, it&#8217;s definitely the lightning fast JavaScript performance.  Coupled with the crash-proofing this makes it ideal for use in web applications.</p>
<h3>Development</h3>
<p>Chrome comes with a nice DOM inspector reminiscent of Firebug.  Using it is dead simple; you just right click and select &#8220;Inspect Element&#8221; and the inspection window will pop up with the element highlighted.  Here you can see the full DOM tree as well as the computed <acronym class="uttInitialism" title="Cascading Style Sheets">CSS</acronym> styles for the element.  </p>
<p class="image">
<a href="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-6.jpg"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/09/google-chrome-6-300x231.jpg" alt="" title="google-chrome-6" width="300" height="231" class="alignnone size-medium wp-image-427" /></a>
</p>
<p>There&#8217;s an included JavaScript console for executing code/commands/expressions on-the-fly and while there is a JavaScript debugger included, it seems at this time to be a command-line only tool, far less user-friendly than Firebug.</p>
<h3>Not ready for prime time yet?</h3>
<p>Of course, Chrome is marked as Beta by Google, something we&#8217;ve come to expect since Gmail has been in beta for longer than the company has been publicly traded.  Nonetheless, there are still some features that are sorely missed.</p>
<p>The one thing I absolutely love about Firefox is the vibrant developer community and subsequent widespread availability of quality, useful extensions.  This has produced such gems as the aforementioned <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> and <a href="http://adblockplus.org/en/">Adblock Plus</a>.  </p>
<p>For now, extensions/addons are not part of Chrome but may be added in a later version.  In the meantime I don&#8217;t think I&#8217;ll be even close to ready to switch, as I&#8217;m very stubborn.  I don&#8217;t use that many extensions but the few that I do are &#8220;must-haves&#8221; and I just can&#8217;t browse without them.  </p>
<p>Lastly, there are always privacy concerns, especially from a company as big an involved as Google.  Though you can turn off the sending of usage statistics, there will always be some with their tinfoil hats on.</p>
<h3>Conclusions</h3>
<p>All things considered, Chrome is a very good entry into the browser market.  While I don&#8217;t think it&#8217;s ready to take on Firefox or IE yet, it does provide competition.  So as long as Chrome continues to support standards (which I think it will, since it uses the WebKit renderer and Google has also been forthcoming with their <a href="http://www.google.com/chrome/intl/en/webmasters.html">support for web developers</a>), I won&#8217;t have a problem with it.  I won&#8217;t be switching over to it anytime soon, but at the very least it&#8217;ll be a useful development tool to verify/test my websites on to make sure they look proper in Safari/Konqueror/Chrome.</p>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/09/02/google-chrome-what-it-offers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Password salting and the modified Challenge-Response system</title>
		<link>http://unitstep.net/blog/2008/04/28/password-salting-and-the-modified-challenge-response-system/</link>
		<comments>http://unitstep.net/blog/2008/04/28/password-salting-and-the-modified-challenge-response-system/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 01:12:42 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[CHAP]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[chap-php]]></category>

		<category><![CDATA[login]]></category>

		<category><![CDATA[passwords]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[challenge-response]]></category>

		<category><![CDATA[salting]]></category>

		<guid isPermaLink="false">http://unitstep.net/?p=312</guid>
		<description><![CDATA[Since I released my demo/example modified Challenge-Response Ajax PHP Login System about a month ago (which was based on ideas from Paul Johnston), I&#8217;ve been receiving some questions about why salting was not incorporated into the system.  In particular, there was a discussion at a Dutch-language forums, which I somewhat understood after Google translation. [...]]]></description>
			<content:encoded><![CDATA[<p>Since I released my demo/example <a href="/blog/2008/03/29/a-challenge-response-ajax-php-login-system/">modified Challenge-Response Ajax <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> Login System</a> about a month ago (which was based on ideas from <a href="http://pajhome.org.uk/crypt/md5/auth.html">Paul Johnston</a>), I&#8217;ve been receiving some questions about why <a href="http://en.wikipedia.org/wiki/Salt_(cryptography)">salting</a> was not incorporated into the system.  In particular, there was a <a href="http://gathering.tweakers.net/forum/list_messages/1284731///salt">discussion</a> at a Dutch-language forums, which I somewhat understood after <a href="http://www.google.com/translate?u=http%3A%2F%2Fgathering.tweakers.net%2Fforum%2Flist_messages%2F1284731%2F%2F%2Fsalt&#038;langpair=nl%7Cen&#038;hl=en&#038;ie=UTF8">Google translation</a>. </p>
<p>Here, I&#8217;ll try to address some of these concerns and answer some questions.</p>
<h3>Salt of the earth</h3>
<p>To understand why salting is used, we must first understand exactly what it is.  Just like regular salt, in cryptography, salting is used to alter the &#8220;taste&#8221; or output of some process. </p>
<p>In the case of password storage, most people would realize that you should <em>never</em> store lists of users&#8217; passwords in plaintext, because if that data is ever compromised, attackers will gain access not only the compromised accounts but could potentially use the passwords to gain access to user accounts on other services/sites.  This is because people often reuse the same passwords across multiple account/services.</p>
<p>The easiest way to avoid this is to store the <em>hash</em> of the password.  A hash is a one-way function, that is, once you compute the hash of a value, you cannot obtain the original from just the hashed value.  Some typical hash functions are MD5 or the more secure family of SHA hash functions.</p>
<p>However, this still doesn&#8217;t fully conceal passwords.  If an attacker were to obtain the list of hashed passwords, they could try a dictionary-based attack to discover the original inputs.  This involves hashing common words to see if they hash to the correct value.  Since people often use common words or combinations of such, a dictionary-based attack has the advantage of having far fewer combinations that the attacker needs to try compared to a true brute-force attack.</p>
<h3>Adding variability</h3>
<p>This problem can be mitigated by salting, which basically amounts to combining the password with additional input before passing it into the hash function.  This alters the end output from the hash function so that a dictionary-based attack cannot be used, <strong>provided the salt is kept a secret</strong>.  A comparison example:</p>
<pre><code>Without salting:
hash(A) -&gt; B;

With salting:
hash (A + S) -&gt; C;</code></pre>
<p>In the first example, salting was not used before hashing.  Assuming the value &#8216;A&#8217; is a common word or phrase, an attacker can use a dictionary-attack to determine what the value of &#8216;A&#8217; was. (I.E. what value hashes to the value of &#8216;C&#8217;)</p>
<p>With salting, things become more difficult.  If the attacker does not know the value of the salt (S), they cannot use a dictionary-based attack because the actual input will not be a common word or phrase.  Instead, they must try all values in the dictionary <em>with</em> all possible values of the salt.  In fact, every bit of the added salt value doubles the number of computations in a dictionary-based attack.  The important point to retain here is the <strong>salt value must be kept a secret</strong> in order to obtain this benefit.</p>
<p>One other benefit of salting is to ensure that two accounts with the same password don&#8217;t produce the same hash.  This can be accomplished by making different accounts have different salts.  The obvious benefit of this is to decrease the information leakage from the hashes, as otherwise, equivalent hashes would infer equivalent passwords.</p>
<h3>Salting and the modified Challenge-Response System</h3>
<p>With the <a href="/blog/2008/03/29/a-challenge-response-ajax-php-login-system/">modified challenge-response system</a>, it isn&#8217;t clear to me how salting could be used to improve it.  Here&#8217;s a quick re-cap of how it works:</p>
<blockquote><p>
Signup:</p>
<p>1. Server sends random1<br />
2. Client sends hex_sha1(hex_hmac_sha1(password, random1))</p>
<p>Login:</p>
<p>1. Server sends random1 and random2<br />
2. Client sends hex_hmac_sha1(password, random1) and hex_sha1(hex_hmac_sha1(password, random2))
</p></blockquote>
<p>To login, the user must present two values: One to verify that they know the password, and the second value, which is used to set the response that must be computed for the <em>next login</em>.</p>
<p>Because the client must compute the next response value, it&#8217;s a bit tricky to implement salting in a way that&#8217;s beneficial. </p>
<p>One possible method would be to further hash the second value (<code>hex_sha1(hex_hmac_sha1(password, random1))</code>) with a <strong>server secret</strong> before storing it in the database.  This would complicate things should the database be compromised but not the server secret, since a dictionary attack would become much harder with the extra variability of a server secret.  In this case, the work flow would look something like this:</p>
<h4>Signup</h4>
<ol>
<li>Server sends random1</li>
<li>Client sends hex_sha1(hex_hmac_sha1(password, random1)) [<strong>Let's call this value `hashed_challenge_response` for brevity</strong>]</li>
<li>Server stores hex_hmac_sha1(server_secret, hashed_challenge_response)</li>
</ol>
<h4>Login:</h4>
<ol>
<li>Server sends random1 and random2</li>
<li>Client sends hex_hmac_sha1(password, random1) and hex_sha1(hex_hmac_sha1(password, random2))</li>
<li>Server computes hex_sha1(hex_hmac_sha1(password, random1)) [<strong>Call this `hashed_challenge_response_received`</strong>]</li>
<li>Server checks if hex_hmac_sha1(server_secret, hashed_challenge_response_received) equals the value previously stored.  If so, authentication was successful and a new challenge-response is stored based on the second value received.</li>
</ol>
<p>Note that this method <strong>would not improve the login security anymore</strong>, since an attacker who captured the intermediate traffic of a successful login could still conduct an offline dictionary attack, which this challenge-response system is unfortunately susceptible to.</p>
<p>However, the modified system does benefit from the use of the `random1` and `random2` challenge strings, which are stored alongside the response values.  Since these are random and different for each user (and for each subsequent login), accounts with the same password will not have the same hash-response.  This effectively gives the second lesser benefit of salting.</p>
<p>The modified challenge-response system also suffers from the inability of the server to enforce strong passwords.  Because the initial value sent during registration is a hashed value of the password and a random value, the server cannot be aware of any properties of the password such as its length or composition.  The only aspect that could be enforced server-side would be to make sure the password was not blank!  My suggestion is to (attempt to) enforce password complexity using JavaScript on the client side.  Such rules can obviously be circumvented but are better than nothing.</p>
<h3>Conclusion</h3>
<p>Hopefully I&#8217;ve shed some light on the topic of salting in relation to the modified challenge-response Ajax <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> login system.  I&#8217;m no security expert, so you should not take my advise as scripture.  Please don&#8217;t hesitate to give me your comments or feedback!</p>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/04/28/password-salting-and-the-modified-challenge-response-system/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Challenge-Response Ajax PHP Login System</title>
		<link>http://unitstep.net/blog/2008/03/29/a-challenge-response-ajax-php-login-system/</link>
		<comments>http://unitstep.net/blog/2008/03/29/a-challenge-response-ajax-php-login-system/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 01:53:11 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[CHAP]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[chap-php]]></category>

		<category><![CDATA[login]]></category>

		<category><![CDATA[passwords]]></category>

		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2008/03/29/a-challenge-response-ajax-php-login-system/</guid>
		<description><![CDATA[A while ago, (okay, a long while ago) I wrote about a way to improve the security of login/authentication with web applications.  The process involved using challenge-response during authentication to prevent passwords from being transmitted in plaintext.  The idea was not mine, but instead the work of a smart fellow named Paul Johnston. [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, (okay, a <em>long</em> while ago) I wrote about <a href="/blog/2006/09/19/using-a-chap-login-system-to-improve-security/">a way to improve the security</a> of login/authentication with web applications.  The process involved using challenge-response during authentication to prevent passwords from being transmitted in plaintext.  The <a href="http://pajhome.org.uk/crypt/md5/auth.html">idea was not mine</a>, but instead the work of a smart fellow named <a href="http://pajhome.org.uk/">Paul Johnston</a>.   At the time, I &#8220;hoped to present an actual implementation&#8221; sometime in the future, but never got around to it.  I finally had some time and decided to put together a working example using <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> and JavaScript. </p>
<h3>Download the source</h3>
<p>Please feel free to download and try out the first public release of the CHAP-PHP login system.  The zip file has the full source and provides an example how to implement the system both on the client and server side.</p>
<div class="download">
<a class="icon" href='http://unitstep.net/wordpress/wp-content/uploads/2008/03/chap-php-051.zip' title='CHAP-PHP-0.5.1'>Download CHAP-PHP-0.5.1</a>
</div>
<p>The same demo available in the zip file is also <a href="/projects/CHAP-PHP/src/demo/index.php">available here</a>.</p>
<h3>Improving authentication security with Challenge-Response</h3>
<p>Challenge-Response is the basis for many authentication systems.  In such a situation, a server may have to authenticate a user by verifying their credentials, usually in the form of a password.  However, transmitting plaintext passwords over connections that are not secure can lead to compromises.  In such a situation, <dfn>challenge-response</dfn> may be used.  This usually involves the server sending a <strong>random challenge</strong> string to the client, which must then produce an appropriate <strong>response</strong> that can only be computed using the challenge and the password.  This response is then sent to the server, which can then verify if the right password was used to generate it.  The response is usually computed by hashing a value that depends on the challenge and the password, thus it is not possible to obtain the password from the response, which might have been sniffed on an insecure connection. </p>
<p>However, such a traditional challenge-response has the downside that the plaintext password (or a password-equivalent) must be known to the server at some point.  Paul Johnston came up with <a href="http://pajhome.org.uk/crypt/md5/auth.html">an idea for an alternative system</a> a while ago that overcomes these shortcomings.  (Though it is not free from weaknesses itself)  It is this &#8220;Alternative System&#8221; that the above release is based upon.  Here is a quick explanation of the system, adapted from Johnston&#8217;s site:</p>
<blockquote cite="http://pajhome.org.uk/crypt/md5/auth.html"><p>
Signup:</p>
<p>   1. Server sends random1<br />
   2. Client sends hex_sha1(hex_hmac_sha1(password, random1))</p>
<p>Login:</p>
<p>   1. Server sends random1 and random2<br />
   2. Client sends hex_hmac_sha1(password, random1) and hex_sha1(hex_hmac_sha1(password, random2))
</p></blockquote>
<p>During registration, the value sent by the client is stored.  During login, the user must present a value <em>that when hashed</em> produces the value provided at registration.  Because of the non-reversibility property of hashes, knowing the value passed during registration does not allow an attacker to login.  The only way to produce the valid response is to know the actual plaintext password, which is never transmitted or known by the server.  In this system, challenges are linked to a user and must be stored, since it must be known what challenge was used to produce the response.</p>
<p>The second random challenge (random2) and the second value sent by the client during login are used to prevent replay attacks.  Upon successful login, the second value provided by the client becomes the next response, equivalent to the value first provided during registration.  Thus, for the next login, the value that is sent must hash to equal this value.  This also means that the challenges are updated/changed each time a login is successful.  This has the unfortunate downside of revealing when a user has logged in, since the challenge presented at login will be different.  (Challenges must be publicly available)</p>
<p>For a more thorough explanation, I suggest that you <a href="http://pajhome.org.uk/crypt/md5/auth.html">read Johnston&#8217;s article on the subject</a>.</p>
<h3>Getting it to work</h3>
<p>Understanding the process above leads to the conclusion that user-login is now a two-stage process.  Since the challenges are tied to a user, the username must first be known to the server in order to retrieve the challenge for that user.  The client can then use the challenge to produce the response to send to the server for authentication.</p>
<p>Having a two-stage login form would be very unfriendly to users.  Thus, the main challenge is to make it <em>appear</em> as if nothing out of the ordinary is happening.  This is where Ajax comes into play.  When the form is submitted, the event is prevented from occurring normally.  Instead, the username is first retrieved from the form and sent to the server via an Ajax call in order to retrieve the associated challenge.  Once the challenge is received, the appropriate responses are computed, inserted into the form and then the form is submitted.</p>
<p>The current system also works in the case that JavaScript is not enabled/available on the client side.  In this case, challenge-response will not be available, since JavaScript is used to compute the responses.  The server-side <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> scripts infer that JavaScript <em>was not</em> enabled on the client-side if proper challenge-responses are not received, and thus treat the password as plaintext.  In this case, passwords are transmitted in plaintext.  With this code, you have the choice of allowing this &#8220;insecure&#8221; login to proceed or not.</p>
<p>Note that the CHAP-PHP is more of a module than a full-fledged system, since it&#8217;s not intended to be used on its own but instead as part of some application.  It might be a bit confusing if you&#8217;re a non-developer, but I&#8217;ve tried to make it as straightforward and simple as possible so that it will be easy to integrate with existing code bases/frameworks/sites. </p>
<p>Please don&#8217;t hesitate to <a href="/contact">contact me</a> with your questions, comments or suggestions.</p>
<h3>Disclaimer and warning</h3>
<p>You should not use this as the basis for authentication for sensitive data/websites.  I am not a security expert.  At this point, this is more of a proof-of-concept then something concrete.  It is intended to be the starting point for perhaps something more secure and to show that there are alternatives for more secure authentication when SSL is not available.</p>
<h4>Revision History</h4>
<ul class="note less">
<li>0.5 - First Public Release - 2008-03-29</li>
<li>0.5.1 - Fixed file-based storage to be more robust - 2008-03-30</li>
</ul>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/03/29/a-challenge-response-ajax-php-login-system/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The dinosaur that is web-standards</title>
		<link>http://unitstep.net/blog/2006/07/21/the-dinosaur-that-is-web-standards/</link>
		<comments>http://unitstep.net/blog/2006/07/21/the-dinosaur-that-is-web-standards/#comments</comments>
		<pubDate>Sat, 22 Jul 2006 01:11:20 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[XHTML]]></category>

		<category><![CDATA[standards]]></category>

		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2006/07/21/the-dinosaur-that-is-web-standards/</guid>
		<description><![CDATA[If you&#8217;re into web design or development at all, you&#8217;ve probably run into the term &#8220;web standards&#8221; and the W3C, the body whose job it is to organize and draft these specifications.  The truth is, web standards are still by-and-large, just suggestions on how to do certain things, and are as of yet, not [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re into web design or development at all, you&#8217;ve probably run into the term &#8220;web standards&#8221; and the <a href="http://www.w3.org/"><a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a></a>, the body whose job it is to organize and draft these specifications.  The truth is, web standards are still by-and-large, just <em>suggestions</em> on how to do certain things, and are as of yet, <a href="http://webstandards.org/action/acid2/">not completely</a> and <a href="http://quirksmode.org/viewport/experiments.html">widely followed</a>.  This is more an artifact of the way the web and browsers have evolved, but sometimes, you gotta wonder what the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> is thinking.</p>
<h3>Credit where credit&#8217;s due</h3>
<p>To its credit, the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> has done a lot of great work.  Headed by <a href="http://en.wikipedia.org/wiki/Tim_Berners-Lee">Tim Berners-Lee</a>, the creator of the web, it&#8217;s done good work in standardizing the data formats that encompass the Internet.  Without some sort of guiding body, the web would certainly be a lot less usable than it is today.  They&#8217;ve also made decent progress in updating standards as technology/trends change, and haven&#8217;t left out accessibility for the sensory-impaired, something that should be lauded. </p>
<p>Certainly attempting to standardize something as widespread as <acronym class="uttInitialism" title="HyperText Markup Language">HTML</acronym>/XHTML across something as big as the Internet is no easy task; working with the companies making the browsers must have been a hard task.  After all, companies want to distinguish their product from the others; if they all support the same &#8220;standards&#8221;, what would make one better than the other?  Perhaps this was the thinking during the <a href="http://www.evolt.org/article/Browser_Wars_II_The_Saga_Continues/25/60181/">browser wars</a> when companies started introducing support for <a href="http://www.scit.wlv.ac.uk/encyc/blink.html">non-standard elements</a> in order to make their browsers more appealing to users and web designers.</p>
<p>Part of this is the reason why some pages <em>still</em> render differently in IE than in Firefox or Opera.  But these days, it&#8217;s mainly IE6 that&#8217;s the odd one out, with Firefox and Opera (among others) either supporting the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> standards better or completely.  </p>
<h3>Competition breeds innovation</h3>
<p>While this effort by browser makers to independently make their <em>own</em> specifications often (especially in the past) resulted in broken web pages that only worked in certain browsers, once in a while, it provided browser programmers the ability to introduce a new feature that was actually of use, besides something like the <code>marquee</code> tag.  </p>
<p>What I&#8217;m talking about is the <a href="http://developer.apple.com/internet/webcontent/xmlhttpreq.html"><code>XMLHttpRequest</code> object</a>, the basis for Ajax and hence a lot of the websites or web applications that you may use on a regular basis.  If you&#8217;ve used Gmail, if you Digg, or if you use the new Yahoo!, you&#8217;ve benefited from Ajax and hence this non-standard web technology.  While the original concept used an ActiveX object, its value was apparently seen by other browser makers, as Mozilla introduced support for their browsers back in 2002, with other browser makers following suit. (Though interestingly, Opera only gained support recently - perhaps this is related to the fact that they follow the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> specifications closer than either Mozilla or IE)</p>
<p>Gmail&#8217;s been around for over two years, and other Ajax websites or web applications have also been in use for over a year.  However, the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> published their first <a href="http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/">working draft</a> only back in April of this year, which is attempting to standardize a method that is already in wide use.  Admittedly, it&#8217;s a valiant effort - currently, implementations differ across browsers (mostly IE in one corner, the rest-of-the-world in the other), so getting something down that everyone can agree upon is good.</p>
<h3>Too little, too late?</h3>
<p>However, it strikes me that it took them this long to develop even a draft.  And, with many JavaScript frameworks out there that already abstract the <code>XMLHttpRequest</code> object in such a way that you don&#8217;t have to worry about incompatibilities, isn&#8217;t some of this work perhaps done in vain? </p>
<p>Thankfully, there&#8217;s been some action to counter this slow reaction time.  As with most standards bodies, slowness to adapt is a key problem.  In fact, it&#8217;s why the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> <a href="http://en.wikipedia.org/wiki/ISO#Problems_during_the_1990s">was developed</a> in the first place, (ironically, it seems), in order to address the shortcomings of the IETF at the time.  However, this time, the group that&#8217;s taken the helm is a not a vendor-neutral group, but instead one comprised solely of the companies and people who make browsers - the <a href="http://www.whatwg.org/"><abbr title="Web Hypertext Application Technology Wokring Group">WHATWG</abbr></a>.</p>
<p>The WHATWG is not meant to be competition for the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a>; they aren&#8217;t meant to replace them.  Instead, they hope that by fostering a good relationship between browser makers, good standards can be developed at a fast rate on par with development in the real world.  These drafts will then be submitted to the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a>, thus taking a lot of the workload off from the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a>.  </p>
<h3><a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a>-what?</h3>
<p>The <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a>, which one shouldn&#8217;t remember to commend for their previous efforts, still sometimes comes up with specifications that, while looking good on paper, just don&#8217;t seem like they&#8217;ll translate into something real and usable.</p>
<p>Take <a href="http://www.w3.org/TR/xhtml2/"><a href="http://www.w3.org/MarkUp/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible HyperText Markup Language - HTML reformulated as XML">XHTML</acronym></a> 2.0</a>, for example.  With a name like that, you&#8217;d expect it to be a successor to, and be backwards compatible, with the current version of <a href="http://www.w3.org/MarkUp/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible HyperText Markup Language - HTML reformulated as XML">XHTML</acronym></a>.  <a href="http://www-128.ibm.com/developerworks/web/library/wa-xhtml/">Not so</a>.  In favour of a stricter definition of a document, <a href="http://diveintomark.org/archives/2003/01/13/semantic_obsolescence">backwards compatibility</a> <a href="http://www.zeldman.com/daily/0103b.shtml#skyfall">will not</a> be included.  All the talk of making your <acronym class="uttInitialism" title="HyperText Markup Language">HTML</acronym>/XHTML documents validate in order to preserve backwards compatibility and to ensure forwards compatibility seems to have gone out the proverbial window.  For those who were skeptical on the usefulness of web standards, <a href="http://www.w3.org/MarkUp/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible HyperText Markup Language - HTML reformulated as XML">XHTML</acronym></a> 2.0 must have seemed like the <a href="http://en.wikipedia.org/wiki/Straw_man">straw man</a> they were looking for - it really underlined the separation from reality that the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> seemed to taken. (Even the current versions of <a href="http://www.w3.org/MarkUp/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible HyperText Markup Language - HTML reformulated as XML">XHTML</acronym></a> <a href="http://diveintomark.org/archives/2003/08/29/semantics">have problems</a> that need to be addressed in the context of delivery over the web)</p>
<h3>Maybe it&#8217;s time</h3>
<p>So perhaps what we needed was the WHATWG - something to keep the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> in line with reality, and to allow the speedy standardization of things that are still in the process of developing.  So far, they&#8217;ve produced a few specifications, which <a href="http://erik.eae.net/archives/2005/11/16/00.02.49/">have had an impact</a> on the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a>.  Their continued interest in <code>text/html</code> as a viable MIME type is rare; too often, people get caught up in current trends, such as the love-affair that everyone seemed to be having with <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a> a while ago.  While certain <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a> formats are good, they do have <a href="http://annevankesteren.nl/2005/04/html5">issues</a> when there&#8217;s a chance the <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a> will be hand-coded and not checked for well-formedness errors.  In this case, traditional <acronym class="uttInitialism" title="HyperText Markup Language">HTML</acronym> in the <code>text/html</code> MIME type is probably better.  </p>
<p>In conclusion, hopefully the state of web standards will be better in a few years or so.  The <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> has a lot of good to offer, especially when it comes to <a href="http://www.w3.org/WAI/">accessibility</a> and so forth.  Combined with the helping hand of the WHATWG, things should progress for the better.</p>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2006/07/21/the-dinosaur-that-is-web-standards/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ajax References</title>
		<link>http://unitstep.net/blog/2006/06/12/ajax-references/</link>
		<comments>http://unitstep.net/blog/2006/06/12/ajax-references/#comments</comments>
		<pubDate>Tue, 13 Jun 2006 03:47:58 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://www.unitstep.net/blog/2006/06/12/ajax-references/</guid>
		<description><![CDATA[From Ajaxian, I discovered a nice resource from Max Kiesler, entitled 50 AJAX Reference Websites From Around the World.  This would seem to be a good list for budding Ajax developers, (pretty much everyone out there, since AJAX is relatively new), it&#8217;s also a good learning tool for people like me, who are looking [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.ajaxian.com">Ajaxian</a>, I discovered a nice resource from Max Kiesler, entitled <a href="http://www.maxkiesler.com/index.php/weblog/comments/50_ajax_reference_websites_from_around_the_world/">50 <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> Reference Websites From Around the World</a>.  This would seem to be a good list for budding Ajax developers, (pretty much everyone out there, since <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> is relatively new), it&#8217;s also a good learning tool for people like me, who are looking to get in to this sort of stuff.</p>
<p>In my spare time, I&#8217;ve been looking and collecting Ajax resources, but this list should hopefully accomplish a lot of that work for me.</p>
<blockquote><p>Since the coining of the the term <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> over a year ago hundreds if not thousands of websites, blogs and forums have been buzzing with posts on the subject. As I&#8217;ve found this can sometimes leave search engines bewildered as to where the current and relevant information really exists. So I thought I would put together this list of what I think are some of the most relevant <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> sites are worldwide.</p></blockquote>
<p>Do check it out if you&#8217;re at all interested in web development, it looks to be a gold mine of information.</p>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2006/06/12/ajax-references/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AJAX and Web 2.0</title>
		<link>http://unitstep.net/blog/2006/05/16/ajax-and-web-20/</link>
		<comments>http://unitstep.net/blog/2006/05/16/ajax-and-web-20/#comments</comments>
		<pubDate>Wed, 17 May 2006 02:58:18 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://www.unitstep.net/blog/2006/05/16/ajax-and-web-20/</guid>
		<description><![CDATA[If you've been using the Internet for a while, you'll have noticed a slight change in the way certain online services have provided content, in the past 1-2 years. A sort of mini-revolution is going on, leading to the term "Web 2.0" to describe this new breed of web-based services. A lot of exciting things are promised, and some have been demonstrated and are in semi-wide use.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been using the Internet for a while, you&#8217;ll have noticed a slight change in the way certain online services have provided content, in the past 1-2 years.  A sort of mini-revolution is going on, leading to the term &#8220;<a href="http://en.wikipedia.org/wiki/Web_2.0">Web 2.0</a>&#8221; to describe this new breed of web-based services.  A lot of exciting things are promised, and some have been demonstrated and are in semi-wide use.</p>
<p>Perhaps the best example is <a href="http://www.gmail.com">Gmail</a>.  While most of the buzz surrounding it during its launch was the then-unprecendented storage allowances, the service also implements <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29"><abbr title="Asynchronous Javascript and XML"><acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym></abbr></a> to improve the quality of the application and make it seem more like a desktop application than a web service.  For example, when you start typing in someone&#8217;s e-mail address in the &#8220;To:&#8221; field while composing a message, you&#8217;ll find that Gmail pops up a list of possible matches as you type, allowing you to quickly select the intended recipient - this is <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> at work, and basically it allows your web browser to communicate with the web server to update and provide information to parts of the web page without having to reload the entire site, thus making it seem more like a regular program.</p>
<p>The power of <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> was quickly apparent to many web developers and since then, many new and interesting applications based on its principles have been made.  Indeed, <a href="http://www.wordpress.org">WordPress</a>, what I use to run this site, also nicely implements <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> in its admin pages.  It seems likely that <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> will continue to permeate more and more websites.</p>
<p>With this proliferation should come caution.  The potential for problems is high, not necessarily because of <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> itself but because of the ways it can be implemented.  First and foremost, <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> should not be put into a website just for the sake of having <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> there - sometimes simplier is better, and if it isn&#8217;t needed maybe it shouldn&#8217;t be there.  Additionally, <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> should probably not be required for the website to work - thankfully, major services like del.icio.us and GMail have followed this unwritten law; it&#8217;s not unlike the unwritten mantra for plain old Javascript and websites.</p>
<p>Secondly, security is an issue, as <a href="http://www.it-observer.com/articles/1062/ajax_security/">outlined in this article</a>.   In it, Stewart Twynham remarks that because <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> is a new and developing technology, clear design patterns do not exist and thus this increasing the chance for poor coding that inherently leads to security and other problems.  Additionally, the increased amount of scripts and code and the way they&#8217;re laid out can lead to complexity issues - thankfully, there is help available now.  With the recent release of <a href="http://developer.yahoo.com/yui/">Yahoo! UI Library</a> and the <a href="http://googleblog.blogspot.com/2006/05/making-ajax-development-easier.html">Google Web Toolkit</a>, <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> development can be greatly simplified - it should be noted there are many community-driven <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> and general JavaScript frameworks and libraries also available that do the same thing, and sites dedicated to <a href="http://ajaxpatterns.org/">making <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> coding more efficient</a> exist.  With the popularity of <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym>, such developments were inevitable; however, since <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> is still relatively new and is still in the process of growing and <a href="http://www.w3.org/TR/XMLHttpRequest/">being standardized by the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a></a>, a cautious approach is still needed here.  (The slow response of the <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> to <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> and other technologies is however, another topic.)</p>
<p>Lastly, user interface requirements must be considered - though <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> is mainly used to improve interactivity and thus user experience, there are ways that it <a href="http://www.sourcelabs.com/ajb/archives/2005/05/ajax_mistakes.html">can be detrimental</a> to user experience.  With <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym>, there is increased potential for making a web application that doesn&#8217;t make its state known to the user, causing confusion and annoyance, and worse still, possible data loss.  Your best bet here is to have someone experienced with UI design take a look at what <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> is doing to the interface.</p>
<p>So in short, <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> is a promising technology, and if you haven&#8217;t heard a lot about it already, you will be soon as it slowly becomes more and more prevalent on the Internet.  Let&#8217;s hope web developers implementing it follow good coding practices.</p>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2006/05/16/ajax-and-web-20/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
