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

<channel>
	<title>Thomas F. Abraham - On Technology &#187; Development</title>
	<atom:link href="http://www.tfabraham.com/blog/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tfabraham.com/blog</link>
	<description>Visual Studio, .NET, BizTalk Server, SQL Server and more...</description>
	<lastBuildDate>Mon, 19 Jul 2010 18:11:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>If Your Visual Studio Solutions Open Slowly, Check WebsiteCache</title>
		<link>http://www.tfabraham.com/blog/2009/01/if-your-visual-studio-solutions-open-slowly-check-websitecache/</link>
		<comments>http://www.tfabraham.com/blog/2009/01/if-your-visual-studio-solutions-open-slowly-check-websitecache/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 20:29:32 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA["visual studio"]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=121</guid>
		<description><![CDATA[While tracking down an issue the other day, I stumbled across 25,000+ empty subdirectories inside a single folder: Documents and Settings\&#60;username&#62;\Local Settings\Application Data\Microsoft\WebsiteCache (or on Vista, Users\&#60;username&#62;\AppData\Local\Microsoft\WebsiteCache).  NTFS can technically handle this, but file system performance can slow down for a directory containing such a large number of subdirectories. How did this happen?  I’ve been [...]]]></description>
			<content:encoded><![CDATA[<p>While tracking down an issue the other day, I stumbled across 25,000+ empty subdirectories inside a single folder: Documents and Settings\&lt;username&gt;\Local Settings\Application Data\Microsoft\WebsiteCache (or on Vista, Users\&lt;username&gt;\AppData\Local\Microsoft\WebsiteCache).  NTFS can technically handle this, but file system performance can slow down for a directory containing such a large number of subdirectories.</p>
<p>How did this happen?  I’ve been using the same XP workstation for BizTalk and some .NET development for one year, using Visual Studio 2005 SP1, BizTalk Server 2006 R2 and the Visual SourceSafe 2005 provider.  My BizTalk solutions include a C# web application project alongside numerous BizTalk projects.  After deleting everything in the WebsiteCache folder, I discovered that my BizTalk solutions opened noticeably faster.  Upon opening and closing the solution a few times, it turns out that Visual Studio was creating one empty subdirectory in WebsiteCache for most or all of my project files and items in Solution Items.  Each time I opened a solution around 15 new subdirectories were created, but never deleted.  Over the course of a year, I accumulated 25,000+.  Another developer found 33,000+ subdirectories in his WebsiteCache folder!</p>
<p>Opening the solutions was taking longer and longer as time went on.  By clearing out the WebsiteCache folder, the solutions (with VSS integration, and which contain around 12-15 projects) now open 10-15 seconds faster.</p>
<p>Other people have <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=347228" target="_blank">reported this issue to Microsoft Connect</a>, but the issue was closed as “not reproducible.”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2009/01/if-your-visual-studio-solutions-open-slowly-check-websitecache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AppDomainUnloadException from NUnit</title>
		<link>http://www.tfabraham.com/blog/2008/04/appdomainunloadexception-from-nunit/</link>
		<comments>http://www.tfabraham.com/blog/2008/04/appdomainunloadexception-from-nunit/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 21:49:29 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[nunit]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=115</guid>
		<description><![CDATA[In my current project I&#8217;m using Enterprise Library 3.1&#8242;s Caching block to cache data retrieved from web services.  The caching code is implemented in a regular C# class library, and I have NUnit 2.4 tests to test it.  In order to configure Enterprise Library at runtime I&#8217;m using Enterprise Library&#8217;s FileConfigurationSource to point to a [...]]]></description>
			<content:encoded><![CDATA[<p>In my current project I&#8217;m using Enterprise Library 3.1&#8242;s Caching block to cache data retrieved from web services.  The caching code is implemented in a regular C# class library, and I have NUnit 2.4 tests to test it.  In order to configure Enterprise Library at runtime I&#8217;m using Enterprise Library&#8217;s FileConfigurationSource to point to a separate configuration file.  Works great.</p>
<p>However, I discovered while running my unit tests that when I ran a test and then tried to close NUnit GUI or re-run a test, there was a 5-10 second delay before the IDE closed.  An AppDomainUnloadException was being thrown at the end of the delay.  When I commented out the code that created the Enterprise Library CacheManager object the delay disappeared, so clearly Enterprise Library was doing something to block the AppDomain from unloading.</p>
<p>After some digging I found the issue.  FileConfigurationSource creates a worker thread that monitors the associated configuration file for changes.  The factory objects, in this case CacheManagerFactory, hold a reference to the FileConfigurationSource object.  There is no way to explicitly dispose or clean up the FileConfigurationSource object itself.  NUnit loads the assembly to be tested into a new AppDomain, and when it shuts down or runs another test, it tries to unload the test AppDomain.  What ends up happening is that NUnit asks the AppDomain to unload, but the FileConfigurationSource&#8217;s file monitoring thread does not shut down.  As a result, the AppDomain cannot be unloaded and we see the delay and the AppDomainUnloadException.  Needless to say, this is REALLY annoying.</p>
<p>One partial solution that I found is the Enterprise Library 3.0+ method FileConfigurationSource.ResetImplementation().  If you create a FileConfigurationSource object and then immediately call the static FileConfigurationSource.ResetImplementation() method with the same file path, but pass false to the &#8216;refreshing&#8217; parameter, the configuration file will not be monitored for changes.  This will have the effect of shutting down the monitoring thread and allowing the AppDomain to unload&#8230; but you lose auto-refresh of configuration.</p>
<p>I still haven&#8217;t found a real solution to this.  The &#8216;patterns &amp; practices&#8217; guys need to make FileConfigurationSource implement IDisposable or something.  In the meantime, I&#8217;m forcefully killing NUnit all the time or waiting out the delay, both of which are really a pain.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2008/04/appdomainunloadexception-from-nunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to .NET 3.0/3.5 &#8211; What to re-write and what to leave alone?</title>
		<link>http://www.tfabraham.com/blog/2008/02/moving-to-net-3035-what-to-re-write-and-what-to-leave-alone/</link>
		<comments>http://www.tfabraham.com/blog/2008/02/moving-to-net-3035-what-to-re-write-and-what-to-leave-alone/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 18:53:49 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=111</guid>
		<description><![CDATA[Reader Ravindranath posed several questions today in a comment, and I think that they deserve a post of their own.  Here they are again: As a part of migrating from .Net 1.x to .Net 3.x, is it advisable to re-architect for the newer .Net 3.x features (WWF, WCF, WPF, etc)? When is it a MUST [...]]]></description>
			<content:encoded><![CDATA[<p>Reader Ravindranath posed several questions today in a comment, and I think that they deserve a post of their own.  Here they are again:</p>
<ol>
<li>As a part of migrating from .Net 1.x to .Net 3.x, is it advisable to re-architect for the newer .Net 3.x features (WWF, WCF, WPF, etc)?</li>
<li>When is it a MUST to re-architect and when is it optional?</li>
<li>Are there any approach papers towards this?</li>
</ol>
<p>There are two primary areas of benefit for those considering an upgrade from .NET 1.0/1.1 on Visual Studio 2002/2003 to .NET 2.0, 3.0 or 3.5: benefits resulting from IDE enhancements, and benefits resulting from .NET Framework enhancements.</p>
<p>First, let&#8217;s talk about IDE enhancements.  Today, your IDE of choice should be Visual Studio 2008, whether you are using .NET 2.0, 3.0, 3.5 or are considering an upgrade from .NET 1.0/1.1.  VS2008 is the first Visual Studio IDE for .NET that can target multiple versions of the .NET Framework, so if you are using .NET 2.0 today, you have nothing to lose and everything to gain by moving from VS2005 to VS2008.</p>
<p>Just a few of the benefits of Visual Studio 2008 include:</p>
<ul>
<li>Completely new CSS-oriented ASP.NET designer, shared with Expression Web (formerly FrontPage)</li>
<li>Robust IntelliSense for JavaScript</li>
<li>Improved code analysis (FxCop) tools</li>
<li>Improved performance analysis tools</li>
<li>Team Explorer 2008 client for Team Foundation Server 2005/2008, with an improved Source Control Explorer</li>
</ul>
<p>Since Visual Studio 2008 is still a new release, there are some Visual Studio IDE extensions that haven&#8217;t been upgraded yet.  Depending on how important those are to you, it&#8217;s possible that you could be forced to wait for updates.  Two notable examples are BizTalk Server 2006 R2, which requires VS2005 and has no announced timetable for a VS2008 update, and Microsoft&#8217;s Enterprise Library, which includes a configuration editor plug-in that is not VS2008-ready.  Enterprise Library has an easy workaround since you can either use the standalone editor or hop over to VS2005 for configuration tweaks, but BizTalk&#8217;ers are out of luck.</p>
<p>Now to move on to the main focus of Ravindranath&#8217;s questions: upgrade benefits resulting from .NET Framework enhancements.</p>
<p>The .NET Frameworks 1.0, 1.1 and 2.0 were completely isolated from each other, but that changed with .NET 3.0 and 3.5.  The .NET 3.0 and 3.5 Frameworks can be thought of as layers on top of each other.  In fact, as I&#8217;ve written about previously, .NET Framework 3.5 requires both .NET 2.0 SP1 and .NET 3.0 SP1.  ASP.NET has, in fact, remained at version 2.0.</p>
<p>Projects upgrading from .NET 1.0/1.1 to 2.0/3.0/3.5 will gain their major benefits not from features in 3.0 or 3.5, but from the CLR enhancements introduced back in Framework 2.0.  In most cases you will find immediate performance and memory usage benefits with a straight conversion to 2.0, making no code changes except in the rare cases where you might have used a method or class that had a breaking change in 2.0.</p>
<p><strong>My answer to question #1 is generally No, and my answer to question #2 is that redesign is never required.</strong>  Now, of course, I have to qualify that with a couple of caveats, and put some logic behind my answers.</p>
<p>First, it really depends what kind of application is involved and what is important to the business behind it.  My primary example here is Windows Presentation Foundation (WPF).  If your application is a consumer-focused application where graphics and fancy look-and-feel are very important, then yes, it makes sense to take a very hard look at moving to WPF.  You will never reproduce what WPF can do in Windows Forms &#8212; although even that requires the caveat that WPF controls can be hosted inside a Windows Forms application!</p>
<p>If you really need the full power of WPF and your app is currently Windows Forms-based, you&#8217;re really looking at a rewrite, not an upgrade.  WPF carries with it a significant learning curve, immature tools and third-party libraries and a major time investment.  I do not discourage its use, but you do need to have good reasons and a real need for it, and know what you are getting into.  In another year or two, there will be no reason not to build all smart client apps with WPF, but we&#8217;re not there yet.</p>
<p>Second, there is often no good reason to rewrite your ASMX-based Web services with Windows Communication Foundation (WCF).  ASMX is still supported, and it will remain in the Framework into the future.</p>
<p>There are two main reasons to rewrite existing ASMX services with WCF:</p>
<ol>
<li>You have an explicit need for the WS-* features introduced in WCF and cannot get by with the WS-* subset in the Web Services Enhancements add-ons.</li>
<li>You need the ultimate in performance from your service.</li>
</ol>
<p>I recommend without qualification that all NEW services (which can be anything from an MSMQ listener to a web service to a self-hosted TCP endpoint) <strong>and service clients </strong>be written with WCF.  Once again, you will experience a fairly significant learning curve, but WCF is the communication framework of the future, so you&#8217;ll have to learn it eventually.  Of the major new subsystems in .NET 3.0/3.5, WCF is the one that most developers will use most often, and it is the first one to learn.</p>
<p>That leaves Windows Workflow Foundation (WF) and CardSpace, and these are the least common.  As with most security-related programming tools, CardSpace will never excite much developer interest.  I think it will remain a niche tool.  On the other hand, WF has a lot of potential, but it also takes the most time for developers and architects alike to fully comprehend how to put it to use.  One <a href="http://netfx3.com/files/folders/wf_samples/entry13391.aspx" target="_blank">sample</a> that is out demonstrates the automation of a Windows Forms form using nothing but the WF rules engine to drive validation and enabling/disabling controls as values and control focus changes.  Normally this would involve dozens of event handlers and many lines of code in even a relatively simple form, but this sample has almost no code behind the form.  That&#8217;s a pretty slick example of just the WF rules engine, which doesn&#8217;t even address the actual workflow engine.</p>
<p>So, to recap, in most upgrade scenarios from 1.1 to 3.0/3.5, I think you will be best served by a direct upgrade, not a rewrite.  Then evaluate, in order, where you might be able to put to use WCF, WF, WPF and CardSpace, but don&#8217;t rush to use any of them just because they&#8217;re there!  You will gain huge benefits just from the improvements in the 2.0 CLR and Framework and in the newer Visual Studio IDEs, so enjoy those improvements without too much worry about the 3.0 alphabet soup.  You&#8217;ll find a use for them when the time is right.</p>
<p>Finally, I am not aware of any specific papers including guidelines for when to re-design or not in these areas.  Generally, I would look to MSDN and primarily the patterns &amp; practices team for this type of analysis, but I haven&#8217;t seen anything yet.  If any readers know of related papers, please feel free to post links in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2008/02/moving-to-net-3035-what-to-re-write-and-what-to-leave-alone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Choosing a WPF Data Grid Control</title>
		<link>http://www.tfabraham.com/blog/2007/12/choosing-a-wpf-data-grid-control/</link>
		<comments>http://www.tfabraham.com/blog/2007/12/choosing-a-wpf-data-grid-control/#comments</comments>
		<pubDate>Wed, 19 Dec 2007 01:42:05 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[data grid]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=107</guid>
		<description><![CDATA[As you may or may not know, Windows Presentation Foundation (WPF) does not ship with a data grid control.  [I'll pause while I wait for the cursing to die down...]  First, I need to make an important distinction: there is a Grid control in WPF, but it is a layout control, not a data grid [...]]]></description>
			<content:encoded><![CDATA[<p>As you may or may not know, Windows Presentation Foundation (WPF) does not ship with a data grid control.  [I'll pause while I wait for the cursing to die down...]  First, I need to make an important distinction: there is a <a href="http://msdn2.microsoft.com/en-us/library/system.windows.controls.grid.aspx" target="_blank">Grid</a> control in WPF, but it is a <strong>layout</strong> control, not a data grid like Windows Forms&#8217; <a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridview(VS.80).aspx" target="_blank">DataGridView</a>/<a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagrid.aspx" target="_blank">DataGrid</a>.  The good news is that the usual array of third-party component vendors has jumped in to fill the gap.  The bad news is that most are still at various stages of beta or 1.0 releases. </p>
<p>Update: For the sake of completeness, I should mention that Windows Forms controls can be hosted in WPF, and that&#8217;s another option to consider.  Here, I&#8217;m talking about &#8220;pure&#8221; WPF controls.</p>
<p>The WPF data grid controls that I have discovered include:</p>
<ul>
<li><a href="http://www.syncfusion.com/products/wpf/default.aspx" target="_blank">Syncfusion Essential Grid</a> (supposedly arriving in March 2008)</li>
<li><a href="http://www.infragistics.com/dotnet/netadvantage/wpf.aspx" target="_blank">Infragistics xamDataGrid</a> (currently in 1.x release)</li>
<li><a href="http://xceed.com/Grid_WPF_Intro.html" target="_blank">Xceed DataGrid for WPF</a> (currently in 1.3 release)</li>
</ul>
<p>For the last three months I&#8217;ve been working on a .NET 3.5 WPF-based business application (a rare animal these days, since most WPF samples and real-world apps are highly consumer-oriented).  I&#8217;ve been using Visual Studio 2008 Beta2, and jumped over to the RTM the day it was available.  The main purpose of this application is data editing, so I needed a solid data grid control.  I started by checking out the options listed above.</p>
<p>My first approach was Infragistics xamDataGrid.  They offer a free Express edition, so I started with that (and later purchased the product to obtain support).  It went in pretty easily and visually looked nice.  My data source is a collection of objects that implements IBindingList.  If your collection class does not implement IBindingList, you will not be able to add new rows to the grid (this is also true with Xceed).  I quickly discovered that xamDataGrid did not provide the out-of-box behaviors that one would expect when adding and canceling a new row.  For instance, if you start a new row, enter some values, then hit Escape twice, my expectation is that the new row is canceled and removed (see Access, SQL Management Studio, etc.).  I also had trouble getting the grid to bind to a column using a ComboBox instead of a string value.  I had a collection of objects that represented all possible values of a field (CountriesCollection, for example), and was binding the ComboBox to a property of that same object type (binding CurrentCountry property, of type Country, for example).</p>
<p>The Infragistics support forum for xamDataGrid consisted of many people posting questions and rarely receiving answers.  There were many threads ending with &#8220;Hello, is anyone from Infragistics listening?&#8221;  Thinking that premier support would be great, we purchased the product.  Quite frankly, I was disappointed with the &#8220;premier&#8221; support.  I got responses that did not address my specific scenario (as explicitly described in the support request), and those that said &#8220;it&#8217;ll be fixed in a future hotfix.&#8221;  Suffice it to say, I dumped xamDataGrid.</p>
<p>I <strong>highly recommend</strong> Xceed DataGrid for WPF.  This is a solid product with good support.  It has been out in real release, not beta, for a long time already, and it just works.  It took a half day or so to drop it in and hook it up, figure out a few subtleties, and it was ready to go.  I still had some questions, so we purchased this product too, and their support staff turned the questions around quickly with definitive answers.  Xceed also offers a free, highly-capable version of DataGrid for WPF, so check it out.  One thing to note if you are used to Windows Forms data grids: Xceed DataGrid for WPF does not support the IDataErrorInfo interface for bound object validation and automatic error display.  They have that in their suggestions list but with no timeline.</p>
<p>Save yourself some time and hassle and go straight to <a href="http://xceed.com/Grid_WPF_Intro.html" target="_blank">Xceed DataGrid for WPF</a>.</p>
<p><strong><span style="text-decoration: underline;">NOTE: I have no connection to Xceed whatsoever; I just hope this saves you some time since I learned the hard way!</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2007/12/choosing-a-wpf-data-grid-control/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2008, .NET Framework 3.5, .NET Framework 3.0 SP1, .NET Framework 2.0 SP1 RTM</title>
		<link>http://www.tfabraham.com/blog/2007/11/visual-studio-2008-net-framework-35-net-framework-30-sp1-net-framework-20-sp1-rtm/</link>
		<comments>http://www.tfabraham.com/blog/2007/11/visual-studio-2008-net-framework-35-net-framework-30-sp1-net-framework-20-sp1-rtm/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:48:44 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA["visual studio"]]></category>
		<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=101</guid>
		<description><![CDATA[The next major release of Visual Studio 2008 and the .NET Framework 3.5 have quietly been released to manufacturing over the weekend, along with .NET Framework 2.0 SP1 and .NET 3.0 SP1.  This is an important release of Visual Studio because it fully integrates the tooling for the technologies released in .NET 3.0 (Windows Communication [...]]]></description>
			<content:encoded><![CDATA[<p>The next major release of Visual Studio 2008 and the .NET Framework 3.5 have quietly been released to manufacturing over the weekend, along with .NET Framework 2.0 SP1 and .NET 3.0 SP1.  This is an important release of Visual Studio because it fully integrates the tooling for the technologies released in .NET 3.0 (Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation and CardSpace) and, for the first time, can target multiple versions of the .NET Framework.</p>
<p>Our team has been building experience in the .NET 3.0 technologies for most of this year and playing with the betas, and we&#8217;re looking forward to working with the improved tooling in the RTM release.</p>
<p>Download .NET Framework 3.5 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b531-508d977d32a6&amp;DisplayLang=en" target="_blank">here</a>.  The .NET 3.5 installer will install the 2.0/3.0 Framework and 2.0 SP1 and 3.0 SP1 automatically.  The service packs are also available separately for <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=79bc3b77-e02c-4ad3-aacf-a7633f706ba5&amp;DisplayLang=en" target="_blank">2.0</a> and <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ec2ca85d-b255-4425-9e65-1e88a0bdb72a&amp;DisplayLang=en" target="_blank">3.0</a>.  As for Visual Studio 2008, I think the MSDN subscriber downloads site is having issues already, probably due to high demand.</p>
<p>I just finished installing .NET Framework 3.5 RTM on my laptop running Vista Enterprise.  The install took a long time, about 30 minutes, but succeeded.  Along with 2.0 SP1 and 3.0 SP1, it also installed two Vista hotfixes, KB929300 and KB110806.  This release, like 3.0, is more of an additive release that requires and builds upon 2.0 and 3.0, unlike the 1.1 to 2.0 transition.</p>
<p>There is also a big new training kit (120 MB) that includes presentations, demos and labs.  You can get that <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8bdaa836-0bba-4393-94db-6c3c4a0c98a1&amp;DisplayLang=en" target="_blank">here</a>.  There are also 3.5 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2a8e06d9-188d-4ec8-ba2d-d3deb96fc06d&amp;DisplayLang=en" target="_blank">whitepapers</a> by David Chappell and a 3.0 common namespaces and types <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7b645f3a-6d22-4548-a0d8-c2a27e1917f8&amp;DisplayLang=en" target="_blank">poster</a>.</p>
<p>I&#8217;ve been working with 3.0 and the 2008 betas for about 10 months now, so I&#8217;ve been a bit negligent with my blogging!  It has just ended up to be another really busy year.  I hope to get some new posts out about 3.0/3.5 soon.</p>
<p>From Microsoft:</p>
<p>.NET Framework 3.5 builds incrementally on the new features added in .NET Framework 3.0. For example, feature sets in Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows CardSpace. In addition, .NET Framework 3.5 contains a number of new features in several technology areas which have been added as new assemblies to avoid breaking changes. They include the following:</p>
<ul>
<li>Deep integration of Language Integrated Query (LINQ) and data awareness. This new feature will let you write code written in LINQ-enabled languages to filter, enumerate, and create projections of several types of SQL data, collections, XML, and DataSets by using the same syntax.</li>
<li>ASP.NET AJAX lets you create more efficient, more interactive, and highly-personalized Web experiences that work across all the most popular browsers.</li>
<li>New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards.</li>
<li>Full tooling support in Visual Studio 2008 for WF, WCF, and WPF, including the new workflow-enabled services technology.</li>
<li>New classes in .NET Framework 3.5 base class library (BCL) that address many common customer requests.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2007/11/visual-studio-2008-net-framework-35-net-framework-30-sp1-net-framework-20-sp1-rtm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take Advantage of the ENTIRE Set of .NET Framework Class Libraries</title>
		<link>http://www.tfabraham.com/blog/2007/09/take-advantage-of-the-entire-set-of-net-framework-class-libraries/</link>
		<comments>http://www.tfabraham.com/blog/2007/09/take-advantage-of-the-entire-set-of-net-framework-class-libraries/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 23:10:00 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=97</guid>
		<description><![CDATA[Most developers tend to think in the context of the language they are currently writing.  If you&#8217;re writing C#, you are accustomed to having the core .NET Framework class library at your disposal.  If you&#8217;re writing VB.NET, you&#8217;re used to having many more classes above and beyond the core class library, and in J# (assuming [...]]]></description>
			<content:encoded><![CDATA[<p>Most developers tend to think in the context of the language they are currently writing.  If you&#8217;re writing C#, you are accustomed to having the core .NET Framework class library at your disposal.  If you&#8217;re writing VB.NET, you&#8217;re used to having many more classes above and beyond the core class library, and in J# (assuming anyone actually uses J#) you have yet another pool of classes to choose from.  This language-specific focus can lead to an unfortunate bit of tunnel vision.</p>
<p>To make a stunningly obvious point (once you think about it for a minute): your C# application is free to use any class available in the VB.NET or J# class libraries (or any others).  Your VB.NET application is free to use any class available in the J# class library, and so on.  Whatever language you are using, you can, and should, take advantage of all of the class libraries available to you!  Less work and less custom coding is always a great thing.</p>
<p>In the context of a C# application, this means adding a reference to Microsoft.VisualBasic.dll.  (What? Is he nuts?!?)  Sure, it might seem odd at first, but all high-level language code for .NET is reduced to one intermediate language in a managed code assembly &#8212; IL.  It makes no difference if it originated in COBOL.NET, C#, VB.NET, J#, etc., and there is absolutely nothing wrong with having &#8220;using Microsoft.VisualBasic&#8221; in your C# code.  The core .NET Framework already includes the extra VB class libraries, but to get the J# class libraries you need to have the J# Runtime installed.</p>
<p>There is a lot of great code just waiting to be used.  For example: need to work with ZIP files (unlike System.Compression)?  Check out the java.util.zip namespace in the J# runtime.  Yeah, that&#8217;s .NET managed code, despite the &#8220;java&#8221; in the namespace.  Remember that the J# runtime and J# itself was designed to be compatible with Java, so the runtime attempts to recreate as much of the (older) Java class libraries as possible.  Another example: the Microsoft.VisualBasic.Financial class.  How cool is this?  Asset depreciation calculation, present value of an annuity and more.  If you&#8217;re coding in C#, you may well have gone off and coded all of this yourself, or looked to open source for a solution &#8212; all while it was right under your nose.</p>
<p>I found an old article from MSDN magazine that <a href="http://msdn.microsoft.com/msdnmag/issues/03/06/ZipCompression/" target="_blank">demonstrates writing a ZIP utility in C# using the J# runtime</a>, which is a great example for this topic.</p>
<p>Some of you will be saying &#8220;Duh!&#8221; by this time, but the reactions from years of saying this to developers has told me that it is not immediately obvious to everyone.  Hopefully this will save you some time!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2007/09/take-advantage-of-the-entire-set-of-net-framework-class-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started with the ASP.NET 2.0 AJAX Extensions and Control Toolkit</title>
		<link>http://www.tfabraham.com/blog/2007/03/getting-started-with-the-aspnet-20-ajax-extensions-and-control-toolkit/</link>
		<comments>http://www.tfabraham.com/blog/2007/03/getting-started-with-the-aspnet-20-ajax-extensions-and-control-toolkit/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 02:22:07 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=95</guid>
		<description><![CDATA[I happened to be building an ASP.NET 2.0 website earlier this year when the ASP.NET 2.0 AJAX Extensions RTM&#8217;d, so I decided to try it out.  Someone recently asked me my impressions of the Extensions and Control Toolkit and how best to get started, so I thought I&#8217;d pass on my comments. Thinking of existing ASP.NET [...]]]></description>
			<content:encoded><![CDATA[<p>I happened to be building an ASP.NET 2.0 website earlier this year when the <a href="http://ajax.asp.net/downloads/default.aspx?tabid=47" target="_blank">ASP.NET 2.0 AJAX Extensions</a> RTM&#8217;d, so I decided to try it out.  Someone recently asked me my impressions of the Extensions and Control Toolkit and how best to get started, so I thought I&#8217;d pass on my comments.</p>
<p>Thinking of existing ASP.NET developers picking up AJAX for the first time with this framework, it is an extremely well designed and natural development model.  It integrates almost seamlessly into the existing development environment and &#8220;&lt;asp:xyz&gt;&#8221; tag model.</p>
<p>The AJAX Extensions support static page class methods and web services, mainly using JSON serialization, to access and even data bind controls.  Some of the controls use this capability to populate data, such as the CascadingDropDown.  If you want to use that capability outside of the provided controls, you get to start writing some JavaScript against the client-side API (Microsoft created a new object model written in JavaScript, all client-side, namespaces and all).  However, all of the source code to all of the controls, and the entire Toolkit itself, is <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EF2C1ACC-051A-4FE6-AD72-F3BED8623B43&amp;displaylang=en" target="_blank">available for download</a>, so you can dig as deep as you want for usage or implementation examples.</p>
<p>The barrier to entry for JavaScript and all of the cross-brower drama that comes with it can be significantly lowered by learning and programming to the new client-side API, so that is something worth learning.  Developers should make an effort to truly understand what is going on when they use AJAX on a page.  There is a lot of code happening behind the scenes to produce the end user effect of partial updates or fancy animated controls.</p>
<p>There are several good tutorials to get you off the ground.  The AJAX Framework is truly a framework &#8212; when you install it you don&#8217;t have any fancy AJAX controls to drop on your pages.  Instead, you&#8217;ve got the basis for building your own, and for writing cross-browser JavaScript code on top of the client-side API.  That may be a surprise to someone installing it for the first time.  Instead, all the fancy controls are housed in a Microsoft-sponsored open-source project on <a href="http://www.codeplex.com/AtlasControlToolkit" target="_blank">CodePlex</a>.  Naturally, they are documented about as well as most open-source projects.  However, they do come with a sample website that you can play with.</p>
<p>One thing that should be high on everyone&#8217;s to-do list as a web developer is mastering CSS.  If you are not very strong with CSS, it is going to become tougher to use the new tools, including AJAX and WPF/E.  For many of the fancy controls noted above, you need to create a number of CSS styles just to get them to work.  I recommend one <a href="http://www.cssplay.co.uk/layouts/index.html" target="_blank">site for CSS</a> that may open your eyes to the possibilities.  Check out all the layouts you can do with no nested tables involved, and cross-browser too.</p>
<p>I believe that the AJAX toolkit documentation is lacking, in some areas significantly.  You will probably find yourself with questions that are not answered at all, or poorly.  However, that has not proven to be a major issue.  For the most part things work as expected, but there are certainly subtleties to learn.</p>
<p>I have had some issues with the collapsible controls not sizing correctly in a stacked configuration, but that is in an absolute positioning-based CSS website that may have another CSS issue that I&#8217;m missing.  On the same site, we have an issue with the stacking and with calendar controls not appearing in IE6 only, but again, that could be related to the other CSS.</p>
<p>Another downside seems to be page speed during development.  If debugging is enabled you get a non-compressed debug version of the large JavaScript client-side code, and starting a page in the debugger may take an extra five seconds before it is usable vs. no AJAX.  I believe one of the recent Control Toolkit updates is beginning to address this issue.</p>
<p>A not-to-miss blog for a wide range of ASP.NET topics, not just AJAX, is <a href="http://weblogs.asp.net/scottgu/" target="_blank">Scott Guthrie&#8217;s</a>.  Here are some more <a href="http://www.corti.com/WebLogSascha/PermaLink.aspx/2887bca6-b9a3-4f8b-aa3f-3a705bee59ba" target="_blank">ASP.NET AJAX labs</a>.  And <a href="http://weblogs.asp.net/scottgu/archive/2007/02/12/free-asp-net-ajax-1-0-how-do-i-videos-updated-for-final-release.aspx" target="_blank">training videos</a>.  The good news is that you can start using the Extensions for very small bits of functionality on your site and expand from there.  For instance, I put an existing checkbox that simply turns a flag on and off in a database inside an UpdatePanel to avoid a complete postback.  I&#8217;m sure you can think of areas like this on your websites where a simple operation could be easily optimized with AJAX Extensions for a much bigger benefit in user experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2007/03/getting-started-with-the-aspnet-20-ajax-extensions-and-control-toolkit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reuse the Exception MessageBox from SQL Server 2005 in your Apps</title>
		<link>http://www.tfabraham.com/blog/2007/01/reuse-the-exception-messagebox-from-sql-server-2005-in-your-apps/</link>
		<comments>http://www.tfabraham.com/blog/2007/01/reuse-the-exception-messagebox-from-sql-server-2005-in-your-apps/#comments</comments>
		<pubDate>Thu, 18 Jan 2007 01:59:26 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=93</guid>
		<description><![CDATA[I&#8217;ve been forgetting to write about this one for the better part of a year&#8230;  Many of you have probably seen the exception dialog box in the SQL Server 2005 GUI&#8217;s.  It lets you copy the exception text to the clipboard and so on.  It&#8217;s pretty nice, certainly an improvement over past dialogs that just [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been forgetting to write about this one for the better part of a year&#8230;  Many of you have probably seen the exception dialog box in the SQL Server 2005 GUI&#8217;s.  It lets you copy the exception text to the clipboard and so on.  It&#8217;s pretty nice, certainly an improvement over past dialogs that just printed the error and made you take a screenshot or copy down the error message.</p>
<p>Microsoft quietly released that very exception dialog as a standalone, supported managed assembly that you can use in your own applications.  This is a great thing to take advantage of if you are working on any WinForms 2.0 apps.  (I haven&#8217;t checked, but it is probably .NET 2.0 since it is part of SQL 2005.)</p>
<p>From the source:<br />
<strong>Microsoft Exception Message Box</strong><br />
&#8220;The exception message box is a programmatic interface that you can use in your applications for any tasks for which MessageBox may be used. The exception message box is a supported managed assembly designed to elegantly handle managed code exceptions. It provides significantly more control over the messaging experience and gives your users the options to save error message content for later reference and to get help on messages.&#8221;</p>
<p><a href="http://download.microsoft.com/download/f/7/4/f74cbdb1-87e2-4794-9186-e3ad6bd54b41/SQLServer2005_EMB.msi" target="_blank">http://download.microsoft.com/download/f/7/4/f74cbdb1-87e2-4794-9186-e3ad6bd54b41/SQLServer2005_EMB.msi</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2007/01/reuse-the-exception-messagebox-from-sql-server-2005-in-your-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Framework 1.1 and 2.0 and 3.0 Side-by-Side (SxS)</title>
		<link>http://www.tfabraham.com/blog/2006/12/net-framework-11-and-20-and-30-side-by-side-sxs/</link>
		<comments>http://www.tfabraham.com/blog/2006/12/net-framework-11-and-20-and-30-side-by-side-sxs/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 17:06:09 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=91</guid>
		<description><![CDATA[I&#8217;ve written before about installing .NET Framework 1.1 and 2.0 side by side (SxS) on the same box.  Microsoft recently added to the mix .NET Framework 3.0, so it&#8217;s about time to clear up any confusion on the newest release. Above all, you should understand that the version designation of 3.0 was strictly marketing-driven.  At the most [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written before about <a href="/blog/?p=29" target="_blank">installing .NET Framework 1.1 and 2.0 side by side (SxS) on the same box</a>.  Microsoft recently added to the mix <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=10cc340b-f857-4a14-83f5-25634c3bf043&amp;DisplayLang=en" target="_blank">.NET Framework 3.0</a>, so it&#8217;s about time to clear up any confusion on the newest release.</p>
<p>Above all, you should understand that the version designation of 3.0 was strictly marketing-driven.  At the most basic level, <strong>.NET Framework 3.0 equals .NET Framework 2.0 plus a bunch of <em>new</em> DLLs.</strong>  If you install .NET Framework 3.0 on a box that does not already have .NET Framework 2.0, the installer <em>installs Framework 2.0</em>.  Therefore, if you already have .NET Framework 2.0 installed on a box, you should not be too concerned that installing 3.0 will break existing applications.  In fact, you will find that in the ASP.NET tab in IIS Admin, .NET 3.0 is not even a choice.</p>
<p>It is worth noting that .NET Framework 3.0 is pre-installed on Windows Vista and will be pre-installed on &#8220;Longhorn&#8221; Server.  However, .NET 3.0 may be installed on any Windows XP SP2 or Windows Server 2003 SP1 box.</p>
<p>If you&#8217;re working with a mission-critical server then you should, of course, be cautious and do some planning and testing anyway.  Just be aware that the 1.1 to 2.0 story is identical to the 1.1 to 3.0 story, because 3.0 is in effect 2.0 with more files.</p>
<p>By now you may be asking what .NET Framework 3.0 is good for if it is essentially Framework 2.0.  .NET 3.0 delivers a number of long-anticipated and important features, though mostly of interest to application developers rather than server administrators.  The list includes Windows Communication Foundation, Windows Workflow Foundation, Windows Presentation Foundation and Windows CardSpace.  You can read more about them on <a href="http://www.netfx3.com/" target="_blank">the official .NET Framework 3.0 site</a>.</p>
<p>In summary:</p>
<ul>
<li>.NET 3.0 is <strong>not</strong> a major change to the core .NET Framework as was 1.0/1.1 to 2.0</li>
<li>If you currently have only .NET Framework 1.0 or 1.1 and you are looking to install 2.0 <strong>or</strong> 3.0, see <a href="/blogs/tabraham/archive/2005/12/09/15.aspx" target="_blank">my side-by-side post</a></li>
<li>If you currently have .NET Framework 2.0, installing .NET Framework 3.0 is not a major change as the version numbers would suggest</li>
<li>If you currently run .NET 2.0 applications, they will not know or care that you have installed .NET 3.0</li>
</ul>
<p>Please feel free to contact me with questions and your own experiences with the upgrade.  Thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2006/12/net-framework-11-and-20-and-30-side-by-side-sxs/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Optimize Large Data Transfer in Web Services with MTOM</title>
		<link>http://www.tfabraham.com/blog/2006/12/optimize-large-data-transfer-in-web-services-with-mtom/</link>
		<comments>http://www.tfabraham.com/blog/2006/12/optimize-large-data-transfer-in-web-services-with-mtom/#comments</comments>
		<pubDate>Thu, 07 Dec 2006 16:20:11 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.tfabraham.com/blog/?p=87</guid>
		<description><![CDATA[I frequently hear comments that Web services are inappropriate for carrying large data messages, say greater than 1 MB.  In the past there was some truth to that, but no longer.  There is really no reason to avoid a Web service simply because you have to send or receive a bunch of data. By default, transferring [...]]]></description>
			<content:encoded><![CDATA[<p>I frequently hear comments that Web services are inappropriate for carrying large data messages, say greater than 1 MB.  In the past there was some truth to that, but no longer.  There is really no reason to avoid a Web service simply because you have to send or receive a bunch of data.</p>
<p>By default, transferring non-ASCII data over a SOAP call means using Base64 encoding.  You have to go back to the early days of the Internet to find the Base64 definition in <a href="http://www.faqs.org/rfcs/rfc1521.html" target="_blank">IETF RFC 1521</a>, which was adapted from an even earlier RFC.  Base64 typically increases the size of the encoded data by 33%, not to mention the CPU and memory required to encode and decode.  Imagine sending a 3 MB PDF over a SOAP call with Base64 encoding.  That PDF gets translated into a 4 MB ASCII string, transmitted to the other endpoint, and then converted back to the original 3 MB PDF.  Clearly this is not an efficient scheme.</p>
<p>Years ago, Microsoft first addressed this issue in the Web Services Enhancements (WSE) add-on to .NET with their proprietary <a href="http://msdn.microsoft.com/msdnmag/issues/02/12/DIME/" target="_blank">DIME extension</a> to SOAP.  Like MIME, DIME is designed to define message attachments of varying data types, but in this case to a SOAP message.  According to Microsoft, DIME was a more efficient format than MIME for message parsers.  It was not widely adopted.</p>
<p>Why attachments?  Just like sending an email, you might want to send a SOAP message that carries alongside it one or more other chunks of data, whether that&#8217;s a ZIP file, another XML file, a PDF, etc.  An attachment scheme like MIME defines in the message header the list of attachments, and for each attachment an encoding method.  We would prefer to use a binary encoding method that does not increase the size of our data.</p>
<p>The W3C standards organization got involved with the advent of the <a href="http://www.w3.org/TR/soap12-mtom/" target="_blank">Message Transmission Optimization Mechanism (MTOM)</a>, which today is a W3C Recommendation.  MTOM uses concepts from MIME/Multipart to add attachments to a SOAP message, and it can optimize elements of type base64Binary.  If you put data into a base64Binary element with MTOM disabled, you will literally see a Base64-encoded version of your data (and much bigger than the original).  If you look at the same element with MTOM enabled, you will find a pointer to a MIME part that contains your actual data in binary format.</p>
<p>MTOM is available today for .NET 2.0 Web services in <a href="http://www.microsoft.com/downloads/details.aspx?familyid=018a09fd-3a74-43c5-8ec1-8d789091255d&amp;displaylang=en" target="_blank">Web Services Enhancements (WSE) 3.0</a> and Windows Communication Foundation.  Both of these are freely available and fairly easy to use.  WSE 3.0 is perfect for your existing ASMX Web services because there is usually no code to change to take advantage of MTOM.  Keep in mind that clients of an MTOM Web service also need to be MTOM-aware.  The only requirement is that the data element you wish to optimize is of type base64Binary in the XML, and a byte array in your .NET code.  Once you enable WSE3 on your Web service project, you can simply enable MTOM in the WSE configuration.  Remember to enable it on the client side too.</p>
<p>Attached to this post you will find a sample .NET 2.0 solution that demonstrates a single Web service implemented in plain ASMX, ASMX with WSE3 and WCF.  You&#8217;ll notice that there is no special code at all for MTOM, just configuration.  If you use an HTTP monitor like <a href="http://www.fiddlertool.com" target="_blank">Fiddler</a> to examine the SOAP messages, you will see the differences with and without MTOM.</p>
<p>It is worth pointing out that BizTalk 2006 Web services CAN take advantage of MTOM!  When you publish a schema or orchestration as a Web service, what comes out is a regular old .NET 2.0 ASMX Web service.  Again, as long as the large data elements are defined as type base64Binary and as a byte array in code, MTOM can be enabled with no code changes.  Just update the BizTalk Web service project to enable WSE3 and MTOM.</p>
<p>Please contact me if you have questions, and please take advantage of these free and easy tools to make your Web services faster.</p>
<p><a href="http://www.tfabraham.com/blog/wp-content/uploads/2006/12/webservicesmtomdemo.zip">webservicesmtomdemo.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tfabraham.com/blog/2006/12/optimize-large-data-transfer-in-web-services-with-mtom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
