<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-7252593889317111192</id><updated>2008-12-24T10:42:46.449-08:00</updated><title type="text">Toasted Code</title><subtitle type="html">Just like Grandma used to make.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.toastedcode.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.toastedcode.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>120</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/toastedcode/QdNl" type="application/atom+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftoastedcode%2FQdNl" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftoastedcode%2FQdNl" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftoastedcode%2FQdNl" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/toastedcode/QdNl" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftoastedcode%2FQdNl" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Ftoastedcode%2FQdNl" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftoastedcode%2FQdNl" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Ftoastedcode%2FQdNl" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-7005483594982601605</id><published>2008-12-24T10:42:00.001-08:00</published><updated>2008-12-24T10:42:46.478-08:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-12-24T10:42:46.478-08:00</app:edited><title type="text">ADO.Net Entity Framework – Assembly Not Found Exception</title><content type="html">&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://www.toastedcode.com/2008/12/adonet-entity-framework-assembly-not.html";digg_title = "ADO.Net Entity Framework – Assembly Not Found Exception";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6fb0a649-74e0-42b9-95a0-f08559c7d206" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ADO.Net+Entity+Framework" rel="tag"&gt;ADO.Net Entity Framework&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Debugging" rel="tag"&gt;Debugging&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQLite" rel="tag"&gt;SQLite&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Allow me to share with you the resolution for one of those simple things that should take a few minutes to resolve but ends up taking 3 days.&lt;/p&gt;  &lt;p&gt;I’m using the ADO.Net Entity Framework within &lt;a target="_blank" href="http://www.codetoaster.com/"&gt;Code Toaster&lt;/a&gt;, my template-based code generation tool, to retrieve and store statement completion metadata to a &lt;a target="_blank" href="http://sqlite.phxsoftware.com/"&gt;SQLite&lt;/a&gt; database. SQLite newly supports the Entity Framework Designer from within Visual Studio.Net 2005 and 2008, and all that works wondrously.&lt;/p&gt;  &lt;p&gt;But when I ran my code in the debugger my entity context object’s constructor threw an “Unable to load System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” exception. Oddly enough, the version number was for the .Net 1.0 version of System.Drawing. Code Toaster is 100% .Net 3.5 code (or so I thought), which means the version number should have read 2.0.0.0 (.Net 3.5 is really .Net 2.0 plus some extras, like WCF and WPF).&lt;/p&gt;  &lt;p&gt;I enabled .Net Framework source stepping (an awesome new feature in VS.Net 2008 SP1), and stepped through the actual .Net Framework source code to try and figure out why .Net felt it needed to load the 1.0 version of System.Drawing when establishing a connection to SQLite.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_pq7dluZnkA8/SVKColf9zmI/AAAAAAAAAPQ/_epkOyIBx5k/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_pq7dluZnkA8/SVKCo3QTp2I/AAAAAAAAAPU/mMVaXrmZ2cA/image_thumb%5B2%5D.png?imgmax=800" width="565" height="389" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Enabling .Net Framework source stepping&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;As it turned out, .Net was trying to load lots of assemblies! It appeared as though it was traversing through every assembly I was referencing, as well as every assembly &lt;em&gt;those assemblies&lt;/em&gt; referenced, recursively! Dude.&lt;/p&gt;  &lt;p&gt;I cranked open &lt;a target="_blank" href="http://www.red-gate.com/products/reflector/"&gt;Reflector&lt;/a&gt; and examined every assembly I had explicitly referenced. Sure enough, an assembly from Actipro Software was referencing System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. The next question was – why was the .Net Entity Framework doing this?&lt;/p&gt;  &lt;p&gt;After some more Googling and soul searching, I discovered precisely why. When you add an .edmx model to your project, an Entity Framework connection string is automagically added to your app.config (or web.config, as the case may be). Upon closer inspection, one realizes that this connection string is not like others you may have seen before.&lt;/p&gt;  &lt;p&gt;For one, it includes a metadata section, which looks something like this:&lt;/p&gt;  &lt;p&gt;metadata=res://*/IntellicacheModel.csdl|res://*/IntellicacheModel.ssdl|res://*/IntellicacheModel.msl&lt;/p&gt;  &lt;p&gt;The metadata section is a map that tells .Net where to find these three resources. res://*/ means “search all the assemblies you can find, and don’t stop until you’ve either thrown an exception or found what you’re looking for.” &lt;/p&gt;  &lt;p&gt;I replaced the asterisk with the name of the correct assembly (the one whose project that contained the .edmx model; you can also verify by inspecting your assembly in Reflector for these three resources), and it worked! Eureka!&lt;/p&gt;  &lt;p&gt;I suppose if I had simply &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/cc716756.aspx"&gt;read the documentation&lt;/a&gt; first I could have saved myself some trouble. &lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/494249354" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/7005483594982601605/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=7005483594982601605" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/7005483594982601605?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/7005483594982601605?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/494249354/adonet-entity-framework-assembly-not.html" title="ADO.Net Entity Framework – Assembly Not Found Exception" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/12/adonet-entity-framework-assembly-not.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-5825364363012850831</id><published>2008-12-08T10:31:00.001-08:00</published><updated>2008-12-08T10:31:03.104-08:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-12-08T10:31:03.104-08:00</app:edited><title type="text">Microsoft Installation Troubles</title><content type="html">&lt;p&gt;I cannot install Microsoft Expression Blend 2. If you &lt;a target="_blank" href="http://social.expression.microsoft.com/Search/en-US/?query=Failed%20to%20initialize%20SLDL&amp;amp;ac=8"&gt;look here&lt;/a&gt;, you'll see that lots of other people can't either. The problem seems to occur if you had installed and then uninstalled a pre-release version of Blend - it hoses up future attempts to install later versions. I even read about one dev who just wanted to reinstall the product to try and fix an Intellisense issue, but the installer wouldn't even let him do that.&lt;/p&gt;  &lt;p&gt;I did, however, get it to install in a pristine virtual machine. But lo, I needed to upgrade to Blend 2 SP1 to get the latest Silverlight 2 support. And to do that, I had to install the .Net Framework 3.5 SP1 update.&lt;/p&gt;  &lt;p&gt;The screenshot below shows what happened next. This is the most bizarre frustrating thing. Can you tell what's messed up about this picture?   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_pq7dluZnkA8/ST1n43nSUFI/AAAAAAAAAOw/LzCRpRHaZTE/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://lh6.ggpht.com/_pq7dluZnkA8/ST1n5XpDVxI/AAAAAAAAAO0/DOGyQs4DJHE/image_thumb%5B2%5D.png?imgmax=800" width="533" height="510" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;That's right, the installer is telling me that it can't continue until I close... &lt;em&gt;the installer!&lt;/em&gt;&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/478710927" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/5825364363012850831/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=5825364363012850831" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5825364363012850831?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5825364363012850831?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/478710927/microsoft-installation-troubles.html" title="Microsoft Installation Troubles" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/12/microsoft-installation-troubles.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-6390048821114102638</id><published>2008-11-12T04:58:00.001-08:00</published><updated>2008-11-12T04:58:46.040-08:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-11-12T04:58:46.040-08:00</app:edited><title type="text">Online Charting and Graphing</title><content type="html">&lt;p&gt;If you have a need for powerful web-based charting and graphing with a low learning curve, I highly recommend either of these two solutions.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a target="_blank" href="http://code.google.com/p/flot/"&gt;Flot&lt;/a&gt; - Flot is a 100% javascript-based library built on top of &lt;a target="_blank" href="http://jquery.com/"&gt;jQuery&lt;/a&gt;, and which can generate very nice looking&amp;#160; charts and graphs (with tooltips and such-like). Plays nice with Internet Explorer 6, Google Chrome, Firefox 2.x+, Safari 3.0+, Opera 9.5+ and Konqueror 4.x+, but in my testing &lt;strong&gt;&lt;em&gt;does NOT work with IE 7 OR 8&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;    &lt;li&gt;&lt;a target="_blank" href="http://www.visifire.com/"&gt;Visifire&lt;/a&gt; - Visifire is a great open-source charting platform using Silverlight. Silverlight must be installed on client workstations, but I've had remarkable success using Visifire. The &lt;a target="_blank" href="http://www.visifire.com/silverlight_chart_designer.php"&gt;web-based chart designer&lt;/a&gt; is a great starting point to using this incredibly powerful tool.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Now go wow the boss!&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a9650f4f-1732-4350-bb8d-7a4726bac807" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Visifire" rel="tag"&gt;Visifire&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Charting" rel="tag"&gt;Charting&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Graphing" rel="tag"&gt;Graphing&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Flot" rel="tag"&gt;Flot&lt;/a&gt;,&lt;a href="http://technorati.com/tags/jQuery" rel="tag"&gt;jQuery&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/450667406" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/6390048821114102638/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=6390048821114102638" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/6390048821114102638?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/6390048821114102638?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/450667406/online-charting-and-graphing.html" title="Online Charting and Graphing" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/11/online-charting-and-graphing.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-7762232518802185667</id><published>2008-10-01T05:15:00.001-07:00</published><updated>2008-10-01T05:18:56.896-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-10-01T05:18:56.896-07:00</app:edited><title type="text">Code Toaster AppDomain Magic</title><content type="html">&lt;span xmlns=""&gt;&lt;p&gt;My personal project for almost 4 years now, &lt;a href="http://www.codetoaster.com/"&gt;Code Toaster&lt;/a&gt;, is almost ready to show to the world (again, if you've been following this blog for a while). Code Toaster is an Integrated IDE, and libraries, for rapid creation of developing code generation templates. You can find a lot more information over at &lt;a href="http://www.codetoaster.com/"&gt;http://www.codetoaster.com/&lt;/a&gt;, including documentation, code samples, and video tutorials.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;But in this post, I'd like to take a look at a few of the more difficult architectural challenges I faced when building Code Toaster, all of which were solved by taking advantage (or working around issues with) the .Net Application Domain (aka AppDomain). But first, some background information.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The AppDomain&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;A .Net process consists of one or more Application Domains, which are used to provide code isolation, security, and so forth. Code running in one Application Domain cannot directly invoke code running in another Application Domain, however methods on the AppDomain class make it possible to load a .Net assembly into a new AppDomain, create an instance of a class in that assembly, and invoke its properties and methods.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;AppDomain's are important to Code Toaster for several reasons. The foremost is that, once an assembly is loaded into an AppDomain using Assembly.Load (or one of its associated methods), &lt;strong&gt;the assembly cannot be unloaded from the AppDomain&lt;/strong&gt;. In several cases it's necessary for Code Toaster to temporarily load an assembly to retrieve type (or other) information contained in an assembly, and then unload the assembly to reclaim the memory used.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Scenarios that benefited from using AppDomains&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;In one scenario, Code Toaster loads assemblies in the GAC to determine each assembly's target runtime. Loading every assembly in the GAC into memory could consume roughly 25-50 megabytes of RAM : it's nice to be able to reclaim that memory afterwards.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In another scenario: when Code Toaster compiles a template project into a new assembly, that assembly must be loaded (into &lt;em&gt;some&lt;/em&gt; AppDomain) so that it can be executed. As the developer iteratively modifies, compiles, modifies, and compiles, each time loading a new assembly, memory usage can slowly add up (each compile loads a new assembly). It's nice to be able to reclaim that memory after each compilation.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Another very important scenario occurs when debugging templates. Attaching the Visual Studio debugger to a template executing &lt;em&gt;in Code Toaster's AppDomain&lt;/em&gt; causes the Code Toaster process (codetoaster.exe) to end when the debugger detaches. This is not unique to Code Toaster: the popular &lt;a href="http://www.codesmithtools.com/usersguide/Setting_Breakpoints_with_Debugger.Break().html"&gt;CodeSmith code generation tool suffers from the same problem&lt;/a&gt;. As I was later to discover, executing templates in their own AppDomain causes debugging to operate as desired (detaching the debugger &lt;em&gt;does not&lt;/em&gt; kill the process). &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The figure below shows how Visual Studio attaches to a separate AppDomain within the CodeToaster.exe process, whose purpose is solely to contain and execute templates in isolation. This provides several benefits:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Each time a template is recompiled, the "template execution" AppDomain is unloaded and recreated, reclaiming any memory space used by the previously loaded template assembly.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Debugging works as expected (detaching the Visual Studio debugger from a running template will not crash CodeToaster.exe).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;img alt="" src="http://toastedcode.fileburst.com/blog/100108_1215_CodeToaster1.png" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://toastedcode.fileburst.com/blog/100108_1215_CodeToaster2.png" align="left" /&gt;This was easier said than done. It's one thing to run some code in another AppDomain. It's quite another to load a Type in &lt;strong&gt;AppDomain B&lt;/strong&gt; into a Property Explorer in &lt;strong&gt;AppDomain A&lt;/strong&gt;, and have it appear and work correctly, with the appropriate adornments for UITypeEditors and so forth (see the figure to the left : the template &lt;em&gt;BDC.Sample&lt;/em&gt; is loaded in another AppDomain, but appears correctly in the Template Property Explorer).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In future posts I intend to take a closer look at the code that made all of this come together. For now, I invite you to head on over to &lt;a href="http://www.codetoaster.com/"&gt;http://www.codetoaster.com/&lt;/a&gt; and check out the finest code generation tool ever made!&lt;/p&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/408218079" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/7762232518802185667/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=7762232518802185667" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/7762232518802185667?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/7762232518802185667?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/408218079/code-toaster-appdomain-magic.html" title="Code Toaster AppDomain Magic" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/10/code-toaster-appdomain-magic.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-4978615086363266487</id><published>2008-09-03T04:34:00.001-07:00</published><updated>2008-09-03T04:34:22.317-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-09-03T04:34:22.317-07:00</app:edited><title type="text">Internet Security</title><content type="html">&lt;p&gt;This video from F-Secure corporation provides a great outline of how malware and other virii have evolved over the last decade or so, and why security (in particular browser security) is of critical importance.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:e9ef1d78-bd6b-4f0e-ab77-7ac9f910ef69" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;div&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/zyJ4KM_bv84&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/zyJ4KM_bv84&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;And along those lines, Google Chrome has already been found vulnerable to a &lt;a href="http://blogs.zdnet.com/security/?p=1843" target="_blank"&gt;big nasty security glitch&lt;/a&gt;.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b883d9db-18c2-4756-8951-efc164e88f69" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Internet%20Security" rel="tag"&gt;Internet Security&lt;/a&gt;,&lt;a href="http://technorati.com/tags/F-Secure" rel="tag"&gt;F-Secure&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Google%20Chrome" rel="tag"&gt;Google Chrome&lt;/a&gt;,&lt;a href="http://technorati.com/tags/malware" rel="tag"&gt;malware&lt;/a&gt;,&lt;a href="http://technorati.com/tags/virus" rel="tag"&gt;virus&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/382247498" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/4978615086363266487/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=4978615086363266487" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4978615086363266487?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4978615086363266487?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/382247498/internet-security.html" title="Internet Security" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/09/internet-security.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-4030035419377933006</id><published>2008-09-02T12:59:00.001-07:00</published><updated>2008-09-02T12:59:24.682-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-09-02T12:59:24.682-07:00</app:edited><title type="text">Google Chromium (Chrome)</title><content type="html">&lt;p&gt;I'm sure by now you've heard, and perhaps played with, Google's new free, open-source web browser: &lt;em&gt;&lt;a href="http://code.google.com/chromium/" target="_blank"&gt;Google Chromium&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;If not, well... I've spent the last 30 minutes messin' around. And as far as the overall browser experience, I must confess to not being terribly impressed. The &amp;quot;new tab&amp;quot; feature that keeps track of your favorite sites is pretty cool. And it is lightning fast, except where the &amp;quot;OmniBox&amp;quot; seems to update a little jerkily.&lt;/p&gt;  &lt;p&gt;But the developer tools are a different story. It looks like someone at Google decided to spend a good ol' chunka time making their browser very developer friendly.&lt;/p&gt;  &lt;p&gt;To launch the Chrome &amp;quot;Inspector&amp;quot;, right-click anywhere on a page and click the &lt;em&gt;Inspect Element&lt;/em&gt; menu item. From there, you can browse the DOM, inspect javascript errors, investigate resource problems (broken links, large files), and so much more.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/rmblack/SL2bGei5g3I/AAAAAAAAAJ0/2V8T_duzl2k/s1600-h/image%5B9%5D.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; margin: 0px 0px 0px 20px; border-left: 0px; border-bottom: 0px" height="427" alt="Google Chrome Inspector" src="http://lh4.ggpht.com/rmblack/SL2bG2J71RI/AAAAAAAAAJ4/N0UuP1FwhPY/image_thumb%5B4%5D.png?imgmax=800" width="400" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There's also a nifty-orama javascript debugger. See the screenshot below for an example of Chrome Inspector catching one of my javascript bugs.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; margin: 0px 0px 0px 25px; border-left: 0px; border-bottom: 0px" height="101" alt="Google Chrome Debugger" src="http://lh5.ggpht.com/rmblack/SL2bHAsLOBI/AAAAAAAAAJ8/LiRG9LIZCRw/image%5B4%5D.png?imgmax=800" width="371" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;And then there's the javascript console window, which seems to actually work(!), and comes with a slimmed down and barely there version of Intellisense (but Intellisense no less). I'm very excited about this because it's hard to find a readily available javascript command window that just works. And I've been having issues with FireBug of late.&lt;/p&gt;  &lt;p&gt;Oh yeah, I'm going to have loads of fun with this. If you're a web dev, I encourage you to give it a whirl.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ef9c6f54-5aa4-40d2-b780-1565fe44f3d7" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Google%20Chrome" rel="tag"&gt;Google Chrome&lt;/a&gt;,&lt;a href="http://technorati.com/tags/javascript" rel="tag"&gt;javascript&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DOM" rel="tag"&gt;DOM&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/381656506" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/4030035419377933006/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=4030035419377933006" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4030035419377933006?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4030035419377933006?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/381656506/google-chromium-chrome.html" title="Google Chromium (Chrome)" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/09/google-chromium-chrome.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-6566487501558971945</id><published>2008-08-21T06:54:00.001-07:00</published><updated>2008-08-21T06:54:21.540-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-08-21T06:54:21.540-07:00</app:edited><title type="text">Red Gate purchases Reflector</title><content type="html">&lt;p&gt;&lt;a href="http://www.simple-talk.com/opinion/opinion-pieces/the-future-of-reflector-/" target="_blank"&gt;Red Gate software has purchased&lt;/a&gt;, and take over future development of, &lt;a href="http://www.red-gate.com/products/reflector/" target="_blank"&gt;Lutz Roeder's uber-popular tool&lt;/a&gt;.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Under an agreement announced on Wednesday 20th August , Red Gate will be responsible for the future development of .NET Reflector, the popular tool authored by Lutz Roeder. Red Gate will continue to offer the tool for free to the community.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Is this good news? I'm not sure. Red Gate says they will continue to offer Reflector as a free community-based tool, so it remains to be seen what this really means for .Net coders everywhere. &lt;/p&gt;  &lt;p&gt;Click the link for full article.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4a46fffb-8c6f-4955-a2dd-7f2ca15e9738" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Reflector" rel="tag"&gt;Reflector&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Lutz%20Roeder" rel="tag"&gt;Lutz Roeder&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Red%20Gate" rel="tag"&gt;Red Gate&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/370957720" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/6566487501558971945/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=6566487501558971945" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/6566487501558971945?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/6566487501558971945?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/370957720/red-gate-purchases-reflector.html" title="Red Gate purchases Reflector" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/08/red-gate-purchases-reflector.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-4199802388394074450</id><published>2008-08-15T05:56:00.001-07:00</published><updated>2008-08-15T05:56:00.223-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-08-15T05:56:00.223-07:00</app:edited><title type="text">Keep It Simple...</title><content type="html">&lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;em&gt;Programming is like sex. One mistake and you have to support it for the rest of your life.      &lt;br /&gt;&lt;/em&gt;&lt;strong&gt;~Michael Sinz&lt;/strong&gt; &lt;/blockquote&gt;  &lt;p&gt;I was in the process of reviewing some documentation for a bit of popular legal software my employer purchased a while back, when I stumbled upon an interesting tidbit. I recognized it immediately for what it was, but I'll get into that a bit later.&amp;#160; &lt;br /&gt;    &lt;br /&gt;This particular vendor provides a &lt;a href="http://www.toastedcode.com/2008/08/rest-vs-soap.html" target="_blank"&gt;RESTful&lt;/a&gt; API into their offerings. When invoking several of said API's methods, you can specify, as a parameter, a contactId in either one of two formats, termed &lt;em&gt;Windows&lt;/em&gt; and &lt;em&gt;Web&lt;/em&gt;.     &lt;br /&gt;    &lt;br /&gt;The &lt;strong&gt;Windows &lt;/strong&gt;format looks like this: &lt;em&gt;2/2195&lt;/em&gt;. Essentially two numbers delimited by a slash. Easy enough!     &lt;br /&gt;    &lt;br /&gt;The &lt;strong&gt;Web &lt;/strong&gt;format, on the other hand, looks like this: &lt;em&gt;8589936787&lt;/em&gt;.     &lt;br /&gt;    &lt;br /&gt;So, to call their RESTful findContacts method, I would pass one of these two formats, thusly: &lt;/p&gt;  &lt;blockquote&gt;http://&amp;#8230;/findContacts?contactId=[&lt;em&gt;insert contact id here&lt;/em&gt;] &lt;/blockquote&gt;  &lt;p&gt;Reading further, I discovered that the Web format is actually a fancy calculation computed against the parts of the Windows format, thusly:&lt;/p&gt;  &lt;blockquote&gt;   &lt;ul&gt;     &lt;li&gt;Source ID = 2 &lt;/li&gt;      &lt;li&gt;ID = 2195 &lt;/li&gt;      &lt;li&gt;Web ID = (2 * 2^32) + 2195 &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;The result of that calculation would give us the longer Web format: &lt;b&gt;8589936787&lt;/b&gt;.&lt;/p&gt; According to the documentation, this was recently added as a &amp;quot;feature&amp;quot;, which I suppose could be marketed as &amp;quot;&lt;em&gt;slashless Web Ids&lt;/em&gt;&amp;quot;. But, as far as mine eyes can see, really adds no value to the application.&amp;#160; &lt;br /&gt;  &lt;br /&gt;What it does offer is oodles of &lt;a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity" target="_blank"&gt;cyclomatic complexity&lt;/a&gt;, the extent of which may not be apparent at first glance. Let's take a closer look:   &lt;br /&gt;  &lt;ol&gt;   &lt;li&gt;Following this change, all developers on the project need to be educated that IDs can be input in two different ways. Why do they need to be aware? So that they don't assume that all IDs going forward will contain a slash, and can revise the way they handle ID input. Maybe they need to call a different function to parse IDs. Maybe they don't need to do anything at all. But I'm betting that somebody, somewhere, will either need to send an email about this change, spend an hour discussing it in a meeting, or add it to the project's internal documentation. &lt;/li&gt;    &lt;li&gt;The test cases developed before this change are no longer valid for testing ID input. Now you have to test the case where ID input doesn't contain a slash (the Windows format), as well as the detection of the ID input format (i.e. running different code based on whether the ID contains a slash or not). &lt;/li&gt;    &lt;li&gt;In this case, a new web method was developed, convertDualId, which does the math for any math-challenged developers out there. Something else that needs to be tested. &lt;/li&gt;    &lt;li&gt;The documentation I'm reading contains three (3) HTML (.chm file) pages of documentation on this topic, explaining the difference between the two formats, and how to do the math to calculate the Web Id if you don't want to call the new convertDualId method. All of which needs to be validated, proofread, and so on. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;And all that for... &lt;em&gt;what&lt;/em&gt;? Seriously. To calculate the Web Id, I still need to have the two original slash-delimited values, so what am I gaining? I'll tell you what I'm gaining: &lt;strong&gt;&lt;em&gt;an id that&lt;/em&gt;&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;doesn't contain a slash&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Woop-te-doo.&lt;/p&gt;  &lt;p&gt;If a slash is bothering you that bad, I can think of several other much simpler alternatives. Like, say, just HTML-encoding the thing as &lt;strong&gt;&lt;em&gt;%2F&lt;/em&gt;&lt;/strong&gt;. But of course that wouldn't properly showcase the developer's creativity, virility, and prowess. &lt;/p&gt;  &lt;p&gt;And therefore I must conclude that what this is, in fact, is &lt;a href="http://en.wikipedia.org/wiki/Gold_plating_(disambiguation)" target="_blank"&gt;gold plating&lt;/a&gt; at its finest. An anonymous developer's proud signature, showcasing his unique ability to &lt;em&gt;do maths&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Hardly aware is he that writing code like this is akin to locking a ball and chain around his ankle, forcing him into supporting this unnecessary code until the end of time. Or at least until he realizes what he's done and leaves for unspoiled pastures. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;K&lt;/strong&gt;eep &lt;strong&gt;I&lt;/strong&gt;t &lt;strong&gt;S&lt;/strong&gt;imple, &lt;strong&gt;S&lt;/strong&gt;tupid.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f93d8455-435a-448a-b0b5-d626f9418456" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/cyclomatic%20complexity" rel="tag"&gt;cyclomatic complexity&lt;/a&gt;,&lt;a href="http://technorati.com/tags/REST" rel="tag"&gt;REST&lt;/a&gt;,&lt;a href="http://technorati.com/tags/gold%20plating" rel="tag"&gt;gold plating&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/365652980" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/4199802388394074450/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=4199802388394074450" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4199802388394074450?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4199802388394074450?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/365652980/keep-it-simple.html" title="Keep It Simple..." /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/08/keep-it-simple.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-8789133583807831730</id><published>2008-08-10T18:29:00.001-07:00</published><updated>2008-08-10T18:32:18.390-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-08-10T18:32:18.390-07:00</app:edited><title type="text">xmlns='' was not expected</title><content type="html">&lt;div&gt;If you ever run into this XmlSerializer error: it's thrown because the name of the class being deserialized and the root node are not the same.    &lt;br /&gt;    &lt;br /&gt;For example, if you're deserializing XML that looks something like this...&lt;/div&gt;  &lt;blockquote&gt;   &lt;div&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PersonData&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;FirstName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Bob&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;FirstName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;LastName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Black&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;LastName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;PersonData&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;...into a class called...&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;div&gt;&lt;br /&gt;    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; PersonDataXml&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;...you'll get this error.&lt;br/&gt;&lt;br /&gt;To resolve, just add the XmlRootAttribute to your class, thusly...&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;div&gt;&lt;br /&gt;    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;[XmlRoot( &lt;span style="color: #006080"&gt;&amp;quot;PersonData&amp;quot;&lt;/span&gt; )]&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; PersonDataXml&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Now XmlSerializer won't get all confused.&lt;br /&gt;&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c7ad97d3-97b9-4bbe-bdf1-65e92827de33" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/XmlSerializer" rel="tag"&gt;XmlSerializer&lt;/a&gt;,&lt;a href="http://technorati.com/tags/XmlRootAttribute" rel="tag"&gt;XmlRootAttribute&lt;/a&gt;,&lt;a href="http://technorati.com/tags/xmlns" rel="tag"&gt;xmlns&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/361505140" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/8789133583807831730/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=8789133583807831730" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/8789133583807831730?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/8789133583807831730?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/361505140/xmlns-was-not-expected.html" title="xmlns=&amp;#39;&amp;#39; was not expected" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/08/xmlns-was-not-expected.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-4419916912187545135</id><published>2008-08-08T13:00:00.001-07:00</published><updated>2008-08-08T13:05:48.035-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-08-08T13:05:48.035-07:00</app:edited><title type="text">REST vs. SOAP</title><content type="html">&lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I really hate this darn machine;        &lt;br /&gt;I wish that they would sell it.         &lt;br /&gt;It won't do what I want it to,         &lt;br /&gt;but only what I tell it.&lt;/em&gt;       &lt;br /&gt;~Author Unknown&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;My intent for this post is to be a 5 minute primer on the major differences between REST and SOAP. Of course, &lt;a href="http://www.google.com/search?sourceid=navclient&amp;amp;ie=UTF-8&amp;amp;rlz=1T4DMUS_enUS266US267&amp;amp;q=define%3arestafarian" target="_blank"&gt;some folk&lt;/a&gt; may find a short post inadequate to discuss this particular topic, but hopefully many of you will find this helpful in some way. Before we get started, I'd like to point out that there are many alternatives to these two technologies that won't get discussed here, including (but not limited to) &lt;a href="http://en.wikipedia.org/wiki/Binary_XML" target="_blank"&gt;Binary XML&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Distributed_Component_Object_Model" target="_blank"&gt;DCOM&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/CORBA" target="_blank"&gt;CORBA&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Internet_Communications_Engine" target="_blank"&gt;ICE&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/.Net_Remoting" target="_blank"&gt;.Net Remoting&lt;/a&gt;, etc, each of which have their own unique advantages and disadvantages. REST and SOAP, however, are likely the more well-known and &lt;em&gt;more accessible &lt;/em&gt;(i.e. easy to pick up).&lt;/p&gt;  &lt;h3&gt;A look at SOAP&lt;/h3&gt;  &lt;p&gt;The acronym SOAP was originally defined as Simple Object Access Protocol, but as of version 1.2 of the standard that meaning was dropped in favor of the (allegedly) more accurate &lt;strong&gt;Service Oriented Architecture Protocol&lt;/strong&gt;. SOAP is an XML based protocol which provides for the passing of messages over a network, from computer to computer. In my humble opinion, the original acronym provides a more accurate description of its use today as &lt;strong&gt;an IT Enterprise solution for object transfer&lt;/strong&gt;. But for the purest out there, allow me to clarify that &lt;strong&gt;SOAP does not pass objects over the wire&lt;/strong&gt;, but messages.&lt;/p&gt;  &lt;p&gt;Here's a sample SOAP request (&amp;quot;borrowed&amp;quot; from &lt;a href="http://www.w3schools.com/SOAP/soap_example.asp" target="_blank"&gt;w3schools.com&lt;/a&gt;), which requests the current stock price for ticker symbol IBM:&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;?&amp;gt;      &lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Envelope      &lt;br /&gt;&lt;/span&gt;&lt;span style="color: red"&gt;xmlns:soap&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;http://www.w3.org/2001/12/soap-envelope&lt;/span&gt;&amp;quot;     &lt;br /&gt;&lt;span style="color: red"&gt;soap:encodingStyle&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;http://www.w3.org/2001/12/soap-encoding&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Body&lt;/span&gt;&lt;span style="color: red"&gt;xmlns:m&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;http://www.example.org/stock&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:GetStockPrice&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:StockName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;IBM&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:StockName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:GetStockPrice&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Envelope&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;p&gt;And the response would look something like this:&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;?&amp;gt;      &lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Envelope      &lt;br /&gt;&lt;/span&gt;&lt;span style="color: red"&gt;xmlns:soap&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;http://www.w3.org/2001/12/soap-envelope&lt;/span&gt;&amp;quot;     &lt;br /&gt;&lt;span style="color: red"&gt;soap:encodingStyle&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;http://www.w3.org/2001/12/soap-encoding&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Body&lt;/span&gt;&lt;span style="color: red"&gt;xmlns:m&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;http://www.example.org/stock&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:GetStockPriceResponse&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:Price&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;34.5&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:Price&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;m:GetStockPriceResponse&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;soap:Envelope&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;SOAP is obviously very verbose. But &lt;strong&gt;it's approach is also very object-oriented&lt;/strong&gt;, which makes it &lt;strong&gt;easy for most object-oriented developers to wrap their brains around&lt;/strong&gt;. A SOAP service could be considered an object, which contains several methods that can be invoked, or properties that describe the object. If we used .Net to create a proxy class to call this web service, the C# code to invoke the GetStockPrice method might be something like this...&lt;/p&gt;  &lt;div&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;StockService service = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StockService();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;float&lt;/span&gt; currentStockPrice = service.GetStockPriceResponse();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Current stock price: {0}&amp;quot;&lt;/span&gt;, currentStockPrice);&lt;/pre&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;I'm using .Net here mainly to illustrate my point, which is that &lt;strong&gt;calling a web service looks and feels very object oriented&lt;/strong&gt;. Even though we're&lt;em&gt; not actually passing objects over the wire&lt;/em&gt;, it feels like we are, and so it's easy to work with.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;A look at Representational State Transfer (REST)&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;In its most basic form, a RESTful service is &amp;quot;just&amp;quot; a URL that provides access to a resource. For example, a RESTful URL to get Apple's latest stock price might look something like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://URI/CurrentStockPrice/AAPL/"&gt;http://URI/CurrentStockPrice/AAPL/&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Or maybe like this:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://URI/CurrentStockPrice?AAPL"&gt;http://URI/CurrentStockPrice?AAPL&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The World Wide Web is the most oft-cited example of RESTful design. Web pages support POST, GET, PUT, and DELETE, often used by RESTful applications to retrieve or modify data. Some RESTful applications add their own HTTP methods, such as &lt;a href="http://en.wikipedia.org/wiki/WebDAV" target="_blank"&gt;WebDav&lt;/a&gt;, which adds PROFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, and UNLOCK.&lt;/p&gt;&lt;p&gt;REST is very intuitive for GET operations, and is a popular architectural choice for services on the public Internet. For example, &lt;a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?RESTAuthentication.html" target="_blank"&gt;Amazon&lt;/a&gt; and &lt;a href="http://code.google.com/apis/ajaxsearch/documentation/" target="_blank"&gt;Google&lt;/a&gt; both provide RESTful interfaces to their APIs, and according to Jeff Barr, Amazon's chief web services evangelist, &lt;a href="http://www.oreillynet.com/pub/wlg/3005" target="_blank"&gt;85% of developers prefer Amazon's REST&lt;/a&gt; interfaces over their SOAP counterparts (Amazon provides both).&lt;/p&gt;&lt;p&gt;SOAP seems to be more easily adopted by the Enterprise, while REST is a natural fit for publicly facing Internet applications, in particular those applications where most operations are retrieving data (versus writing/posting/updating data). For example, XML results from a RESTful service &lt;em&gt;seem&lt;/em&gt; more conducive to formatting with XSLT, simply because of the absence of the &amp;quot;extra&amp;quot; SOAP XML. &lt;/p&gt;&lt;p&gt;An RSS feed is a great example of a RESTful interface. I just point my favorite news reader to an RSS URI, and it's easily consumed. I can save the feed results to an XML file and easily convert it to XML using an XSL style sheet. &lt;strong&gt;REST is a data consumer friendly interface&lt;/strong&gt;.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Which is Best?&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Is one &lt;em&gt;better&lt;/em&gt; than the other? I would say: hardly. That would be rather like choosing VB.Net over C#. Many developers may prefer one over the other, but you can get the job done using either tool. &lt;/p&gt;&lt;p&gt;On the flip side, I might recommend considering the desired feel of your application's API when choosing betwixt these two technology choices. Consider SOAP's object-oriented&lt;em&gt;ness&lt;/em&gt; vs. REST's web request based feel, and how each might impact adoption of your API.&lt;/p&gt;&lt;p&gt;Or, if you're using a technology like Microsoft's &lt;strong&gt;Windows Communication Foundation&lt;/strong&gt;, which provides built-in support for both SOAP &lt;em&gt;and&lt;/em&gt; REST, you won't have to choose at all.&lt;/p&gt;&lt;p&gt;But at least you'll know the difference.&lt;/p&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:be7c3ccb-4c33-4268-8930-2c89f16089aa" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SOAP" rel="tag"&gt;SOAP&lt;/a&gt;,&lt;a href="http://technorati.com/tags/REST" rel="tag"&gt;REST&lt;/a&gt;,&lt;a href="http://technorati.com/tags/WCF" rel="tag"&gt;WCF&lt;/a&gt;,&lt;a href="http://technorati.com/tags/API" rel="tag"&gt;API&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/359740084" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/4419916912187545135/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=4419916912187545135" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4419916912187545135?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4419916912187545135?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/359740084/rest-vs-soap.html" title="REST vs. SOAP" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/08/rest-vs-soap.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-514544707610436014</id><published>2008-08-04T06:19:00.001-07:00</published><updated>2008-08-04T06:19:50.593-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-08-04T06:19:50.593-07:00</app:edited><title type="text">Twitterpated</title><content type="html">&lt;p&gt;I done did it. I went and &lt;a href="http://twitter.com/codetoaster" target="_blank"&gt;got me an account on Twitter&lt;/a&gt;. I thought I'd give it a try and see what comes of it, what with all the hullabaloo about how wonderful it is. I suppose it was bound to happen sooner or later.&lt;/p&gt;  &lt;p&gt;And so I submit to you this segment from &lt;em&gt;Bambi&lt;/em&gt;, which I think sums up Twitter's &lt;em&gt;Twitterpatedness&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;Resistance is futile.&lt;/p&gt;  &lt;p&gt;&lt;embed src="http://www.youtube.com/v/JXBbgzQmpJw&amp;amp;hl=en&amp;amp;fs=1" width="425" height="344" type="application/x-shockwave-flash" allowfullscreen="true" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c83dc06c-872d-475b-a064-2076af6e6453" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Twitter" rel="tag"&gt;Twitter&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Bambi" rel="tag"&gt;Bambi&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Twitterpated" rel="tag"&gt;Twitterpated&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/355346105" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/514544707610436014/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=514544707610436014" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/514544707610436014?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/514544707610436014?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/355346105/twitterpated.html" title="Twitterpated" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/08/twitterpated.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-3224956384597920375</id><published>2008-07-31T04:54:00.001-07:00</published><updated>2008-07-31T04:54:45.949-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-07-31T04:54:45.949-07:00</app:edited><title type="text">IE 8 Seeking Beta Testers</title><content type="html">&lt;p&gt;But becoming a beta tester apparently requires writing an essay. &lt;/p&gt;  &lt;p&gt;According to Allison Burnett's (Program Manager) &lt;a href="http://blogs.msdn.com/ie/archive/2008/07/30/wanted-ie8-beta-testers.aspx" target="_blank"&gt;latest post on the IE8 blog&lt;/a&gt;,&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Currently the only way to directly file a bug with the IE Team is to be a part of the IE8 Technical Beta program on &lt;/em&gt;&lt;a href="http://www.connect.microsoft.com/"&gt;&lt;em&gt;Microsoft Connect&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. Beta 2 is right around the corner and we are expanding our reach!&amp;#160; If you wish to be a part of making IE better by contributing great bug reports then please email us at &lt;/em&gt;&lt;a href="mailto:IESO@microsoft.com"&gt;&lt;em&gt;IESO@microsoft.com&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and tell us a little about yourself including why you&amp;#8217;d be a great beta tester.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;An essay? You mean I have to &lt;em&gt;sell myself&lt;/em&gt; as a worthy tester before I can submit a bug?&lt;/p&gt;  &lt;p&gt;Judging by the comments she's getting, I'm not the only one that sees this as a mite odd...&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Maybe more people would participate if:&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;a.) You allow users to download/view attachments so they can test bugs.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;b.) You gave them feedback to indicate which bugs are being fixed, and when they are fixed.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;c.) The current beta didn't have such a horrible auto-scrolling issue.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;d.) MSFT made some sort of declaration that IE Feedback would actually be around after the IE8 RTM.&amp;#160; The fact that this was shut down after IE7 went RTM&amp;#160; ***LOST*** most of your loyal contributors.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;...and...&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I am not writing an essay on why I'd be a great tester.&amp;#160; You want/need more testers upload a current complied working build and the bug report tool in one place.&amp;#160; Let the web both see and use it.&amp;#160; Most of us have had terrible experiences so far with Beta 1 so perhaps it's time to release a Beta 2.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;... and also...&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Why, on earth, when other browser developers provide open and easy to use bug systems, would Microsoft limit itself in this way?&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;I have a bug in Webkit, five minutes can help me determine if someone had already reported the bug; no more than another five to submit the bug, with test case. &lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Mozilla created software to make it easy to search on, and submit bugs. Why, I bet even you all could use it.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Opera has a handy, dandy bug form that makes bug submission a snap.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;And here is the IE team &amp;quot;If you email us and ask us really nice we may, just may, mind you, deign to let you actually tell us about that bug, which if left in the released product will haunt us until the end of time. If you don't ask nice, you can stuff your bug.&amp;quot;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;...and...&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Dear Allison Burnett,&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;I've been a software engineer for 10 years and I'm taken back by why we need to provide reasons as to why we want to be great beta testers for a product that's on the decline in the web browser market. I expect this from a would be employer. I'm all for a better IE but this is not the best effort in gaining interest that Microsoft so dearly needs. You need to do more than just offer invitation to other beta programs.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;...and so on. I think one commenter had Microsoft's thought process pegged on this one. That if you allow everyone to post bugs, and some of them don't get fixed, it might make them look bad.&lt;/p&gt;  &lt;p&gt;And I'll just leave you with that.&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/351474696" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/3224956384597920375/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=3224956384597920375" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/3224956384597920375?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/3224956384597920375?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/351474696/ie-8-seeking-beta-testers.html" title="IE 8 Seeking Beta Testers" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/07/ie-8-seeking-beta-testers.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-8843586138012323898</id><published>2008-07-28T11:06:00.001-07:00</published><updated>2008-07-28T11:12:18.440-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-07-28T11:12:18.440-07:00</app:edited><title type="text">LINQ Over Interwoven</title><content type="html">&lt;p&gt;Here at the large, International law firm in which I'm employed, we use Interwoven as our document management system (DMS) of choice. We've found it advantageous to expose a slice here and a slice there of Interwoven functionality via web service API's, which has become all the more easier using C# 3.0's new language improvements. &lt;/p&gt;  &lt;p&gt;Allow me to demonstrate:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Extension Methods&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If we want to use LINQ to enumerate over Interwoven's COM-based collections we need a way to easily convert them into an IEnumerable (or IQueryable). Extension method provide us with an elegant way of extending the Interwoven API so that it &lt;em&gt;appears&lt;/em&gt; to give us IEnumerable access to its collections.&lt;/p&gt;  &lt;p&gt;Here's a sample extension method for converting an IManage.IManFolders collection into an IEnumerable.&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 102.8%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; height: 210px; background-color: #f4f4f4"&gt;   &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 89.26%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; height: 208px; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; IEnumerable&amp;lt;IManage.IManFolder&amp;gt; ToIEnumerable(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt; IManage.IManFolders folders)&lt;br /&gt;{&lt;br /&gt;    List&amp;lt;IManage.IManFolder&amp;gt; list = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;IManFolder&amp;gt;(folders.Count);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (IManFolder folder &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; folders)&lt;br /&gt;    {&lt;br /&gt;        list.Add(folder);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    list.TrimExcess();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; list.AsEnumerable();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;To really get a sense of how this makes our lives much easier as developers, let's just dive right into...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;LINQ over XML&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you haven't played with LINQ over XML yet, allow me to demonstrate a smidgen of its power. This next block of code will recursively build a nested (and correctly indented) block of XML containing an Interwoven folder and all of it's child folders (using the extension method we created above).&lt;/p&gt;&lt;br /&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 101.63%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; height: 196px; background-color: #f4f4f4"&gt;&lt;br /&gt;  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 88.81%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; height: 176px; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; XElement GetFolderAsXElement(IManFolder folder)&lt;br /&gt;{   &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XElement(&lt;span style="color: #006080"&gt;&amp;quot;IManFolder&amp;quot;&lt;/span&gt;,&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XAttribute(&lt;span style="color: #006080"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;, folder.Name),&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XAttribute(&lt;span style="color: #006080"&gt;&amp;quot;NrtId&amp;quot;&lt;/span&gt;, folder.ObjectID),&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XAttribute(&lt;span style="color: #006080"&gt;&amp;quot;ObjectType&amp;quot;&lt;/span&gt;, folder.ObjectType),&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XAttribute(&lt;span style="color: #006080"&gt;&amp;quot;FolderType&amp;quot;&lt;/span&gt;, folder.ObjectType),&lt;br /&gt;                from IManFolder subFolder &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; folder.SubFolders.ToIEnumerable()&lt;br /&gt;                select GetFolderAsXElement(subFolder)&lt;br /&gt;        );&lt;br /&gt;}  &lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The beauty of the new .Net 3.5 XML classes (XElement, XDoc, XAttribute, et al), is in its readability. Anyone can take one look at that code and instantly understand the structure of the XML that's being created. And if you're paying close attention, you'll note that all the work being done in that function was succinctly described in &lt;em&gt;only one statement&lt;/em&gt;!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I've heard many developers express concern over their coworkers and comrades going all rogue with these new features, particularly extension methods. But here, I think is an example where the new language features actually improve our code, and enable us to do what otherwise would have taken much longer.&lt;/p&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:85e8d325-4fb2-45a5-b7a7-9ff25aebffcd" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Interwoven" rel="tag"&gt;Interwoven&lt;/a&gt;,&lt;a href="http://technorati.com/tags/LINQ" rel="tag"&gt;LINQ&lt;/a&gt;,&lt;a href="http://technorati.com/tags/XML" rel="tag"&gt;XML&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Extension%20Methods" rel="tag"&gt;Extension Methods&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DMS" rel="tag"&gt;DMS&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/348640849" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/8843586138012323898/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=8843586138012323898" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/8843586138012323898?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/8843586138012323898?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/348640849/linq-over-interwoven.html" title="LINQ Over Interwoven" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/07/linq-over-interwoven.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-1758861010764269539</id><published>2008-06-16T09:09:00.001-07:00</published><updated>2008-06-16T09:09:40.665-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-06-16T09:09:40.665-07:00</app:edited><title type="text">No Developers for Windows Vista?</title><content type="html">&lt;p&gt;&lt;a href="http://news.cnet.com/8301-13505_3-9969231-16.html" target="_blank"&gt;This CNET.com article&lt;/a&gt; (well, actually &lt;a href="http://www.evansdata.com/press/viewRelease.php?pressID=135" target="_blank"&gt;this report&lt;/a&gt; from Evans Data {login required}) implicates Windows Vista as not having a huge developer following. Which would be a little worrisome (for Microsoft) if true, as they have a history of providing fantastic developer support, yadda yadda.&lt;/p&gt;  &lt;p&gt;But &lt;em&gt;is it&lt;/em&gt; true?&lt;/p&gt;  &lt;p&gt;First off, how would a developer write an application &lt;em&gt;for&lt;/em&gt; Windows Vista? Unless you're writing device drivers or &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa663326.aspx" target="_blank"&gt;WPF&lt;/a&gt;-heavy applications (note that &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa663326.aspx" target="_blank"&gt;WPF&lt;/a&gt; also runs on XP after installing an update), I would find it difficult to write an application that didn't run equally well on Windows XP, or even Windows 2000.&lt;/p&gt;  &lt;p&gt;I'm guessing (sorry, I don't have any charts and graphs eye candy) that most Windows-based LOB applications are developed against the .Net Framework, or are at least moving in that direction. DotNet applications Just-In-Time compile to run on the target platform (be it 32-bit or 64-bit, or even Linux or Mac OS), so it matters little what OS version you're running.&lt;/p&gt;  &lt;p&gt;But if I &lt;em&gt;could&lt;/em&gt; write a Vista targeted application, &lt;strong&gt;wouldn't that be a little stupid&lt;/strong&gt;? Why would I limit my customer base to only Vista? Especially with all the bad press it's been getting lately.&lt;/p&gt;  &lt;p&gt;I suspect Evans Data accurately surveyed the developer community, which accurately reported back that no, they're not writing applications &lt;em&gt;for&lt;/em&gt; Windows Vista. But I submit that the results were a bit misconstrued. &lt;/p&gt;  &lt;p&gt;But hey, maybe I'm way off base here, and totally clueless, so feel free to let me know in the comments!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5ad72314-37c1-4cce-8b32-6922215076f2" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Windows" rel="tag"&gt;Windows&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Vista" rel="tag"&gt;Vista&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Developers" rel="tag"&gt;Developers&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Microsoft" rel="tag"&gt;Microsoft&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/313127334" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/1758861010764269539/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=1758861010764269539" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/1758861010764269539?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/1758861010764269539?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/313127334/no-developers-for-windows-vista.html" title="No Developers for Windows Vista?" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/06/no-developers-for-windows-vista.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-5418416296247041787</id><published>2008-06-13T11:50:00.001-07:00</published><updated>2008-06-13T11:50:48.280-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-06-13T11:50:48.280-07:00</app:edited><title type="text">System.Diagnostics.Stopwatch</title><content type="html">&lt;p&gt;I've noticed in a few forums here and there that, when gathering performance data, many developers often compare two System.DateTime objects (a &lt;em&gt;before&lt;/em&gt; and an &lt;em&gt;after&lt;/em&gt; object) to measure time-based performance stats. This works fine, but there's a much better way provided by the Stopwatch class in the System.Diagnostics namespace.&lt;/p&gt;  &lt;p&gt;The Stopwatch class, believe it or not, works just like a real stopwatch. It has a method called &lt;strong&gt;Start()&lt;/strong&gt;, a method called &lt;strong&gt;Stop()&lt;/strong&gt;, and a few properties, &lt;strong&gt;Elapsed&lt;/strong&gt; (which returns a TimeSpan) and &lt;strong&gt;EllapsedMilliseconds&lt;/strong&gt; (which returns a long), that give you easy access to how long it took for your code to run. To start measuring performance you call the Start() method, and when your code is done doing what you want to measure, call Stop(). Then spit out the EllapsedMilliseconds somewhere convenient, maybe using a &lt;a href="http://blogs.msdn.com/saraford/archive/2008/06/13/did-you-know-you-can-use-tracepoints-to-log-printf-or-console-writeline-info-without-editing-your-code-237.aspx" target="_blank"&gt;Tracepoint&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If your hardware and OS support a high-resolution performance counter, Stopwatch will use that, otherwise it measures time using the system timer. You can check if you high-res performance measurement is available using the &lt;strong&gt;IsHighResolution&lt;/strong&gt; property.&lt;/p&gt;  &lt;p&gt;Sample code is readily available in MSDN offline and &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx" target="_blank"&gt;online documentation&lt;/a&gt;.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:734a3303-dd37-4008-bdd2-132f8285ed97" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Stopwatch" rel="tag"&gt;Stopwatch&lt;/a&gt;,&lt;a href="http://technorati.com/tags/.Net%20Performance" rel="tag"&gt;.Net Performance&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Tracepoint" rel="tag"&gt;Tracepoint&lt;/a&gt;,&lt;a href="http://technorati.com/tags/System.Diagnostics" rel="tag"&gt;System.Diagnostics&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/311386276" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/5418416296247041787/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=5418416296247041787" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5418416296247041787?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5418416296247041787?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/311386276/systemdiagnosticsstopwatch.html" title="System.Diagnostics.Stopwatch" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/06/systemdiagnosticsstopwatch.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-8684663151718758921</id><published>2008-06-12T05:46:00.001-07:00</published><updated>2008-06-12T05:46:18.672-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-06-12T05:46:18.672-07:00</app:edited><title type="text">Supporting IE 8</title><content type="html">&lt;p&gt;Bill Gates announced during his Tech Ed keynote in Orlando last week that IE 8 Beta 2 would be released this August. You may already be aware that Microsoft has decided to release the final version of IE 8 &lt;strong&gt;with standards-compliant mode enabled&lt;/strong&gt;, which &lt;em&gt;will&lt;/em&gt; break many sites that assume that Internet Explorer is not a standards compliant browser.&lt;/p&gt;  &lt;p&gt;To make it easy for sites to support IE 8 while retaining backward compatibility, Microsoft is introducing a few compatibility features.&lt;/p&gt;  &lt;p&gt;A meta tag that will enable IE 7 mode on a &lt;strong&gt;per page basis &lt;/strong&gt;(note that &lt;strong&gt;this is already available in Beta 1&lt;/strong&gt;). This meta tag must be placed within a page's &amp;lt;HEAD&amp;gt; tags, thusly:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;meta http-equiv=&amp;quot;X-UA-Compatible&amp;quot; content=&amp;quot;IE=EmulateIE7&amp;quot; /&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Other browsers will of course ignore this tag.&lt;/p&gt;  &lt;p&gt;If you want to enable IE 7 layout for &lt;strong&gt;an entire site&lt;/strong&gt;, you can add a custom header (this will be available in Beta 2 this August):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;X-UA-Compatible: IE=EmulateIE7&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;When IE 8 detects either the site header or the meta tag, it will then look at each document's DOCTYPE to determine whether to render the page in IE 7 Quirks or IE 7 Standards mode.&lt;/p&gt;  &lt;p&gt;One migration strategy would be to add the site-wide EmulateIE7 header, and add the meta tag with content=&amp;quot;IE8&amp;quot; to pages as they are modified to support IE 8's standards-compliant layout mode. &lt;/p&gt;  &lt;p&gt;For more information on adding custom headers on various versions of IIS and Apache, notes about detecting different browser versions, and more, I refer you to &lt;a href="http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx" target="_blank"&gt;the Internet Explorer blog on MSDN&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9306e94c-53f5-4a32-bc2f-7a35d30ed2c7" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/IE%208" rel="tag"&gt;IE 8&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IE%20Standards" rel="tag"&gt;IE Standards&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/310382927" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/8684663151718758921/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=8684663151718758921" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/8684663151718758921?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/8684663151718758921?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/310382927/supporting-ie-8.html" title="Supporting IE 8" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/06/supporting-ie-8.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-4063893255614716685</id><published>2008-06-11T13:29:00.001-07:00</published><updated>2008-06-11T13:29:21.191-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-06-11T13:29:21.191-07:00</app:edited><title type="text">Touching Windows 7</title><content type="html">&lt;p&gt;&lt;/p&gt;  &lt;p&gt;Bill Gates and Steve Ballmer gave a recent demo of the new Windows 7 user interface at the D6 executive conference this year. Or at least the touchy, feely bits. Check out the YouTube vid below for a look (warning: this video is eerily silent until the last few seconds, for some inexplicable reason).&lt;/p&gt;  &lt;p&gt;&lt;embed src="http://www.youtube.com/v/f8QqlW2HaE8&amp;amp;hl=en" width="425" height="344" type="application/x-shockwave-flash" wmode="transparent" /&gt;&lt;/p&gt;  &lt;p&gt;Very nice and all, but this seems to violate the &lt;a href="http://www.codinghorror.com/blog/archives/001115.html" target="_blank"&gt;don't touch my monitor&lt;/a&gt; directive that many people (including myself) are quite passionate about. &lt;a href="http://mcsdeveloper.wordpress.com/" target="_blank"&gt;My&amp;#160; brother&lt;/a&gt; in particular is fanatical about keeping dirty fingers away from his monitor.&lt;/p&gt;  &lt;p&gt;Which just makes sense. Who wants to write code through a thin layer of greasy smears? Or look at pictures, browse the web, play games, or pretty much &lt;em&gt;anything&lt;/em&gt;?&lt;/p&gt;  &lt;p&gt;So, maybe I just don't get it, but not sure this feature would see much mileage on my desktop.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:50e25c0d-3c35-485c-94d9-b80e095bff67" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Windows%207" rel="tag"&gt;Windows 7&lt;/a&gt;&lt;/div&gt;  &lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/309882449" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/4063893255614716685/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=4063893255614716685" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4063893255614716685?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/4063893255614716685?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/309882449/touching-windows-7.html" title="Touching Windows 7" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/06/touching-windows-7.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-5635688177945442675</id><published>2008-06-11T12:35:00.001-07:00</published><updated>2008-06-11T12:36:29.191-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-06-11T12:36:29.191-07:00</app:edited><title type="text">SQL Server 2008 Feature Highlights</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;I just got back from Tech Ed 2008 in Orlando, FL, last week, and, having drunk deeply from the pool of Microsoft Kool-Aid, am full of exciting tidbits. I attended several sessions that revolved around some of the new stuff that will be part of SQL Server 2008 (&lt;strong&gt;due for release around Q3 of 2008&lt;/strong&gt;), which I'd like to discuss in this post. Keep in mind this is a broad overview (with links to resources for a closer look), smattered with some key insights I garnered from a few of the Tech Ed speakers.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So without further ado, let's dive right in.&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Data Compression&lt;br /&gt;&lt;/h5&gt;&lt;p&gt;This isn't compression in the traditional sense – SQL Server 2008 won't be ZIP compressing and uncompressing your data on the fly, or anything like that, it will just be way smarter when it comes to storing data compactly. One way it will accomplish this is using variable length data types, which &lt;strong&gt;allows SQL Server to use&lt;/strong&gt;&lt;br /&gt;				&lt;strong&gt;only the bytes necessary&lt;/strong&gt; instead of reserving unused bytes just because you declared (for example) a column as char(20) and only used two characters.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SQL Server 2008 can also maintain PAGE or ROW level references to duplicate data. For example, if several columns in a ROW contain the same default values, SQL Server will store the value once, and refer back to that stored value when it's used again in that same ROW or PAGE. This is a setting you can turn on or off, as necessary.&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Sparse Columns&lt;br /&gt;&lt;/h5&gt;&lt;p&gt;&lt;strong&gt;Entity-Attribute-Value (EAV)&lt;/strong&gt; is a "popular" way of storing data that (supposedly) can't be modeled. An EAV table is generally comprised of two columns, NAME and VALUE, the latter of which is typed as either nvarchar or sql variant so that anything can be dumped into it, rather like a &lt;strong&gt;property bag&lt;/strong&gt;. Yes, this solution does indeed have the appearance of nastiness, but ever so often you run into a situation where some database entities will have properties that no other entities share. And EAV is a common way of modeling that scenario.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Enter sparse columns: SQL Server 2008 allows you to designate a column as &lt;strong&gt;sparse&lt;/strong&gt;, which means if its value is NULL it won't consume any space on disk. The idea behind sparse columns is that they will be NULL &lt;em&gt;most of the time&lt;/em&gt;, and so won't consume physical space, allowing SQL Server 2008 to support up to &lt;strong&gt;&lt;em&gt;30,000 columns&lt;/em&gt;&lt;/strong&gt;! That nasty EAV table can now be turned into a super-wide table of strongly typed sparse columns.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;But that's not all! Sparse columns can be combined into a &lt;strong&gt;column set&lt;/strong&gt; that allows you to return all sparse columns &lt;em&gt;together&lt;/em&gt; as one XML column. Even better, any sparse columns with NULL values won't be included in the XML column, which helps keep things nice, simple, and manageable, which is important when you're working with a 30,000 column table.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;There are some downsides to sparse columns, namely performance related. They also take up a tad &lt;em&gt;more&lt;/em&gt; space when they're non-NULL than other column types.&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Spatial data&lt;br /&gt;&lt;/h5&gt;&lt;p&gt;SQL Server 2008 will include new spatial types (GEOMETRY and GEOGRAPHY), along with new functions for performing spatial calculations, such as how far one location is from another and so forth. The difference between the two data types is simple: GEOMETRY is flat, GEOGRAPHY is ellipsoidal. Think of GEOMETRY as a way to represent points on the Cartesian Coordinate System, or maybe to model a warehouse floor plan, whereas GEOGRAPHY can represent real-world geographical locations on the spherical world we live on. Which isn't flat, but you knew that, right?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;These data types are abstract, in the sense that a column defined as GEOMETRY can store a Point, a Curve, a MultiPolygon or any of several types that "inherit" from GEOMETRY. For more information on how this works, check out Jason Follas' &lt;a target='_blank' href='http://jasonfollas.com/blog/archive/2008/03/27/sql-server-2008-spatial-data-part-2.aspx'&gt;excellent blog post on spatial types&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Someone in one of the Tech-Ed sessions mentioned that SQL Server Management Studio will include a new results pane view for displaying spatial type results, but I haven't yet had a chance to see that for myself.&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;The HierarchyID Datatype&lt;br /&gt;&lt;/h5&gt;&lt;p&gt;The new &lt;a target='_blank' href='http://msdn.microsoft.com/en-us/library/bb677290(SQL.100).aspx'&gt;HierarchyID&lt;/a&gt; data type provides a compact and "easy" way to model a tree, which in the past had to be modeled using several tables. Now you can model a tree using only one column.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Behind the scenes, &lt;strong&gt;the HierarchyID type borrows a lot of its functionality from the XML type&lt;/strong&gt;, XML having a tree-like internal representation (every node has a single parent and none or more children). It's important to note that the HierarchyID type doesn't completely remove all the effort from the developer – application logic is still necessary to maintain the integrity of the tree. Nothing is stopping you, for example, from inserting an "orphan" node that doesn't have a parent, which in some cases might fit into your application's design goals.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The benefits of using the HierarchyID type (over modeling your own tree representation) are many:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The HierarchyID type is very compact. According to &lt;a href='http://msdn.microsoft.com/en-us/library/bb677290(SQL.100).aspx'&gt;MSDN&lt;/a&gt;, a node in an organization hierarchy with 100,000 people with an average fanout of 6 levels takes about 38 bits, which would be rounded up to 5 bytes for storage.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Comparison is in depth-first order (you can change this in SQL, if desired), but in a nutshell in means you don't have to implement your own custom sorting logic – SQL Server will sort your tree correctly when it's queried.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Support for arbitrary insertions and deletions, which means you don't have to write any fancy tree-balancing logic or whatnot, and you can easily insert nodes pretty much anywhere in the tree.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;A potential downside to the HierarchyID type is that it can't handle truly ginormous trees, &lt;strong&gt;where the size of the HierarchyID value would exceed 892 bytes&lt;/strong&gt;. Given the above example of a 100,000 node tree consuming 5 bytes, I'm guesstimating that the HierarchyID could support trees &lt;strong&gt;of up to 17 million nodes&lt;/strong&gt;, which should be more than adequate for most scenarios.&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;FILESTREAM&lt;br /&gt;&lt;/h5&gt;&lt;p&gt;In past versions of SQL Server, storing files was problematic. You either had to &lt;strong&gt;store files on a file server&lt;/strong&gt;, and save a reference to each file in SQL Server (which meant files weren't included in database backups, introduced the potential for files to be modified outside of SQL transactions, etc, but was faster than storing the files inside SQL Server), or &lt;strong&gt;suck files into SQL Server as BLOBS&lt;/strong&gt; (which had performance implications, and was a bit more complicated to retrieve files that just opening a file from disk).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now SQL Server 2008 brilliantly offers a third option: storing files on disk while retaining the transactional context that SQL Server provides. To store a BLOB as a FILESTREAM, you must first set up a filegroup for BLOB storage. Any BLOBS written to the filegroup are &lt;strong&gt;included in database backups&lt;/strong&gt;, and &lt;strong&gt;participate in SQL transactions&lt;/strong&gt;, but &lt;strong&gt;are not stored within SQL Server&lt;/strong&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And here's the real kicker: you can access FILESTREAM objects directly from your middle tier .Net code using a lightweight wrapper object. When accessing FILESTREAM objects in this way, you &lt;strong&gt;&lt;em&gt;still get full SQL transactional support&lt;/em&gt;&lt;/strong&gt;, which means you can open a file, modify its contents, and roll it back or commit, all without going directly through SQL Server (you do have to use the lightweight wrapper object, however).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For more information on FILESTREAM, visit &lt;a href='http://www.mssqltips.com/tip.asp?tip=1489'&gt;this great article from MSSQLTIPS.com&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;XML Enhancements&lt;br /&gt;&lt;/h5&gt;&lt;p&gt;In SQL Server 2005, you could create a Schema Collection to validate an xml column against an XML schema. But in some scenarios you might want to validate all of the XML data except for a specific section or two, which might contain dynamically generated or otherwise unpredictable XML. To support these types of scenarios, SQL Server 2008 introduces better support for &lt;strong&gt;Lax Validation&lt;/strong&gt; by introducing the &lt;em&gt;processContents="lax" &lt;/em&gt;attribute. This setting will enforce schema validation for any elements that have schema declarations associated with them, but ignore any elements not defined in the schema.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When modifying a schema that contains lax validation, XML columns that reference said schema will be revalidated, which should make for a nice and simple way to add support for new strongly typed XML blocks in a schema without breaking stuff. I haven't had a chance to actually try this out, so feel free to leave me some feedback and let me know how this works.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SQL Server 2008 also includes full xs:datetime support; you can omit the time zone, but any time zone information provided is preserved. This is actually the case across the board in SQL Server 2008, which provides much improved support for time zone offsets when storing date time information.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In addition to these enhancements, SQL Server 2008 also offers the new Union and List XML types, which make it easier to define and work with XML lists. Union and List types are a topic unto themselves, so I refer you to the below whitepaper for a deeper look at this and a few other enhancements you just can't live without!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href='http://www.microsoft.com/sqlserver/2008/en/us/wp-sql-2008-whats-new-xml.aspx'&gt;Whitepaper: What's New for XML in SQL Server 2008&lt;/a&gt;&lt;br /&gt;			&lt;/p&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/309848642" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/5635688177945442675/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=5635688177945442675" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5635688177945442675?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5635688177945442675?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/309848642/sql-server-2008-feature-highlights.html" title="SQL Server 2008 Feature Highlights" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/06/sql-server-2008-feature-highlights.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-2193413648019737863</id><published>2008-06-04T18:27:00.001-07:00</published><updated>2008-06-04T18:27:02.360-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-06-04T18:27:02.360-07:00</app:edited><title type="text">Visual Studio 2008 Extensions for Windows Sharepoint Services released!</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;Today, Microsoft released &lt;a href='http://www.microsoft.com/downloads/details.aspx?FamilyID=7BF65B28-06E2-4E87-9BAD-086E32185E68&amp;amp;displaylang=en'&gt;Windows Sharepoint Services 3.0 Tools, version 1.2&lt;/a&gt;, which contains mostly the same feature set as version 1.1, but now with support for VS.Net 2008.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To develop solutions for Windows Sharepoint Services (in the most productive way), you'll need to install the following:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Windows Sharepoint Services 3.0, installed locally&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Visual Studio.Net 2008&lt;br /&gt;&lt;/li&gt;&lt;li&gt;This update (VS.Net 2008 Extensions for WSS 3.0)&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/304943580" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/2193413648019737863/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=2193413648019737863" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/2193413648019737863?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/2193413648019737863?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/304943580/visual-studio-2008-extensions-for.html" title="Visual Studio 2008 Extensions for Windows Sharepoint Services released!" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/06/visual-studio-2008-extensions-for.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-5243234145411742445</id><published>2008-05-22T06:46:00.001-07:00</published><updated>2008-05-22T06:46:23.054-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-05-22T06:46:23.054-07:00</app:edited><title type="text">Why I Migrated from Wordpress</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;&lt;em&gt;The real money isn't in the software. It's in the service you build with that software.&lt;/em&gt;&lt;br/&gt;&lt;strong&gt;&lt;em&gt;Jeff Atwood&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Note: This post compares &lt;strong&gt;Blogger&lt;/strong&gt; with &lt;strong&gt;Wordpress.com&lt;/strong&gt;, and &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt; the &lt;strong&gt;free Wordpress&lt;/strong&gt; product available at &lt;strong&gt;Wordpress.org&lt;/strong&gt; which you can install and manage yourself on a hosted server.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I had used Google's Blogger in the past for my personal blog, but had heard such good things about Wordpress (mostly that several A-List bloggers used it, ala &lt;a href='http://scobleizer.com/'&gt;Robert Scoble&lt;/a&gt;) that I thought I would give it a try. And initially I was impressed by it's auto-pingback feature (which I believe Blogger still lacks), and how you could create Pages, which meant you could &lt;strong&gt;construct a mini web site&lt;/strong&gt; around your blog. Perfect for my needs, or so I thought.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The biggest problem I had with Wordpress was that you could customize the CSS, provided you shelled out some dough, but that was pretty much it. There's &lt;strong&gt;no way for you to get at the actual HTML&lt;/strong&gt; of your blog. This really hit home when I tried to add the JavaScript code Google Analytics requires to track site traffic. Interestingly, Wordpress uses Google Analytics to track site traffic to your blog behind the scenes, but they prohibit &lt;em&gt;you&lt;/em&gt; from adding Google Analytics code directly to your blog. And even though they're tapping into the power of Google Analytics, they're not passing along the benefits to their blog users – Wordpress traffic statistics reporting stinks (compared to Google Analytics, anyway).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Of course, if I had downloaded Wordpress from Wordpress.org and installed it myself, I would have faced none of these issues, and I would have had total control over my blog. But there were several reasons why I didn't want to go that route.&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Planning ahead, I'm assuming that one day this blog will be very popular and will consume a lot of bandwidth. &lt;strong&gt;If my blog were hosted on Blogger or Wordpress&lt;/strong&gt; (or any other free blog site) &lt;strong&gt;I wouldn't have to pay for &lt;/strong&gt;that&lt;strong&gt; bandwidth&lt;/strong&gt;, redundant servers, backend database systems, etc.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;As Jeff Atwood noted, &lt;a href='http://www.codinghorror.com/blog/archives/001105.html'&gt;Wordpress performance stinks&lt;/a&gt;. Yeah, I know, unless you enable caching using &lt;a href='http://codex.wordpress.org/Function_Reference/WP_Cache'&gt;WP-Cache&lt;/a&gt;, or some other caching mechanism. As far as I can tell, and for some bizarre reason, this isn't enabled by default. But let's say, for the sake of argument, that with the proper tweaks and configuration Wordpress is the best performing blog system on earth. &lt;strong&gt;In that case I don't really care&lt;/strong&gt; – I barely have time to write coherent blog posts, much less time enough to &lt;strong&gt;figure out why my blog suddenly died&lt;/strong&gt; because it got a few thousand extra visits.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;And so here I am at my new domain, &lt;a href='http://www.toastedcode.com'&gt;www.toastedcode.com&lt;/a&gt;, hosted by Blogger, with lots of new bells and whistles from &lt;a href='http://www.disqus.com/'&gt;Disqus&lt;/a&gt; and &lt;a href='http://www.feedburner.com/fb/a/home'&gt;FeedBurner&lt;/a&gt; and a snazzy UI, all of which were a pain to get cranking on Wordpress. Granted, if I had set up a domain a long time ago the transition between blog providers would have been greatly eased. But sometimes progress is painful, right?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you're interested to know how I imported all my posts from Wordpress to Blogger, you can &lt;a href='http://www.toastedcode.com/2008/05/importing-to-blogger.html'&gt;read about that process here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And I say to you, &lt;strong&gt;welcome to my new home&lt;/strong&gt;!&lt;/p&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/295846846" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/5243234145411742445/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=5243234145411742445" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5243234145411742445?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/5243234145411742445?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/295846846/why-i-migrated-from-wordpress.html" title="Why I Migrated from Wordpress" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/05/why-i-migrated-from-wordpress.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-60207807656183792</id><published>2008-05-20T05:49:00.001-07:00</published><updated>2008-05-22T06:07:51.473-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-05-22T06:07:51.473-07:00</app:edited><title type="text">Installing Fedora 9</title><content type="html">&lt;span xmlns=''&gt;&lt;p&gt;&lt;em&gt;There is only one satisfying way to boot a computer.&lt;/em&gt;&lt;br/&gt;&lt;em&gt;&lt;strong&gt;J. H. Goldfuss&lt;/strong&gt;&lt;br /&gt;				&lt;/em&gt;&lt;/p&gt;&lt;p&gt;I'm not by any means an expert in Linux, but over the weekend I decided to try to install the latest Fedora release (version 9) to see what all the hoopla was about. My hardware platform of choice was a VMWare Workstation virtual machine, with around 500 MB of RAM allocated, and a 10 GB expandable hard drive, all of which seemed adequate. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;One of the reasons I chose Fedora over Ubuntu for my first Linux installation was a fairly simple one. I couldn't get Ubuntu to download (from Ubuntu.com). The connection kept timing out about halfway through, which was enough of a nuisance to make me stop trying. Mayhaps the fault was mine somehow, but I was able to download Fedora 9 with no issues. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Anyhoo, I wanted to approach this "review" from the perspective of a typical user – someone looking for basic web browsing, document editing functionality from a PC, with little if any pre-existing knowledge of Linux. I fit that last description nicely, since I've never seen a Linux desktop before. Would Fedora be a good bet for Grandma? That's what I wanted to find out.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I booted up from the Fedora ISO image I had downloaded earlier, and within seconds the pleasantly designed Fedora installer UI appeared. Nice. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF1.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;No DOS-like installer here, and clicking the Next button allowed me to select my language, and then (on the following screen) my keyboard language (layout). I'm guessing most people know what language they speak: so far easy as pie.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF2.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;Next, I clicked Yes to create a new partition.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF3.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;The next screen presented networking options. I opted to enable DHCP, as most people probably would, and went on to the next step.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I found it interesting (and positive) that from this point on the Fedora install was able to swing on out to the Internet and download additional packages and whatnot. Networking worked without a hitch before the installation had completed. So far, this was proving to be brain dead easy. I was impressed.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF4.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;I thought the next screen, where I was asked to select my time zone from a map, was a much simpler approach than having to choose the appropriate GMT offset (in my case, GMT – 5) from a drop-down list. But just a tiny suggestion – if you're going to let people choose their time zone from a map, the time zones should maybe appear as highlighted regions so you can &lt;em&gt;select your time zone&lt;/em&gt; instead of the closest city. For example, Monticello is awful close to the left edge of the Eastern Standard zone – it would help if I could see where it falls in respect to time zones. But that's kinda nit-picky.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Also of note was that Atlanta, the largest city in the South East, and frequently called the New York of the South, was nowhere to be found. That hurt my feelings.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF5.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;Next, some more questions about partitioning. I accepted the defaults and moved on.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF6.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;And then Fedora was off and away to format the new partition.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF7.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;After the partition was all set up, I was asked if I wanted to install additional software. I thought this was actually quite nice. Very nice, in fact, as (in theory, at least) it let me hit the ground running with everything I (or Mom/Grandma, as the case might be) might need to edit documents, and just be productive.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I decide to go hog wild and select everything.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF8.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;And that's when I hit my first little snag. Whoopsadaisy! The option to install "Additional Fedora Software" caused a big 'n' nasty &lt;strong&gt;unable to read package metadata&lt;/strong&gt; error. So I just unchecked that option and everything proceeded without a hitch. I'm still not sure what I would have gotten as part of "Additional Fedora Software".&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF9.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;After about 10 or 15 minutes while all of my software choices were installed (well, except for &lt;strong&gt;Additional Fedora Software&lt;/strong&gt;, that is), Fedora started booting up! Woohoo!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And a nice looking boot up screen it was, too.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF10.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;Here's the login screen after the startup process completed.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF11.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;So I immediately popped in and started messing about. The first thing I did was try to change the display settings to a higher resolution. And that's when I got my first big surprise.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A User Account Control dialog! Apparently I need "root" access to change my resolution settings. And, as I soon discovered, Fedora prompts you for the root password when you try to do any admin-level task, &lt;strong&gt;&lt;em&gt;just like Windows Vista&lt;/em&gt;&lt;/strong&gt;! Wasn't this one of the "features" everyone was complaining about in Vista? That users would find it aggravating beyond belief?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Again, I'm a self-professed Linux newbie, so maybe this has been in Fedora since version 1. All I know is UAC is in Fedora &lt;em&gt;now&lt;/em&gt;. And to be honest, I don't think that's a bad thing. I've always been very positive about UAC in Vista; I think it makes the OS more secure, and I've never been annoyed at its not-so-often-as-people-think dialogs (which I still haven't disabled yet, I might add). So I'm not complaining. I'm just sayin', that's all.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF12.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;But back to changing the Display Settings: surprisingly, after I selected the new resolution settings I was presented with the below dialog &lt;strong&gt;&lt;em&gt;prompting me to reboot&lt;/em&gt;&lt;/strong&gt;! Say whut now? I need to reboot just to change my display settings?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;That's kinda stinky-winky. What if I change my display settings to a resolution my monitor doesn't support, and I can't get back into the OS. That is so &lt;em&gt;1995&lt;/em&gt;-ish. Giving the benefit of the doubt since I'm not a Linux power user, maybe this isn't really a problem for some reason unbeknownst to yours truly. But this struck me as kinda goofy. Also the fact that, after rebooting, &lt;strong&gt;my display settings hadn't changed&lt;/strong&gt;! &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF13.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;I found the UI layout intriguing. Fedora has two task bars – a bottom bar for displaying running applications, and a top bar for accessing System options. One of the System options I found interesting was the Notes feature, which allows you to keep note-ful items at the ready (and searchable). &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt='' src='http://toastedcode.fileburst.com/blog/052008_1249_InstallingF14.gif'/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;Another handy feature (depending on your style of working) is Fedora's support for multiple desktops. At the bottom right of the screen are four little squares that represent four separate desktops, which you can use to keep tons of running applications organized. Multiple desktop support comes in various flavors for Windows, but I haven't yet figured out how to use multiple desktops in a way that improves my productivity.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Final Word&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;After this first impression, I think Fedora would make be a great fit for your parent or other relative/friend that needs a cheap PC for browsing the web, reading email, editing documents and other simple tasks.  The active word here being &lt;em&gt;cheap&lt;/em&gt;. Fedora still seemed a little flaky in spots, for example when changing display settings. And what if a Fedora user decides to get into digital photography, or wants to install TurboTax in April? That could cause some problems.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;But the installation went incredibly smoothly, and I was quite impressed by the overall experience. I plan to use Fedora as a test platform for Mono.Net applications, general experimentation and so forth. But as my primary (or even secondary OS)? I think Fedora still has a long way to go before that becomes a remote possibility.&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/toastedcode/QdNl/~4/294244911" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.toastedcode.com/feeds/60207807656183792/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7252593889317111192&amp;postID=60207807656183792" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/60207807656183792?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7252593889317111192/posts/default/60207807656183792?v=2" /><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/toastedcode/QdNl/~3/294244911/blog-post.html" title="Installing Fedora 9" /><author><name>Bob B</name><uri>http://www.blogger.com/profile/12460497023523414578</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.toastedcode.com/2008/05/blog-post.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-7252593889317111192.post-6758867694633846040</id><published>2008-05-19T06:22:00.001-07:00</published><updated>2008-05-19T06:24:59.853-07:00</updated><app:edited xmlns:app="http://purl.org/atom/app#">2008-05-19T06:24:59.853-07:00</app:edited><title type="text">Silverlight in 5 Minutes</title><content type="html">&lt;p&gt;I recently started reading Adam Nathan's most excellent little read on Silverlight 1.0, entitled appropriately enough &lt;em&gt;&lt;a href="http://www.amazon.com/exec/obidos/ASIN/0672330075/toascode-20" target="_blank"&gt;Silverlight 1.0 Unleashed&lt;/a&gt;&lt;/em&gt;. If you're interested in getting quickly up to speed on Silverlight, I highly recommend this as a getting started guide. &lt;/p&gt;&lt;p&gt;I might also add, at this most opportune moment, that I totally disagree with &lt;a href="http://joelonsoftware.com/items/2008/04/16.html" target="_blank"&gt;Joel Spolsky, et. al.&lt;/a&gt;, regarding the so-called trend of developers to move away from book reading. Yes, there is a lot of information out there on the web that's freely accessible, but nothing beats a "book on the bus" for getting up to speed on new technology. A good rule of thumb, IMHO, is that if you need to read more than 50 pages on &lt;em&gt;anything&lt;/em&gt;, it's better, easier, faster to read it from a printed page than from a computer monitor. &lt;em&gt;Especially&lt;/em&gt; when you're on the bus, train, plane, etc.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.amazon.com/exec/obidos/ASIN/0672330075/toascode-20"&gt;&lt;img style="MARGIN: 0px 5px 0px 0px" src="http://images.amazon.com/images/P/0672330075.01.MZZZZZZZ.jpg" align="left" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;At any rate, I suspect there are many out there who simply don't have enough time to get their brains wrapped around the new enhancements in .Net 2.0, much less .Net 3.0/3.5's new features (LINQ/WPF, etc), and then along comes Silverlight. What with keeping your certifications up to date and meeting the demands of your day job, who has time for all this stuff, really? &lt;/p&gt;&lt;p&gt;Allow me to help.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What is Silverlight?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Silverlight is a bit Macromedia Flash, except it's presentation layer is built around a subset of the &lt;a href="http://en.wikipedia.org/wiki/XAML" target="_blank"&gt;XAML&lt;/a&gt; tag-based language. To write a Flash application you need a Flash editor to edit the Flash timeline, but with Silverlight, all you really need is a text editor to edit the XAML. Here's some sample XAML I &lt;a href="http://en.wikipedia.org/wiki/XAML" target="_blank"&gt;copied from Wikipedia&lt;/a&gt;. You can view this sample in a browser by saving it with a .xaml extension and opening it with your browser (provided you have Silv