<?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>.Net Frenzy</title>
	<atom:link href="http://www.dotnetfrenzy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnetfrenzy.com</link>
	<description>An ASP.Net Developers Blog</description>
	<pubDate>Tue, 09 Mar 2010 11:20:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Spectrum Visualization with the HTML5 Audio Data API</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/tVWFXrUtupI/spectrum-visualization-with-the-html5-audio-data-api</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/tVWFXrUtupI/spectrum-visualization-with-the-html5-audio-data-api#comments</comments>
		<pubDate>Tue, 09 Mar 2010 11:20:07 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Front Page]]></category>

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

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

		<guid isPermaLink="false">http://ajaxian.com/?p=8690</guid>
		<description><![CDATA[
The HTML5 specification introduces the  and  media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current HTML5 media API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. We [...]]]></description>
			<content:encoded><![CDATA[<blockquote cite="https://wiki.mozilla.org/Audio_Data_API"><p>
The HTML5 specification introduces the  and  media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current HTML5 media API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. We present a new extension to this API, which allows web developers to read and write raw audio data.<br />
</p></blockquote>
<p>The above quote is from the <a href="https://wiki.mozilla.org/Audio_Data_API">Audio Data API</a> extension that joins a bunch of juicy developer work in Firefox 3.7.</p>
<p>Thomas Sturm has taken that API and &lt;a href="http://www.storiesinflight.com/jsfft/visualizer/index.html<br />
"&gt;created a spectrum visualization</a> a kin to some of the great work by Scott Schiller (using Flash).</p>
<p></p>
<p>There is a new <code>onaudiowritten</code> attribute:</p>
<div class="igBar"><a href="showCodeTxt('html-4');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>HTML:</span>
<div>
<div class="html">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>&lt;audio <span>src</span>=<span>"song.ogg"</span> controls=<span>"true"</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;onaudiowritten=<span>"audioWritten(event);"</span><span>&gt;</span></a></span></div>
</li>
<li>
<div><span><span>&lt;</span></a>/audio&gt;</span></div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>that lets you get access to info such as the spectrum:</p>
<div class="igBar"><a href="showCodeTxt('javascript-5');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>function</span> audioWritten<span>&#40;</span>event<span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; spectrum = event.<span>mozSpectrum</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>var</span> specSize = spectrum.<span>length</span>, magnitude;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>// Clear the canvas before drawing spectrum</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; ctx.<span>clearRect</span><span>&#40;</span><span>0</span>,<span>0</span>, canvas.<span>width</span>, canvas.<span>height</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>for</span> <span>&#40;</span> <span>var</span> i = <span>0</span>; i &lt;specSize; i++ <span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; magnitude = spectrum.<span>item</span><span>&#40;</span>i<span>&#41;</span> * <span>4000</span>; <span>// multiply spectrum by a zoom value</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>// Draw rectangle bars for each frequency bin</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.<span>fillRect</span><span>&#40;</span>i * <span>4</span>, canvas.<span>height</span>, <span>3</span>, -magnitude<span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>&#125;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>&#125;</span></div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Add to that the ability to write audio.... </p>
<div class="igBar"><a href="showCodeTxt('javascript-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>var</span> audioOutput = <span>new</span> Audio<span>&#40;</span><span>&#41;</span>;</div>
</li>
<li>
<div>audioOutput.<span>mozSetup</span><span>&#40;</span><span>2</span>, <span>44100</span>, <span>1</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>var</span> samples = <span>&#91;</span><span>0</span>.<span>242</span>, <span>0</span>.<span>127</span>, <span>0</span>.<span>0</span>, -<span>0</span>.<span>058</span>, -<span>0</span>.<span>242</span>, ...<span>&#93;</span>;</div>
</li>
<li>
<div>audioOutput.<span>mozAudioWrite</span><span>&#40;</span>samples.<span>length</span>, samples<span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Nice work all around.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=tVWFXrUtupI:ednfTQcVq1Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=tVWFXrUtupI:ednfTQcVq1Y:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=tVWFXrUtupI:ednfTQcVq1Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=tVWFXrUtupI:ednfTQcVq1Y:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/tVWFXrUtupI/spectrum-visualization-with-the-html5-audio-data-api/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASMX ScriptService mistakes: Installation and configuration</title>
		<link>http://feeds.encosia.com/~r/Encosia/~3/KWSmeXAYY6A/</link>
		<comments>http://feeds.encosia.com/~r/Encosia/~3/KWSmeXAYY6A/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 03:29:07 +0000</pubDate>
		<dc:creator>Dave Ward</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[ASMX Mistakes and Misconceptions]]></category>

		<category><![CDATA[ASP.NET]]></category>

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

		<guid isPermaLink="false">http://encosia.com/?p=972</guid>
		<description><![CDATA[Continuing my series of posts about ASMX services and JSON, in this post I’m going to cover two common mistakes that plague the process of getting a project’s first ASMX ScriptService working: Installing System.Web.Extensions into the GAC and configuring your web.config.
System.Web.Extensions (aka ASP.NET AJAX)
The ability for ASMX services to return raw JSON is made possible [...]<p><p>###</p>

<p>Originally posted at <a href="http://encosia.com">Encosia</a>.  If you're reading this elsewhere, come on over and see the original.</p><br /><br /><a href="http://encosia.com/2010/03/08/asmx-scriptservice-mistakes-installation-and-configuration/">ASMX ScriptService mistakes: Installation and configuration</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Continuing <a href="http://encosia.com/2010/03/03/asmx-and-json-common-mistakes-and-misconceptions/">my series of posts about ASMX services and JSON</a>, in this post I’m going to cover two common mistakes that plague the process of getting a project’s first ASMX ScriptService working: <strong>Installing System.Web.Extensions</strong> into the GAC and <strong>configuring your web.config</strong>.</p>
<h3>System.Web.Extensions (aka ASP.NET AJAX)</h3>
<p>The ability for ASMX services to return raw JSON is made possible by two key features originally added by the ASP.NET AJAX Extensions v1.0:</p>
<ul>
<li><strong>JavaScriptSerializer</strong> – <a href="http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer(VS.100).aspx">The JavaScriptSerializer class</a> is the actual workhorse that translates back and forth between JSON strings and .NET CLR objects. Though less powerful than WCF’s DataContractJsonSerializer and third-party libraries like <a href="http://www.codeplex.com/Json" rel="nofollow">Json.NET</a>, JavaScriptSerializer is likely all you’ll ever need for simple AJAX callbacks. </li>
<li><strong>ScriptHandlerFactory</strong> – There are several more classes behind the scenes*, but the ScriptHandlerFactory is the tip of the iceberg that you&#8217;ll need to remember during configuration. Redirecting ASMX requests through this HttpHandler is what coordinates the pairing of ScriptService with JavaScriptSerializer to provide automatic JSON handling. </li>
</ul>
<p>Though both of these classes appear in the System.Web.Script namespace, they actually reside in ASP.NET AJAX&#8217;s System.Web.Extensions assembly. That has different implications depending on which version of ASP.NET your site targets:</p>
<ul>
<li><strong>1.x</strong> – No support for ScriptServices. A custom HttpHandler coupled with a third party library like <a href="http://james.newtonking.com/pages/json-net.aspx">Json.NET</a> is your best bet (if anyone has a good tutorial on doing this under 1.x, let me know so that I can link to it).</li>
<li><strong>2.0</strong> – ScriptServices are available in ASP.NET 2.0 with the installation of the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&amp;displaylang=en" rel="nofollow">ASP.NET AJAX Extensions v1.0</a>.
<ul>
<li>That means that <strong>the ASP.NET AJAX installer needs to be run on the server that hosts your site</strong>, not just on your local development machine.</li>
<li>For some of a ScriptService’s features to work in medium trust (i.e. shared hosting), the System.Web.Extensions assembly needs to be in your server’s global assembly cache (GAC). <a href="http://msmvps.com/blogs/luisabreu/archive/2007/11/22/stop-the-nonsense-don-t-put-the-system-web-extensions-dll-inside-your-bin-folder.aspx">Don’t waste your time trying to make it work in your site’s /bin directory</a>; insist that the extensions be properly installed on the server.</li>
</ul>
</li>
<li><strong>3.5+</strong> – As of .NET 3.5, System.Web.Extensions ships with the framework. No additional assemblies need be installed.</li>
</ul>
<p><em>* If you’re interested in the internals, I highly recommend downloading </em><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ef2c1acc-051a-4fe6-ad72-f3bed8623b43&amp;DisplayLang=en" rel="nofollow">the ASP.NET AJAX Extensions v1.0 source</a><em></em><em> and taking a look at ScriptHandlerFactory, RestHandlerFactory, and RestHandler. Though the classes have changed slightly since v1.0, they are still very similar.</em></p>
<h3>Rerouting the ASMX handler via web.config</h3>
<p>With the System.Web.Extensions assembly installed in the GAC, the remaining configuration step is an element in your site’s web.config. To take advantage of the ScriptService functionality, <strong>ASP.NET must be instructed to reroute ASMX requests through the ScriptHandlerFactory instead of ASP.NET’s standard ASMX handler</strong>.</p>
<p>This step is often unnecessary. The project templates in ASP.NET 3.5+ include all the necessary configuration elements, and ASP.NET 2.0 sites created with the “AJAX Enabled” templates are also pre-configured correctly.</p>
<p>However, if you find yourself unable to coax JSON out of an ASMX ScriptService, <strong>verifying your web.config is one of the best first steps in troubleshooting the issue</strong>. Whether due to a web.config generated by an older project template, accidental modification, or other issues, missing the httpHandlers web.config setting is a very common pitfall.</p>
<p>What should appear varies slightly depending on which version of ASP.NET your project targets. Regardless of your framework version, the config elements should be added to the &lt;httpHandlers&gt; section and are the only elements necessary. The <a href="http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx" rel="nofollow">variety of other config items required for the UpdatePanel and ScriptManager</a> aren’t crucial to the ScriptService functionality.</p>
<h4>ASP.NET 2.0 (with the ASP.NET AJAX Extensions installed)</h4>

<div class="wp_syntax"><div class="code"><pre><span><span>&lt;configuration<span>&gt;</span></span></span>
  <span><span>&lt;system.web<span>&gt;</span></span></span>
    <span><span>&lt;httphandlers<span>&gt;</span></span></span>
      <span><span>&lt;remove</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>/&gt;</span></span>
      <span><span>&lt;add</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>Culture</span>=neutral, <span>validate</span>=<span>&quot;false&quot;</span></span>
<span>           <span>type</span>=<span>&quot;System.Web.Script.Services.ScriptHandlerFactory, </span>
<span>                 System.Web.Extensions, Version=1.0.61025.0,</span>
<span>                 PublicKeyToken=31bf3856ad364e35&quot;</span> <span>/&gt;</span></span>
    <span><span>&lt;/httphandlers<span>&gt;</span></span></span>
  <span><span>&lt;/system.web<span>&gt;</span></span></span>
<span><span>&lt;/configuration<span>&gt;</span></span></span></pre></div></div>

<h4>ASP.NET 3.5</h4>

<div class="wp_syntax"><div class="code"><pre><span><span>&lt;configuration<span>&gt;</span></span></span>
  <span><span>&lt;system.web<span>&gt;</span></span></span>
    <span><span>&lt;httphandlers<span>&gt;</span></span></span>
      <span><span>&lt;remove</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>/&gt;</span></span>
      <span><span>&lt;add</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>Culture</span>=neutral, <span>validate</span>=<span>&quot;false&quot;</span></span>
<span>           <span>type</span>=<span>&quot;System.Web.Script.Services.ScriptHandlerFactory, </span>
<span>                 System.Web.Extensions, Version=3.5.0.0,</span>
<span>                 PublicKeyToken=31bf3856ad364e35&quot;</span> <span>/&gt;</span></span>
    <span><span>&lt;/httphandlers<span>&gt;</span></span></span>
  <span><span>&lt;/system.web<span>&gt;</span></span></span>
<span><span>&lt;/configuration<span>&gt;</span></span></span></pre></div></div>

<h4>ASP.NET 4</h4>
<p>Thankfully, <a href="http://www.asp.net/LEARN/whitepapers/aspnet4/default.aspx#_TOC1_1" rel="nofollow">ASP.NET 4 has taken steps to reverse the trend of ever-enlarging baseline web.config files</a>. By moving common configuration items such as the ScriptService’s HttpHandler to the default machine.config, each individual site need not include those configuration elements in their specific web.config files.</p>
<p>Unless you go out of your way to manually remove their HttpHandler, ASMX ScriptServices will work automatically in any ASP.NET 4 site.</p>
<p><p>###</p>

<p>Originally posted at <a href="http://encosia.com">Encosia</a>.  If you're reading this elsewhere, come on over and see the original.</p><br><br><a href="http://encosia.com/2010/03/08/asmx-scriptservice-mistakes-installation-and-configuration/">ASMX ScriptService mistakes: Installation and configuration</a></p>
<div class="feedflare">
<a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Encosia?i=KWSmeXAYY6A:ubmrC_jzw0I:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Encosia?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:aWKiLpGymzw"><img src="http://feeds.feedburner.com/~ff/Encosia?d=aWKiLpGymzw" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:30RXbuXOgYA"><img src="http://feeds.feedburner.com/~ff/Encosia?d=30RXbuXOgYA" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Encosia?i=KWSmeXAYY6A:ubmrC_jzw0I:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Encosia?i=KWSmeXAYY6A:ubmrC_jzw0I:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Encosia/~4/KWSmeXAYY6A" height="1">]]></content:encoded>
			<wfw:commentRss>http://feeds.encosia.com/~r/Encosia/~3/KWSmeXAYY6A/feed/</wfw:commentRss>
		</item>
		<item>
		<title>modulr: a CommonJS module implementation in Ruby for client-side JavaScript</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/88WWc8yFtWU/modulr-a-commonjs-module-implementation-in-ruby-for-client-side-javascript</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/88WWc8yFtWU/modulr-a-commonjs-module-implementation-in-ruby-for-client-side-javascript#comments</comments>
		<pubDate>Mon, 08 Mar 2010 11:28:40 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Front Page]]></category>

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

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

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

		<guid isPermaLink="false">http://ajaxian.com/?p=8688</guid>
		<description><![CDATA[
modulr is a CommonJS module implementation in Ruby for client-side JavaScript

Ruby? what does that have anything to do with it? Ah, its from one of those Prototype guys isn't it.... Yup, Tobie is at it again, this time with modulr:

modulr accepts a singular file as input (the program) on which is does static analysis to [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
modulr is a CommonJS module implementation in Ruby for client-side JavaScript
</p></blockquote>
<p>Ruby? what does that have anything to do with it? Ah, its from one of those Prototype guys isn't it.... Yup, Tobie is at it again, this time with <a href="http://github.com/codespeaks/modulr">modulr</a>:</p>
<blockquote><p>
modulr accepts a singular file as input (the program) on which is does static analysis to recursively resolve its dependencies.</p>
<p>The program, its dependencies and a small, namespaced JavaScript library are concatenated into a single js file.</p>
<p>The bundled JavaScript library provides each module with the necessary require function and exports and module free variables.
</p></blockquote>
<p>This can also help sharing that CommonJS code. I recently <a href="http://almaer.com/blog/building-an-web-application-from-the-inside-out-using-node-js-to-bootstrap-a-server-from-client-js">did just that</a> and had some:</p>
<div class="igBar"><a href="showCodeTxt('javascript-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>// check to see if you are running inside of node.js and export if you are</span></div>
</li>
<li>
<div><span>if</span> <span>&#40;</span><span>typeof</span> GLOBAL == <span>"object"</span> &amp;&amp; <span>typeof</span> GLOBAL<span>&#91;</span><span>'node'</span><span>&#93;</span> == <span>"object"</span><span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; exports.<span>Appetite</span> = Appetite;</div>
</li>
<li>
<div><span>&#125;</span></div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=88WWc8yFtWU:gdP8GqO-SMI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=88WWc8yFtWU:gdP8GqO-SMI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=88WWc8yFtWU:gdP8GqO-SMI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=88WWc8yFtWU:gdP8GqO-SMI:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/88WWc8yFtWU/modulr-a-commonjs-module-implementation-in-ruby-for-client-side-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Some VS 2010 RC Updates (including patches for Intellisense and Web Designer fixes)</title>
		<link>http://weblogs.asp.net/scottgu/archive/2010/03/08/some-vs-2010-rc-updates-including-patches-for-intellisense-and-web-designer-fixes.aspx</link>
		<comments>http://weblogs.asp.net/scottgu/archive/2010/03/08/some-vs-2010-rc-updates-including-patches-for-intellisense-and-web-designer-fixes.aspx#comments</comments>
		<pubDate>Mon, 08 Mar 2010 08:07:29 +0000</pubDate>
		<dc:creator>ScottGu</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Community News]]></category>

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

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7374138</guid>
		<description><![CDATA[<font size="2" face="arial">   <p><em>[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: </em><a href="http://www.twitter.com/scottgu" target="_blank">twitter.com/scottgu</a><em></em><em>]</em></p>    <p>We are continuing to make progress on shipping Visual Studio 2010.&#160; I’d like to say a big thank you to everyone who has downloaded and tried out the VS 2010 Release Candidate, and especially to those who have sent us feedback or reported issues with it. This data has been invaluable in helping us find and fix remaining bugs before we ship the final release.</p>    <p>Last month <a href="http://weblogs.asp.net/scottgu/archive/2010/02/15/patch-for-vs-2010-rc-intellisense-crash-issue-now-available.aspx" target="_blank">I blogged about a patch</a> we released for the VS 2010 RC that fixed a bad intellisense crash issue.&#160; This past week we released two additional patches that you can download and apply to the VS 2010 RC to immediately fix two other common issues we’ve seen people run into:</p>    <h3><u>Patch that fixes crashes with Tooltip invocation and when hovering over identifiers</u></h3>    <p>The Visual Studio team recently released a second patch that fixes some crashes we’ve seen when tooltips are displayed – most commonly when hovering over an identifier to view a QuickInfo tooltip.</p>    <p>You can learn more about this issue from <a href="http://blogs.msdn.com/visualstudio/archive/2010/03/02/second-patch-now-available-for-intellisense-crashes-in-vs-2010-rc.aspx" target="_blank">this blog post</a>, and download and apply the patch <a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27019" target="_blank">here</a>.</p>    <h3><u>Patch that fixes issues with the Web Forms designer not correctly adding controls to the auto-generated designer files</u></h3>    <p>The Visual Web Developer team recently released a patch that fixes issues where web controls are not correctly added to the .designer.cs file associated with the .aspx file – which means they can’t be programmed against in the code-behind file.&#160; </p>    <p>This issue is most commonly described as “<em>controls are not being recognized in the code-behind</em>” or “<em>editing existing .aspx files regenerates the .aspx.designer.(vb or cs) file and controls are now missing</em>” or “<em>I can’t embed controls within the Ajax Control Toolkit TabContainer or the &#60;asp:createuserwizard&#62; control</em>”.</p>    <p>You can learn more about the issue <a href="http://blogs.msdn.com/webdevtools/archive/2010/03/05/hotfix-for-issue-with-auto-generated-designer-files-not-adding-controls.aspx" target="_blank">here</a>, and download the patch that fixes it <a href="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27117" target="_blank">here</a>.</p>    <h3><u>Common Cause of Intellisense and IDE sluggishness on Windows XP, Vista, Win Server 2003/2008 systems</u></h3>    <p>Over the last few months we’ve occasionally seen reports of people seeing tremendous slowness when typing and using intellisense within VS 2010 despite running on decent machines.&#160; It took us awhile to track down the cause – but we have found that the common culprit seems to be that these machines don’t have the latest versions of the UIA (Windows Automation) component installed.</p>    <p>UIA 3 ships with Windows 7, and is a recommended Windows Update patch on XP and Vista (which is why we didn’t see the problem in our tests – since our machines are patched with all recommended updates).&#160; Many systems (especially on XP) don’t automatically install recommended updates, though, and are running with older versions of UIA. This can cause significant performance slow-downs within the VS 2010 editor when large lists are displayed (for example: with intellisense).</p>    <p>If you are running on Windows XP, Vista, or Windows Server 2003 or 2008 and are seeing any performance issues with the editor or IDE, please install the free UIA 3 <a href="http://support.microsoft.com/kb/971513/" target="_blank">update</a> that can be downloaded from <a href="http://support.microsoft.com/kb/971513/" target="_blank">this page</a>.&#160; If you scroll down the page you’ll find direct links to versions for each OS.</p>    <p>Note that we are making improvements to the final release of VS 2010 so that we don’t have big perf issues when UIA 3 isn’t installed – and we are also adding a message within the IDE that will warn you if you don’t have UIA 3 installed and accessibility is activated.</p>    <h3><u>Improved Text Rendering with WPF 4 and VS 2010</u></h3>    <p>We recently made some nice changes to WPF 4 which improve the text clarity and text crispness over what was in the VS 2010/.NET 4 Release Candidate.&#160; In particular these changes improve scenarios where you have a dark background with light text.</p>    <p>You can learn more about these improvements in this WPF Team <a href="http://blogs.msdn.com/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx" target="_blank">blog post</a>.&#160; These changes will be in the final release of VS 2010 and .NET 4.</p>    <p>Hope this helps,</p>    <p>Scott</p> </font><img src="http://weblogs.asp.net/aggbug.aspx?PostID=7374138" width="1" height="1">]]></description>
			<content:encoded><![CDATA[<font size="2" face="arial">   <p><em>[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: </em><a href="http://www.twitter.com/scottgu">twitter.com/scottgu</a><em></em><em>]</em></p>    <p>We are continuing to make progress on shipping Visual Studio 2010.&#160; I’d like to say a big thank you to everyone who has downloaded and tried out the VS 2010 Release Candidate, and especially to those who have sent us feedback or reported issues with it. This data has been invaluable in helping us find and fix remaining bugs before we ship the final release.</p>    <p>Last month <a href="http://weblogs.asp.net/scottgu/archive/2010/02/15/patch-for-vs-2010-rc-intellisense-crash-issue-now-available.aspx">I blogged about a patch</a> we released for the VS 2010 RC that fixed a bad intellisense crash issue.&#160; This past week we released two additional patches that you can download and apply to the VS 2010 RC to immediately fix two other common issues we’ve seen people run into:</p>    <h3><u>Patch that fixes crashes with Tooltip invocation and when hovering over identifiers</u></h3>    <p>The Visual Studio team recently released a second patch that fixes some crashes we’ve seen when tooltips are displayed – most commonly when hovering over an identifier to view a QuickInfo tooltip.</p>    <p>You can learn more about this issue from <a href="http://blogs.msdn.com/visualstudio/archive/2010/03/02/second-patch-now-available-for-intellisense-crashes-in-vs-2010-rc.aspx">this blog post</a>, and download and apply the patch <a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27019">here</a>.</p>    <h3><u>Patch that fixes issues with the Web Forms designer not correctly adding controls to the auto-generated designer files</u></h3>    <p>The Visual Web Developer team recently released a patch that fixes issues where web controls are not correctly added to the .designer.cs file associated with the .aspx file – which means they can’t be programmed against in the code-behind file.&#160; </p>    <p>This issue is most commonly described as “<em>controls are not being recognized in the code-behind</em>” or “<em>editing existing .aspx files regenerates the .aspx.designer.(vb or cs) file and controls are now missing</em>” or “<em>I can’t embed controls within the Ajax Control Toolkit TabContainer or the &lt;asp:createuserwizard&gt; control</em>”.</p>    <p>You can learn more about the issue <a href="http://blogs.msdn.com/webdevtools/archive/2010/03/05/hotfix-for-issue-with-auto-generated-designer-files-not-adding-controls.aspx">here</a>, and download the patch that fixes it <a href="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27117">here</a>.</p>    <h3><u>Common Cause of Intellisense and IDE sluggishness on Windows XP, Vista, Win Server 2003/2008 systems</u></h3>    <p>Over the last few months we’ve occasionally seen reports of people seeing tremendous slowness when typing and using intellisense within VS 2010 despite running on decent machines.&#160; It took us awhile to track down the cause – but we have found that the common culprit seems to be that these machines don’t have the latest versions of the UIA (Windows Automation) component installed.</p>    <p>UIA 3 ships with Windows 7, and is a recommended Windows Update patch on XP and Vista (which is why we didn’t see the problem in our tests – since our machines are patched with all recommended updates).&#160; Many systems (especially on XP) don’t automatically install recommended updates, though, and are running with older versions of UIA. This can cause significant performance slow-downs within the VS 2010 editor when large lists are displayed (for example: with intellisense).</p>    <p>If you are running on Windows XP, Vista, or Windows Server 2003 or 2008 and are seeing any performance issues with the editor or IDE, please install the free UIA 3 <a href="http://support.microsoft.com/kb/971513/">update</a> that can be downloaded from <a href="http://support.microsoft.com/kb/971513/">this page</a>.&#160; If you scroll down the page you’ll find direct links to versions for each OS.</p>    <p>Note that we are making improvements to the final release of VS 2010 so that we don’t have big perf issues when UIA 3 isn’t installed – and we are also adding a message within the IDE that will warn you if you don’t have UIA 3 installed and accessibility is activated.</p>    <h3><u>Improved Text Rendering with WPF 4 and VS 2010</u></h3>    <p>We recently made some nice changes to WPF 4 which improve the text clarity and text crispness over what was in the VS 2010/.NET 4 Release Candidate.&#160; In particular these changes improve scenarios where you have a dark background with light text.</p>    <p>You can learn more about these improvements in this WPF Team <a href="http://blogs.msdn.com/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx">blog post</a>.&#160; These changes will be in the final release of VS 2010 and .NET 4.</p>    <p>Hope this helps,</p>    <p>Scott</p> </font><img src="http://weblogs.asp.net/aggbug.aspx?PostID=7374138" width="1" height="1">]]></content:encoded>
			<wfw:commentRss>http://weblogs.asp.net/scottgu/archive/2010/03/08/some-vs-2010-rc-updates-including-patches-for-intellisense-and-web-designer-fixes.aspx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A few announcements for those in the UK</title>
		<link>http://weblogs.asp.net/scottgu/archive/2010/03/07/a-few-announcements-for-those-in-the-uk.aspx</link>
		<comments>http://weblogs.asp.net/scottgu/archive/2010/03/07/a-few-announcements-for-those-in-the-uk.aspx#comments</comments>
		<pubDate>Mon, 08 Mar 2010 07:04:30 +0000</pubDate>
		<dc:creator>ScottGu</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Community News]]></category>

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

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

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7374106</guid>
		<description><![CDATA[<font size="2" face="arial">   <p>This a quick post to announce a few upcoming events for those in the UK.</p>    <h3><u>I’ll be presenting in Glasgow, Scotland on March 25th </u></h3>    <p>I’m doing a free 5 hour presentation in Glasgow on March 25th. I’ll be covering VS 2010, ASP.NET 4, ASP.NET Web Forms 4, ASP.NET MVC 2, Silverlight and potentially show off a few new things that haven’t been announced yet.</p>    <p>You can learn more about the event and register for free <a href="http://developerdeveloperdeveloper.com/guglas/" target="_blank">here</a>.&#160; There are only a few spots left – so register quickly.&#160; </p>    <p>When the event fills up there will be a wait-list – please add yourself to this as we’ll be encouraging people who won’t be able to attend to let us know ahead of time so that we can add more people to the event.</p>    <h3><u>I’ll be presenting in Birmingham, England on March 26th </u></h3>    <p>I’m doing a free 5 hour presentation in Birmingham (UK) on March 26th. I’ll be covering VS 2010, ASP.NET 4, ASP.NET Web Forms 4, ASP.NET MVC 2, Silverlight and also potentially show off a few new things that haven’t been announced yet.</p>    <p>You can learn more about the event and register for free <a href="http://developerdeveloperdeveloper.com/gubrum/" target="_blank">here</a>. </p>    <p>The event unfortunately filled up immediately (even before I had a chance to blog it) – but there is a waitlist.&#160; If you’d like to attend please add yourself to it as hopefully a number of people will be able to attend off of it. </p>    <h3><u>UK Party at MIX</u></h3>    <p>If you are going to MIX and are from the UK send mail to <a href="mailto:phil@pixelprogramming.com">phil@pixelprogramming.com</a> (or tweet him @<a href="http://twitter.com/plip" target="_blank">plip</a>) for an invite to a party being organized for UK MIX attendees next Sunday (March 14th).&#160; Knowing the people involved I’m sure the party will be fun. &#60;g&#62;</p>    <h3><u>Cool MIX10 iPhone App</u></h3>    <p>Speaking of MIX (and UK developers), <a href="http://weblogs.asp.net/chrishardy/archive/2010/03/04/mix10-iphone-app-is-live.aspx" target="_blank">Chris Hardy</a> has posted a cool new MIX10 iPhone application on the Apple AppStore.&#160; The free application helps track sessions, rooms, etc.&#160; You can learn more about it from Chris’ blog post <a href="http://weblogs.asp.net/chrishardy/archive/2010/03/04/mix10-iphone-app-is-live.aspx" target="_blank">here</a>.&#160; The app works for everyone – not just those from the UK. :-)</p>    <p>Hope this helps,</p>    <p>Scott</p> </font><img src="http://weblogs.asp.net/aggbug.aspx?PostID=7374106" width="1" height="1">]]></description>
			<content:encoded><![CDATA[<font size="2" face="arial">   <p>This a quick post to announce a few upcoming events for those in the UK.</p>    <h3><u>I’ll be presenting in Glasgow, Scotland on March 25th </u></h3>    <p>I’m doing a free 5 hour presentation in Glasgow on March 25th. I’ll be covering VS 2010, ASP.NET 4, ASP.NET Web Forms 4, ASP.NET MVC 2, Silverlight and potentially show off a few new things that haven’t been announced yet.</p>    <p>You can learn more about the event and register for free <a href="http://developerdeveloperdeveloper.com/guglas/">here</a>.&#160; There are only a few spots left – so register quickly.&#160; </p>    <p>When the event fills up there will be a wait-list – please add yourself to this as we’ll be encouraging people who won’t be able to attend to let us know ahead of time so that we can add more people to the event.</p>    <h3><u>I’ll be presenting in Birmingham, England on March 26th </u></h3>    <p>I’m doing a free 5 hour presentation in Birmingham (UK) on March 26th. I’ll be covering VS 2010, ASP.NET 4, ASP.NET Web Forms 4, ASP.NET MVC 2, Silverlight and also potentially show off a few new things that haven’t been announced yet.</p>    <p>You can learn more about the event and register for free <a href="http://developerdeveloperdeveloper.com/gubrum/">here</a>. </p>    <p>The event unfortunately filled up immediately (even before I had a chance to blog it) – but there is a waitlist.&#160; If you’d like to attend please add yourself to it as hopefully a number of people will be able to attend off of it. </p>    <h3><u>UK Party at MIX</u></h3>    <p>If you are going to MIX and are from the UK send mail to <a href="mailto:phil@pixelprogramming.com">phil@pixelprogramming.com</a> (or tweet him @<a href="http://twitter.com/plip">plip</a>) for an invite to a party being organized for UK MIX attendees next Sunday (March 14th).&#160; Knowing the people involved I’m sure the party will be fun. &lt;g&gt;</p>    <h3><u>Cool MIX10 iPhone App</u></h3>    <p>Speaking of MIX (and UK developers), <a href="http://weblogs.asp.net/chrishardy/archive/2010/03/04/mix10-iphone-app-is-live.aspx">Chris Hardy</a> has posted a cool new MIX10 iPhone application on the Apple AppStore.&#160; The free application helps track sessions, rooms, etc.&#160; You can learn more about it from Chris’ blog post <a href="http://weblogs.asp.net/chrishardy/archive/2010/03/04/mix10-iphone-app-is-live.aspx">here</a>.&#160; The app works for everyone – not just those from the UK. :-)</p>    <p>Hope this helps,</p>    <p>Scott</p> </font><img src="http://weblogs.asp.net/aggbug.aspx?PostID=7374106" width="1" height="1">]]></content:encoded>
			<wfw:commentRss>http://weblogs.asp.net/scottgu/archive/2010/03/07/a-few-announcements-for-those-in-the-uk.aspx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Friday fun: Let’s translate YUI3 to jQuery</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/-VCT_Ey0V_8/friday-fun-lets-translate-yui3-to-jquery</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/-VCT_Ey0V_8/friday-fun-lets-translate-yui3-to-jquery#comments</comments>
		<pubDate>Fri, 05 Mar 2010 13:52:01 +0000</pubDate>
		<dc:creator>Chris Heilmann</dc:creator>
		
		<category><![CDATA[Front Page]]></category>

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

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

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

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

		<category><![CDATA[showmethe$]]></category>

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

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

		<guid isPermaLink="false">http://ajaxian.com/?p=8685</guid>
		<description><![CDATA[I just came across this wonderful Gist on gitHub:
PLAIN TEXT
JAVASCRIPT:




&#160;


var $;


YUI&#40;&#41;.use&#40;'*', function&#40;Y&#41;&#123;


&#160; $ = Y.get;


&#160; for&#40;var p in Y&#41; &#123;


&#160; &#160; &#160; $&#91;p&#93; = Y&#91;p&#93;;


&#160; &#125;


&#125;&#41;;


&#160;


// test


$&#40;'body'&#41;.append&#40;"boo!"&#41;;


&#160;





In case you want to use YUI3 but really really like jQuery syntax :) OK, it breaks the whole sandboxing idea of YUI3, but that's a small price to [...]]]></description>
			<content:encoded><![CDATA[<p>I just came across this wonderful Gist on gitHub:</p>
<div class="igBar"><a href="showCodeTxt('javascript-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>var</span> $;</div>
</li>
<li>
<div>YUI<span>&#40;</span><span>&#41;</span>.<span>use</span><span>&#40;</span><span>'*'</span>, <span>function</span><span>&#40;</span>Y<span>&#41;</span><span>&#123;</span></div>
</li>
<li>
<div>&nbsp; $ = Y.<span>get</span>;</div>
</li>
<li>
<div>&nbsp; <span>for</span><span>&#40;</span><span>var</span> p <span>in</span> Y<span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; $<span>&#91;</span>p<span>&#93;</span> = Y<span>&#91;</span>p<span>&#93;</span>;</div>
</li>
<li>
<div>&nbsp; <span>&#125;</span></div>
</li>
<li>
<div><span>&#125;</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>// test</span></div>
</li>
<li>
<div>$<span>&#40;</span><span>'body'</span><span>&#41;</span>.<span>append</span><span>&#40;</span><span>"boo!"</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>In case you want to use YUI3 but really really like jQuery syntax :) OK, it breaks the whole sandboxing idea of YUI3, but that's a small price to pay, right?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=-VCT_Ey0V_8:ZwL_cH6zBxI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=-VCT_Ey0V_8:ZwL_cH6zBxI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=-VCT_Ey0V_8:ZwL_cH6zBxI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=-VCT_Ey0V_8:ZwL_cH6zBxI:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/-VCT_Ey0V_8/friday-fun-lets-translate-yui3-to-jquery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Firefox gets hardware acceleration in early stage</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/kNRPvnOxRDc/firefox-gets-hardware-acceleration-in-early-stage</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/kNRPvnOxRDc/firefox-gets-hardware-acceleration-in-early-stage#comments</comments>
		<pubDate>Fri, 05 Mar 2010 11:25:43 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Browsers]]></category>

		<category><![CDATA[Front Page]]></category>

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

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

		<guid isPermaLink="false">http://ajaxian.com/?p=8683</guid>
		<description><![CDATA[Bass Schouten is a cool name, and the Mozillan has presented Direct2D hardware acceleration.
You have to grab Firefox nightly, do the about:config / gfx.font_rendering.directwrite.enabled game, but then you get to see it in action.
IE9 showed off how they will support hardware rendering, and I am sure we will see more at MIX, but it is [...]]]></description>
			<content:encoded><![CDATA[<p>Bass Schouten is a cool name, and the Mozillan has <a href="http://www.basschouten.com/blog1.php/2010/03/02/presenting-direct2d-hardware-acceleratio">presented Direct2D hardware acceleration</a>.</p>
<p>You have to grab Firefox nightly, do the <code>about:config</code> / <code>gfx.font_rendering.directwrite.enabled</code> game, but then you get to see it in action.</p>
<p>IE9 showed off <a href="http://ajaxian.com/archives/ie-9-hardware-rendering-new-js-engine-css-standards-and-more">how they will support hardware rendering</a>, and I am sure we will see more at MIX, but it is very cool to see this across the board.</p>
<p>CSS Transforms/Transitions/Animations are going to feel like butter in 2010!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=kNRPvnOxRDc:PSxzumqX8UI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=kNRPvnOxRDc:PSxzumqX8UI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=kNRPvnOxRDc:PSxzumqX8UI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=kNRPvnOxRDc:PSxzumqX8UI:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/kNRPvnOxRDc/firefox-gets-hardware-acceleration-in-early-stage/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Color Picker: Works even in IE6</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/fLqwVRXPDtU/color-picker-works-even-in-ie6</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/fLqwVRXPDtU/color-picker-works-even-in-ie6#comments</comments>
		<pubDate>Thu, 04 Mar 2010 11:02:56 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Component]]></category>

		<category><![CDATA[Front Page]]></category>

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

		<guid isPermaLink="false">http://ajaxian.com/?p=8680</guid>
		<description><![CDATA[
Works even in IE6

Love that quote from the color picker over at RaphaelJS land. This plugin by Dmitry Baranovskiy gives you an easy color picker in short order:
PLAIN TEXT
JAVASCRIPT:




&#160;


var icon = Raphael&#40;"picker", 23, 23&#41;.colorPickerIcon&#40;11, 11, 10&#41;;


&#160;


icon.attr&#40;&#123;cursor: "pointer"&#125;&#41;.node.onclick = function &#40;&#41; &#123;


&#160; &#160; document.getElementById&#40;"benefits"&#41;.style.visibility = "visible";


&#160; &#160; var out = document.getElementById&#40;"output"&#41;;


&#160; &#160; out.style.visibility = "visible";


&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
Works even in IE6
</p></blockquote>
<p>Love that quote from the <a href="http://raphaeljs.com/picker/">color picker over at RaphaelJS land</a>. This plugin by Dmitry Baranovskiy gives you an easy color picker in short order:</p>
<div class="igBar"><a href="showCodeTxt('javascript-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>var</span> icon = Raphael<span>&#40;</span><span>"picker"</span>, <span>23</span>, <span>23</span><span>&#41;</span>.<span>colorPickerIcon</span><span>&#40;</span><span>11</span>, <span>11</span>, <span>10</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>icon.<span>attr</span><span>&#40;</span><span>&#123;</span>cursor: <span>"pointer"</span><span>&#125;</span><span>&#41;</span>.<span>node</span>.<span>onclick</span> = <span>function</span> <span>&#40;</span><span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; document.<span>getElementById</span><span>&#40;</span><span>"benefits"</span><span>&#41;</span>.<span>style</span>.<span>visibility</span> = <span>"visible"</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>var</span> out = document.<span>getElementById</span><span>&#40;</span><span>"output"</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; out.<span>style</span>.<span>visibility</span> = <span>"visible"</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; <span>// this is where colorpicker created</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>var</span> cp = Raphael.<span>colorpicker</span><span>&#40;</span>document.<span>body</span>.<span>offsetWidth</span> / <span>2</span> - <span>150</span>, <span>250</span>, <span>300</span>, <span>"#eee"</span>, document.<span>getElementById</span><span>&#40;</span><span>"picker2"</span><span>&#41;</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; out.<span>onkeyup</span> = <span>function</span> <span>&#40;</span><span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; cp.<span>color</span><span>&#40;</span><span>this</span>.<span>value</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>&#125;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>// assigning onchange event handler</span></div>
</li>
<li>
<div>&nbsp; &nbsp; cp.<span>onchange</span> = <span>function</span> <span>&#40;</span>clr<span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; out.<span>value</span> = clr;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; document.<span>body</span>.<span>style</span>.<span>background</span> = clr;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; document.<span>body</span>.<span>style</span>.<span>color</span> = Raphael.<span>rgb2hsb</span><span>&#40;</span>clr<span>&#41;</span>.<span>b</span> &lt;.<span>5</span> ? <span>"#fff"</span> : <span>"#666"</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp;<span>&#125;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp;<span>// that’s it. Too easy</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp;icon.<span>node</span>.<span>onclick</span> = <span>null</span>;</div>
</li>
<li>
<div><span>&#125;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p><img src="http://ajaxian.com/wp-content/images/colorpicker.png" alt="colorpicker" width="480" height="429" class="alignnone size-full wp-image-8681"></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=fLqwVRXPDtU:9maSvgwS1s4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=fLqwVRXPDtU:9maSvgwS1s4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=fLqwVRXPDtU:9maSvgwS1s4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=fLqwVRXPDtU:9maSvgwS1s4:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/fLqwVRXPDtU/color-picker-works-even-in-ie6/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Touching Cloth; Canvas Fu</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/GLwfZGMw_jE/touching-cloth-canvas-fu</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/GLwfZGMw_jE/touching-cloth-canvas-fu#comments</comments>
		<pubDate>Wed, 03 Mar 2010 11:12:29 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Canvas]]></category>

		<category><![CDATA[Front Page]]></category>

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

		<guid isPermaLink="false">http://ajaxian.com/?p=8677</guid>
		<description><![CDATA[Andrew Hoyer shows his canvas Fu with Cloth, a great experiment using nice physics.


What makes this simulation special is the speed at which everything is computed. Javascript (the language this is written in) is not exactly the most efficient language for this type of computation. This being said, much time was spent squeezing out every [...]]]></description>
			<content:encoded><![CDATA[<p>Andrew Hoyer shows his canvas Fu with <a href="http://www.andrew-hoyer.com/experiments/cloth">Cloth</a>, a great experiment using nice physics.</p>
<p><img src="http://ajaxian.com/wp-content/images/cloth.png" alt="cloth" width="355" height="410"></p>
<blockquote><p>
What makes this simulation special is the speed at which everything is computed. Javascript (the language this is written in) is not exactly the most efficient language for this type of computation. This being said, much time was spent squeezing out every little detail that slows things down.</p>
<p>The most computationally expensive part is trying to satisfy the constraints. To do this requires the calculation of distance between two points. This is easy to do with a little math, but that often involves an expensive square root. This is something that cannot simply be thrown out either, so what do you do? You approximate it. There are lots of mathematical tools for approximating functions, in this case I chose the first couple terms of a taylor expansion.
</p></blockquote>
<p>Check out his <a href="http://www.andrew-hoyer.com/exp_src/cloth_JS/fast_vector.js">fast vector</a>, <a href="http://www.andrew-hoyer.com/exp_src/cloth_JS/constraint.js">constraints</a>, and finally the <a href="http://www.andrew-hoyer.com/exp_src/cloth_JS/cloth.js">cloth itself</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=GLwfZGMw_jE:UrNyxYyPHGk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=GLwfZGMw_jE:UrNyxYyPHGk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=GLwfZGMw_jE:UrNyxYyPHGk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=GLwfZGMw_jE:UrNyxYyPHGk:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/GLwfZGMw_jE/touching-cloth-canvas-fu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASMX and JSON – Common mistakes and misconceptions</title>
		<link>http://feeds.encosia.com/~r/Encosia/~3/04bPIUSgr70/</link>
		<comments>http://feeds.encosia.com/~r/Encosia/~3/04bPIUSgr70/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 09:02:37 +0000</pubDate>
		<dc:creator>Dave Ward</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[ASMX Mistakes and Misconceptions]]></category>

		<category><![CDATA[ASP.NET]]></category>

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

		<guid isPermaLink="false">http://encosia.com/?p=971</guid>
		<description><![CDATA[While we were recording episode 5 of Mastering jQuery, I found myself running down a lengthy list of misconceptions and potential pitfalls when it comes to using ASMX services for AJAX callbacks. After years of fielding questions revolving around that topic, I suppose I’ve developed a decent handle on the issues most often encountered.
To preemptively [...]<p><p>###</p>

<p>Originally posted at <a href="http://encosia.com">Encosia</a>.  If you're reading this elsewhere, come on over and see the original.</p><br /><br /><a href="http://encosia.com/2010/03/03/asmx-and-json-common-mistakes-and-misconceptions/">ASMX and JSON &#8211; Common mistakes and misconceptions</a></p>
]]></description>
			<content:encoded><![CDATA[<p>While we were recording <a href="http://tekpub.com/view/jquery/5">episode 5 of Mastering jQuery</a>, I found myself running down a lengthy list of misconceptions and potential pitfalls when it comes to using ASMX services for AJAX callbacks. After years of fielding questions revolving around that topic, I suppose I’ve developed a decent handle on the issues most often encountered.</p>
<p>To preemptively surface some of that commonly requested information, I’m going to publish a series of relatively short posts, each describing one mistake or misconception that I’ve seen come up frequently.</p>
<p>To get started, I want to cover one of the most fundamental of these misconceptions:  That ASMX services can&#8217;t return JSON.</p>
<h3>Misconception: ASMX services are limited to XML</h3>
<p>One of the most stubbornly persistent misconceptions about ASMX services is the rumor that they are limited to returning XML. With that notion mind, many developers understandably avoid them for client-side AJAX callbacks. When every byte counts, raw JSON is always preferable to the bloat of XML.</p>
<p>However, the introduction of <strong>ASP.NET AJAX removed that XML limitation</strong>.</p>
<p>In any ASP.NET 2.0+ AJAX enabled site, one of ASP.NET AJAX’s additions is something called the <strong>ScriptService</strong>. When a ScriptService is called in the correct manner, it automatically returns its result serialized as JSON instead of XML.</p>
<p>In fact, these <a href="http://encosia.com/2009/04/07/using-complex-types-to-make-calling-services-less-complex/">ASMX ScriptServices even accept their parameters as JSON</a>.</p>
<h3>The ASP.NET AJAX “ScriptService”</h3>
<p>If you’ve created an ASMX service in the past few years, you’ve probably seen this blurb at the beginning of the default template:</p>

<div class="wp_syntax"><div class="code"><pre><span>// To allow this Web Service to be called from script, </span>
<span>//   using ASP.NET AJAX, uncomment the following line. </span>
<span>// [System.Web.Script.Services.ScriptService] </span>
<span>public</span> <span>class</span> WebService <span>:</span> <span>System.<span>Web</span>.<span>Services</span></span>.<span>WebService</span> <span>&#123;</span></pre></div></div>

<p>Since it never explicitly mentions JSON <em>and</em> implies a tight coupling with ASP.NET AJAX, it’s easy to understand why the ScriptService’s true power sometimes goes unnoticed. Thankfully, that attribute does much more than simply expose ASP.NET AJAX specific functionality.</p>
<p>In fact, <strong>the ScriptService attribute enables all of an ASMX service’s methods to respond with raw JSON</strong> if they are requested correctly. For example, these ScriptServices can easily <a href="http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/">send and receive JSON in conjunction with a third party library</a>, without a ScriptManager or MicrosoftAjax.js anywhere to be seen.</p>
<h3>Two simple requirements</h3>
<p>As I alluded to earlier, the one stipulation is that <strong>these ScriptServices only return JSON serialized results if they are requested properly</strong>. Otherwise, even a service marked with the attribute will return XML instead of JSON. I can only assume that’s part of the reason for the misconception that ASMX services cannot respond with JSON.</p>
<p>Scott Guthrie has a great post on <a href="http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx">the specific requirements for coercing JSON out of ScriptServices</a>. To summarize that, requests to the service methods must meet two requirements:</p>
<ul>
<li><strong>Content-Type</strong> – The HTTP request <em>must</em> declare a content-type of application/json. This informs the ScriptService that it will receive its parameters as JSON and that it should respond in kind.</li>
<li><strong>HTTP Method</strong> – By default, the HTTP request must be a POST request. It <em>is</em> possible to circumvent this requirement, but <a href="http://haacked.com/archive/2009/06/25/json-hijacking.aspx">it is advisable to stick with HTTP POST requests when dealing with JSON</a>.</li>
</ul>
<p>That’s it.</p>
<p>As long as those two requirements are satisfied, anything from low-level XMLHttpRequest code, to third-party libraries like jQuery, to ASP.NET AJAX itself are can easily retrieve JSON serialized data from ASMX services.</p>
<p><p>###</p>

<p>Originally posted at <a href="http://encosia.com">Encosia</a>.  If you're reading this elsewhere, come on over and see the original.</p><br><br><a href="http://encosia.com/2010/03/03/asmx-and-json-common-mistakes-and-misconceptions/">ASMX and JSON &ndash; Common mistakes and misconceptions</a></p>
<div class="feedflare">
<a href="http://feeds.encosia.com/~ff/Encosia?a=04bPIUSgr70:bL6rw5F1HYs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Encosia?i=04bPIUSgr70:bL6rw5F1HYs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=04bPIUSgr70:bL6rw5F1HYs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Encosia?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=04bPIUSgr70:bL6rw5F1HYs:aWKiLpGymzw"><img src="http://feeds.feedburner.com/~ff/Encosia?d=aWKiLpGymzw" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=04bPIUSgr70:bL6rw5F1HYs:30RXbuXOgYA"><img src="http://feeds.feedburner.com/~ff/Encosia?d=30RXbuXOgYA" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=04bPIUSgr70:bL6rw5F1HYs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Encosia?i=04bPIUSgr70:bL6rw5F1HYs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=04bPIUSgr70:bL6rw5F1HYs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Encosia?i=04bPIUSgr70:bL6rw5F1HYs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Encosia/~4/04bPIUSgr70" height="1">]]></content:encoded>
			<wfw:commentRss>http://feeds.encosia.com/~r/Encosia/~3/04bPIUSgr70/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
