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

<channel>
	<title>Usable Development and Design</title>
	<atom:link href="http://www.nophadon.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nophadon.com</link>
	<description>Personal website of Kai Sounthala, web and mobile software architect, rambling about any RIA, web, mobile, user interface or user experience related.</description>
	<lastBuildDate>Thu, 20 Aug 2009 15:14:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Disadvantages of unobtrusive Javascript?</title>
		<link>http://www.nophadon.com/notebook/javascript-good-to-knows/</link>
		<comments>http://www.nophadon.com/notebook/javascript-good-to-knows/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 01:38:34 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2009/06/17/javascript-good-to-knows/</guid>
		<description><![CDATA[What are the disadvantages of unobtrusive Javascript?
There are so many articles written about why you should use unobtrusive javascript but when I was asked why one shouldn&#8217;t or better, what are the disadvantages of using unobtrusive javascript I really was stumped.
So the one answer? Just imagine if you were given front-end code, written beautifully with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What are the disadvantages of unobtrusive Javascript?</strong></p>
<p>There are so many articles written about <a href="http://labs.adobe.com/technologies/spry/articles/best_practices/separating_behavior.html">why you should use unobtrusive javascript</a> but when I was asked why one shouldn&#8217;t or better, what are the disadvantages of using unobtrusive javascript I really was stumped.</p>
<p>So the one answer? Just imagine if you were given front-end code, written beautifully with CSS, XHTML, Unobtrusive javascript, no tables, no frames with rich interaction. Now you are trying to debug or enhance some piece of functionality and all you see are classes and id&#8217;s. Well, without any documentation the only thing you could really do is search and hope to find a matching value to the id. Right, that doesn&#8217;t sound like fun to me either.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/javascript-good-to-knows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooth Image Resizing</title>
		<link>http://www.nophadon.com/notebook/smooth-image-resizing/</link>
		<comments>http://www.nophadon.com/notebook/smooth-image-resizing/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 17:57:17 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2009/04/21/smooth-image-resizing/</guid>
		<description><![CDATA[I recently stumbled upon a great solution to a problem that I&#8217;ve seen for years, smooth image resizing in a web-browser or fluid images. The article was written by Ethan Marcotte (Unstoppablerobotninja.com). Most modern browsers handle resizing of images very well, including FF3, Chrome, Safari and IE8. Not surprising the browsers that don&#8217;t do a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently stumbled upon a great solution to a problem that I&#8217;ve seen for years, smooth image resizing in a web-browser or fluid images. The article was written by Ethan Marcotte (<a href="http://unstoppablerobotninja.com/entry/fluid-images/">Unstoppablerobotninja.com</a>). Most modern browsers handle resizing of images very well, including FF3, Chrome, Safari and IE8. Not surprising the browsers that don&#8217;t do a good job include IE 7 and below. Via some JavaScript, CSS and a special Microsoft CSS property filter (AlphaImageLoader), resizing looks good!</p>
<p>Try opening the links below in IE6 or IE7. The first link is the original and the second includes fixed image scaling.</p>
<p><a href="http://unstoppablerobotninja.com/demos/resize/" target="_blank">Before Fix</a>  &#8230;. <a href="http://unstoppablerobotninja.com/demos/resize/fix/" target="_blank">After Fix</a></p>
<p>Here is a before and after zoomed in image of the fix.</p>
<p><img src="http://www.nophadon.com/graphics/fluid-image.jpg" /> <img src="http://www.nophadon.com/graphics/fluid-image-fixed.jpg" />
</p>
<p>I will continue testing this technique with more images and text of different contrasts and colors but as of now, the technique looks very promising.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/smooth-image-resizing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drag-and-drop table rows with jQuery</title>
		<link>http://www.nophadon.com/notebook/drag-and-drop-table-rows-with-jquery/</link>
		<comments>http://www.nophadon.com/notebook/drag-and-drop-table-rows-with-jquery/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 14:39:34 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2008/08/29/drag-and-drop-table-rows-with-jquery/</guid>
		<description><![CDATA[There was a project I was working on where I needed to find a way to drag-and-drop rows of a table, basically resort the table rows. Now there were plenty of scripts for doing this within lists, but not so many for actual tables. The final solution I used was from an unexpected source, Isocra [...]]]></description>
			<content:encoded><![CDATA[<p>There was a project I was working on where I needed to find a way to drag-and-drop rows of a table, basically resort the table rows. Now there were plenty of scripts for doing this within lists, but not so many for actual tables. The final solution I used was from an unexpected source, <a href="http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/">Isocra Consulting</a>, who setup a jQuery plugin for this functionality. The library, <a href="http://www.isocra.com/articles/jquery.tablednd_0_5.js.zip">TableDnD plugin</a>, is fairly small, about 15K and was very easy to setup. The plugin included everything I needed without being too feature rich:</p>
<dl>
<dt>onDragStyle</dt>
<dd>This is the style that is assigned to the row during drag. There are limitations to the styles that can be<br />
		associated with a row (such as you can’t assign a border—well you can, but it won’t be<br />
		displayed). (So instead consider using <code>onDragClass</code>.) The CSS style to apply is specified as<br />
		a map (as used in the jQuery <code>css(...)</code> function).</dd>
<dt>onDropStyle</dt>
<dd>This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations<br />
		to what you can do. Also this replaces the original style, so again consider using onDragClass which<br />
		is simply added and then removed on drop.</dd>
<dt>onDragClass</dt>
<dd>This class is added for the duration of the drag and then removed when the row is dropped. It is more<br />
		flexible than using onDragStyle since it can be inherited by the row cells and other content. The default<br />
		is class is <code>tDnD_whileDrag</code>. So to use the default, simply customise this CSS class in your<br />
		stylesheet.</dd>
<dt>onDrop</dt>
<dd>Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table<br />
	    and the row that was dropped. You can work out the new order of the rows by using<br />
	    <code>table.tBodies[0].rows</code>.</dd>
<dt>onDragStart</dt>
<dd>Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the<br />
		table and the row which the user has started to drag.</dd>
<dt>scrollAmount</dt>
<dd>This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the<br />
		window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,<br />
		FF3 beta)</dd>
</dl>
<p>Below are screenshots of the drag-and-drop before and after. As you can see I applied a yellow style to the row I am actively dragging and when dropped, the row flashes green for a second and the zebra-stripping auto-corrects itself.</p>
<p><img src="/graphics/drag-drop-0.gif" />   <img src="/graphics/drag-drop-1.gif" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/drag-and-drop-table-rows-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Camp 2008</title>
		<link>http://www.nophadon.com/events/jquery-camp-2008/</link>
		<comments>http://www.nophadon.com/events/jquery-camp-2008/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 19:27:24 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2008/08/28/jquery-camp-2008/</guid>
		<description><![CDATA[*Update* &#8211; 8/28/2008 : The registration is now closed, but fortunately I made it into the pool of 150 people already attending the event! jQuery Camp 2008 here I come&#8230;

Learning jQuery
Author: Karl Swedberg
The jQuery Team is pleased to announce the second annual jQuery Camp! jQuery Camp 2008 will be held on Sunday, Sept. 28, the [...]]]></description>
			<content:encoded><![CDATA[<p><span class="important">*Update* &#8211; 8/28/2008 :</span> The registration is now closed, but fortunately I made it into the pool of 150 people already attending the event! jQuery Camp 2008 here I come&#8230;</p>
<div style="width:130px; float:left; margin-right:25px;"><a href="http://www.amazon.com/gp/product/1847192505?ie=UTF8&#038;tag=organi-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1847192505"><img border="0" src="http://ecx.images-amazon.com/images/I/51icudX%2BtaL._SL160_.jpg" /><img height="1" width="1" border="0" style="border: medium none  ! important; margin: 0px ! important" src="http://www.assoc-amazon.com/e/ir?t=organi-20&#038;l=as2&#038;o=1&#038;a=1847192505" /><br />
Learning jQuery</a><br />
Author: Karl Swedberg</div>
<p>The jQuery Team is pleased to announce the second annual jQuery Camp! jQuery Camp 2008 will be held on Sunday, Sept. 28, the day before The Ajax Experience, in Boston, MA (location TBA).</p>
<p>Last year, over 100 jQuery developers gathered for a full day of jQuery sessions, which included talks from such big names as jQuery creator John Resig and other core team members, as well as talks from expert users exploring new and exciting jQuery projects. It brought together the largest group of jQuery Core Team members ever assembled, and gave users the opportunity to pick their brains and pitch new ideas.</p>
<p>The event was a *clear* success, and this year’s camp promises to be even better.</p>
<p>jQuery Camp 2008 will offer two tracks, providing both introductory and advanced sessions, covering a variety of topics. Ajax development, mashups, security and the recently released jQuery UI component and effects library are just some of the topics already lined up.</p>
<p><a href="http://jquery.com/blog/2008/06/26/jquery-camp-2008-announced/">Original Announcement</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/events/jquery-camp-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create style switcher with jQuery and PHP</title>
		<link>http://www.nophadon.com/notebook/create-style-switcher-with-jquery-and-php/</link>
		<comments>http://www.nophadon.com/notebook/create-style-switcher-with-jquery-and-php/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 18:15:06 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2008/08/28/create-style-switcher-with-jquery-and-php/</guid>
		<description><![CDATA[This tutorial shows you how to create a style switcher using jQuery and PHP. The end result will be an unobtrusive &#038; entirely degradable dynamic style switcher which will be quick and easy to implement. 
http://nettuts.com/javascript-ajax/jquery-style-switcher/
by James Padolsey
If the user has Javascript enabled, a very slick fade-in and fade-out affect is shown with a loading [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial shows you how to create a style switcher using jQuery and PHP. The end result will be an unobtrusive &#038; entirely degradable dynamic style switcher which will be quick and easy to implement. </p>
<p><a href="http://nettuts.com/javascript-ajax/jquery-style-switcher/">http://nettuts.com/javascript-ajax/jquery-style-switcher/</a><br />
by James Padolsey</p>
<p>If the user has Javascript enabled, a very slick fade-in and fade-out affect is shown with a loading icon. If Javascript is disabled, the style-sheet switches and the same end result is seen.
</p>
<p><img src="http://www.nophadon.com/wp-content/uploads/2008/08/style-switcher.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/create-style-switcher-with-jquery-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MBTA.com a multi-award winner!</title>
		<link>http://www.nophadon.com/notebook/mbtacom-a-webby-award-winner/</link>
		<comments>http://www.nophadon.com/notebook/mbtacom-a-webby-award-winner/#comments</comments>
		<pubDate>Tue, 01 May 2007 16:21:53 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2007/05/01/mbtacom-a-webby-award-winner/</guid>
		<description><![CDATA[After months of exhaustive days, nights and weekends spent re-designing and re-developing the updated MBTA.com website, the work put in by myself and the rest of the team at RDVO has seen the ultimate fruition. The site was named the 2007 Webby Award Winner for best Government website and the 2007 MITX award winner for [...]]]></description>
			<content:encoded><![CDATA[<p>After months of exhaustive days, nights and weekends spent re-designing and re-developing the updated <a href="http://www.mbta.com/">MBTA.com</a> website, the work put in by myself and the rest of the team at <a href="http://www.rdvo.com/">RDVO</a> has seen the ultimate fruition. The site was named the <a href="http://www.webbyawards.com/">2007 Webby Award Winner</a> for best <a href="http://www.webbyawards.com/webbys/current.php?media_id=96&#038;season=11#webby_entry_government">Government website</a> and the <a href="http://www.mitxawards.org/winners_circle/2007_winners.aspx">2007 MITX award winner for government sites</a>.</p>
<p>This is huge news for everyone who was involved in this project. This was a daunting undertaking that had it’s ups and and downs, exhaustion and frustration, but ultimately the satisfaction in achieving the ambitious goal we set out to achieve &#8211; building the best damn transport out there!</p>
<p>Congratulations to the RDVO team that worked on the MBTA project:</p>
<p>Dana Giuliana, Project Director<br />
Kai N. Sounthala, Technical Lead<br />
Charles Crawford/Marcos Elugardo, Development Team<br />
George Kalos/Ari Kalogeropoulos/Brian Fleming, Production Team<br />
Michael Demopoulos, Creative Director<br />
Sabih Mir/Corey Machanic, Graphic/UI Designers<br />
Jared Kelleher, Writer</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/mbtacom-a-webby-award-winner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NDOC for .NET 2.0 Documentation</title>
		<link>http://www.nophadon.com/notebook/ndoc-for-net-20/</link>
		<comments>http://www.nophadon.com/notebook/ndoc-for-net-20/#comments</comments>
		<pubDate>Wed, 29 Nov 2006 15:24:54 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2006/11/29/ndoc-for-net-20/</guid>
		<description><![CDATA[If you&#8217;re looking for clean MSDN-like documentation tool for .NET, NDOC is way to go. Unfortunately development for the tool stopped in Feb 2005. There are a few commercial products as well, but I really was not impressed after playing with a few trials. 
The latest release of NDOC version 1.3.1 is only compatible up [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking for clean MSDN-like documentation tool for .NET, NDOC is way to go. Unfortunately development for the tool stopped in Feb 2005. There are a few commercial products as well, but I really was not impressed after playing with a few trials. </p>
<p>The latest release of NDOC version 1.3.1 is only compatible up to .NET 1.1. Microsoft appears to have a new tool for .NET documentation called <a href="http://blogs.msdn.com/sandcastle/">Sandcastle</a> but after spending an hour of trying to get it setup, time to move on.</p>
<p>I finally found someone who wrote a version compatible with .NET 2.0, <a href="http://www.kynosarges.de/NDoc.html">NDOC 2.0 Alpha</a>. Despite being an Alpha version, the tool works great, was very familiar and did the job, all for less then 1MB of download.</p>
<p>Screenshot of the application.</p>
<p><img src="http://www.nophadon.com/wp-content/uploads/2007/05/ndoc.jpg"/></p>
<p>Screenshot of output MSDN Chm Help file.</p>
<p><img src="http://www.nophadon.com/wp-content/uploads/2007/05/ndoc_example.jpg"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/ndoc-for-net-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Detect Mobile Browser script</title>
		<link>http://www.nophadon.com/notebook/php-detect-mobile-browser-script/</link>
		<comments>http://www.nophadon.com/notebook/php-detect-mobile-browser-script/#comments</comments>
		<pubDate>Sat, 25 Nov 2006 20:06:42 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2006/11/25/php-detect-mobile-browser-script/</guid>
		<description><![CDATA[Below is a useful script I used for detecting mobile browsers.  

// Detects if browser is mobile or not
$mobile_browser = '0';
if(preg_match('/(up.browser&#124;up.link&#124;windows   ce&#124;iemobile&#124;mmp&#124;symbian&#124;smartphone&#124;midp&#124;wap&#124;phone&#124;vodafone&#124;o2&#124;pocket&#124;mobile&#124;pda&#124;psp)/i',strtolower($_SERVER['HTTP_USER_AGENT']))){
 $mobile_browser++;
}
if(((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'text/vnd.wap.wml')>0) or (strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml')>0)) or ((((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or isset($_SERVER['X-OperaMini-Features']) or isset($_SERVER['UA-pixels'])))))){
 $mobile_browser++;
}
$mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4));
$mobile_agents = array('acs-','alav','alca','amoi','audi','aste','avan','benq','bird','blac','blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno','ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-','maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-','newt','noki','opwv','palm','pana','pant','pdxg','phil','play','pluc','port','prox','qtek','qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar','sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-','tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp','wapr','webc','winw','winw','xda','xda-');
if(in_array($mobile_ua,$mobile_agents)){
 $mobile_browser++;
}
if($mobile_browser>0){
 //mobile site
}else{
 //not mobile site
 header( 'Location: http://www.web_address.com/' ) ;
}

]]></description>
			<content:encoded><![CDATA[<p>Below is a useful script I used for detecting mobile browsers.  </p>
<pre class="bodyCode">
// Detects if browser is mobile or not
$mobile_browser = '0';
if(preg_match('/(up.browser|up.link|windows   ce|iemobile|mmp|symbian|smartphone|midp|wap|phone|vodafone|o2|pocket|mobile|pda|psp)/i',strtolower($_SERVER['HTTP_USER_AGENT']))){
 $mobile_browser++;
}
if(((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'text/vnd.wap.wml')>0) or (strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml')>0)) or ((((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or isset($_SERVER['X-OperaMini-Features']) or isset($_SERVER['UA-pixels'])))))){
 $mobile_browser++;
}
$mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4));
$mobile_agents = array('acs-','alav','alca','amoi','audi','aste','avan','benq','bird','blac','blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno','ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-','maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-','newt','noki','opwv','palm','pana','pant','pdxg','phil','play','pluc','port','prox','qtek','qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar','sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-','tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp','wapr','webc','winw','winw','xda','xda-');
if(in_array($mobile_ua,$mobile_agents)){
 $mobile_browser++;
}
if($mobile_browser>0){
 //mobile site
}else{
 //not mobile site
 header( 'Location: http://www.web_address.com/' ) ;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/php-detect-mobile-browser-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful Javascript/DOM Tools</title>
		<link>http://www.nophadon.com/notebook/useful-javascriptdom-tools/</link>
		<comments>http://www.nophadon.com/notebook/useful-javascriptdom-tools/#comments</comments>
		<pubDate>Mon, 09 Oct 2006 14:54:38 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2006/10/09/useful-javascriptdom-tools/</guid>
		<description><![CDATA[DOMTool v1.1 &#124; Muffin Research Labs
Here&#8217;s a great tool that will generate the necessary DOM scripts to create whatever HTML you want
http://muffinresearch.co.uk/code/javascript/DOMTool/
]]></description>
			<content:encoded><![CDATA[<h3>DOMTool v1.1 | Muffin Research Labs</h3>
<p>Here&#8217;s a great tool that will generate the necessary DOM scripts to create whatever HTML you want</p>
<p><a href="http://muffinresearch.co.uk/code/javascript/DOMTool/">http://muffinresearch.co.uk/code/javascript/DOMTool/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/useful-javascriptdom-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Custom HTTP Handlers</title>
		<link>http://www.nophadon.com/notebook/net-custom-http-handlers/</link>
		<comments>http://www.nophadon.com/notebook/net-custom-http-handlers/#comments</comments>
		<pubDate>Mon, 02 Oct 2006 15:44:43 +0000</pubDate>
		<dc:creator>kai</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://www.nophadon.com/2006/10/02/net-custom-http-handlers/</guid>
		<description><![CDATA[ASP.NET provides a nice way to avoid it&#8217;s full web control lifecycle. Why would you want to do this? Well, I found it most useful for doing AJAX work. For example, I have a javascript function I need to have ansynchronously call ASP.NET and return some data to update a HTML elements. In ASP Classic, [...]]]></description>
			<content:encoded><![CDATA[<p>ASP.NET provides a nice way to avoid it&#8217;s full web control lifecycle. Why would you want to do this? Well, I found it most useful for doing AJAX work. For example, I have a javascript function I need to have ansynchronously call ASP.NET and return some data to update a HTML elements. In ASP Classic, PHP, Coldfusion, whatever, this is straightforward, the page gets called and some data is outputed. Using Prototypes Ajax.Request I would write the following,</p>
<pre class="bodyCode">
function getSomeData(parameter1) {
  var url = '/file_path/file_name.php';
  var pars = 'param='+parameter1;
  var myAjax = new Ajax.Request(
     url, {
       method: 'get',
       parameters: pars,
       onComplete: doSomethingWithData
       }
     );
}
</pre>
<p>With ASP.NET I could do the same with an ASPX page, but the request would go through the web control model, which adds overhead. So writing a custom HTTP Handler is one solution.  Now there are a few ways to get this setup, but I will use the way I think is most straight-forward. </p>
<p>The first thing you&#8217;ll do is create a new class and place that class in the App_Code folder. Below is an example of a very simple class that returns data that will be consumed by the javascript function above. Within Visual Studio add a new class to your App_Code directory and call it, myhttphandler.cs.</p>
<pre class="bodyCode">
using System;
using System.Web;

namespace MyHttpExtensions
{
  public class HandlerExample : IHttpHandler
  {
    public void ProcessRequest(System.Web.HttpContext context)
    {
      HttpResponse response = context.Response;
      response.write("Data to be use by javascript..data...data..");
    }
    public bool IsReusable
    {
      get {return true;}
    }
  }
}
</pre>
<p>After you have the class created, within Visual Studio you can create a file called a Generic Handler (file extension .ASHX), which you can put in your application directory. This file looks like,</p>
<pre class="bodyCode">
  < %@ WebHandler Language = "C#"
           Class="MyHttpExtensions.HandlerExample" %>
</pre>
<p>The class name corresponds to the class you created in your App_Code folder. And there it is, you can now request a ASP.NET page which is very light-weight and avoids normal web control processing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nophadon.com/notebook/net-custom-http-handlers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
