.NET 4, do you know the new features? - The 12 features the majority thinks are useless.

Submitted by Robert MacLean on Wed, 09/07/2011 - 08:59


More in this series can be found in the introduction.

Another interesting statistic was that only 12 of the 61 features are rated useless, in other words more people thought those features were useless than useful.

This is really good, because this really means that about 80% of the new features are seen to be useful and thus that was a good spend of resources for Microsoft.

I am measuring this in a Useful Ratio – Number of people who think it is useful compared to number of people who think it is useless. For examples:

  • 1 : 1 – For every one person who thinks it is useful, one person thinks it is useless
  • 2 : 1 – Two people think it is useful for everyone that thinks it isn’t.
  • 0.5 : 1 – Half a person thinks a feature is useful compared for everyone who thinks it is useless.

CLR/BCL: Addition & Subtraction with IntPtr & UIntPtr

Useful Ratio: 0.3 : 1

Introduction: Adds an offset to the value of a pointer.

Thoughts: The first feature to appear on more than one list, as it also appeared on the top 10 least known. So this brings up an interesting though – you either don’t know of this or you think it is shit. My views of why this is useless is the same as why it is unknown, the use case for this is TINY!

More Info: http://msdn.microsoft.com/en-us/library/system.intptr.op_addition.aspx

CLR/BCL: Complex Number Support

Useful Ratio: 0.3 : 1

Introduction: Complex numbers are a specific mathematical concept especially for doing graphs, vector calculus and other things that are pretty specialised.

Thoughts: .NET 4 also included another new construct called Tuple and .NET has had KeyValuePair for ages and this seems very similar to those (from the perspective of someone without university math). All it gives compared to the other two are some easier math functions. So easy to see why it is not that useful as it is easy to implement those on Tuple or KeyValuePair.

More Info: http://www.sadev.co.za/content/net-4-baby-steps-part-xii-numbers

WPF: Touch Support

Useful Ratio: 0.4 : 1

Introduction: WPF now supports input from touch, like you can touch buttons and text boxes etc…

Thoughts: This feels very similar to System.Device.Location which is hampered by the lack of hardware that supports the feature.  WPF is doubly hurt because Silverlight is competing with it and has touch support already.

More Info: http://blogs.msdn.com/b/jaimer/archive/2009/11/04/introduction-to-wpf-4-multitouch.aspx

CLR/BCL: Side by Side (SxS) CLR's in the same process

Useful Ratio: 0.6 : 1

Introduction: Prior to .NET 4 you could not allow two different CLRs (i.e: 1.0, 1.1 or 2.0) in exist in the same process.

Thoughts: I hit this a few times with ASP.NET where two sites ran in the same AppPool and one site was running 1.1 and the other 2.0 and there would be a failure.

This was primarily put in also to allow plug-ins built in different CLR’s run in the same application.

Besides the ASP.NET issue I’ve not seen a need for this, it really feels like plumbing for future applications.

Update: Mike posted in the comments a great use case I didn't think of, which adds more value for this feature.

More Info: http://msdn.microsoft.com/en-us/magazine/ee819091.aspx

WPF: Text Rendering Stack

Useful Ratio: 0.6 : 1

Introduction: WPF previously rendered text differently to how Windows did, this is where the perception of it being blurry comes from. As part of Visual Studio 2010 they used WPF and spent considerable time improving the text rendering.

Thoughts: I don’t get this, it means that WPF is better looking and it costs nothing for you. Maybe the issue is because it costs nothing people see the value as nothing?

More Info: http://www.hanselman.com/blog/WPFAndTextBlurrinessNowWithCompleteClarity.aspx

ASP.NET: CDN Support

Useful Ratio: 0.7 : 1

Introduction: Microsoft has a large content delivery network which contains many scripts that web sites use, like jQuery. Using a CDN can significantly improve performance of your website.

Thoughts: Reasons why I think people don’t like this:

  • Internal only applications cannot benefit from this.
  • People prefer other CDN’s – as there are a few BIG ones now.
  • People don’t trust a CDN

If you can use this this, you should, it is a simple switch to turn it on.

More Info: http://www.asp.net/ajaxlibrary/cdn.ashx

CLR/BCL: ETW Support

Useful Ratio: 0.8 : 1

Introduction: ETW, Event Tracing for Windows, is a feature of Windows for doing logging at the kernel level. It is brilliant as you can do THOUSANDS of messages per second with VERY low CPU usage. With .NET 4 we have CLR support for this so understanding what is happening in the CLR along with our applications becomes very easy.

Thoughts: We have been able to write to ETW since .NET 3.0 – all this is is support for the CLR events, so really you need to be debugging performance issues in the CLR.

More Info: http://naveensrinivasan.com/2010/03/17/using-clr-4-0-event-tracing-for-windows-etw-along-with-application-etw/

ASP.NET: Grid & List Row Selection Persistence

Useful Ratio: 0.8 : 1

Introduction: Allows the selected row in a list or grid to be persisted automatically over post backs.

Thoughts: Simple for why this is not seen as useful: People who care use ASP.NET MVC

More Info: http://www.asp.net/aspnet-4/videos/aspnet-4-quick-hit-persistent-gridview-row-selection

CLR/BCL: Primary Interop Assembly Embedding

Useful Ratio: 0.9 : 1

Introduction: PIA’s (Primary Interop Assemblies) are mappings between COM+ API’s and .NET. Similar to header files in C. These are exposed as separate assemblies and in .NET 4 you can embed just the code you use in your assembly as part of the build rather than requiring the separate assemblies.

Thoughts: I don’t think this is important at all – we have learnt to include the assemblies we need with our solution so embedding code is just a solution to a problem that didn’t exist.

More Info: http://www.hanselman.com/blog/CLRAndDLRAndBCLOhMyWhirlwindTourAroundNET4AndVisualStudio2010Beta1.aspx

CLR/BCL: SortedSet

Useful Ratio: 0.9 : 1

Introduction: SortedSet is a class for doing sorting, similar to SortedList or SortedDictionary. However where the old ones internally use a hash table, this uses a binary tree and thus gets some FANTASIC performance in many situations where the others would have bad perf.

Thoughts: I don’t think there is enough understanding of patterns with .NET developers – we are too quick to just use what Microsoft gives us and move along. So there isn’t enough people thinking about the pattern for their data structures so they see this as a solution to a solved problem. Those that do care, already have built their own code for this problem.

More Info: http://www.sadev.co.za/content/net-4-baby-steps-part-vi-sortedset

WPF: Windows 7 Integration (System.Windows.Shell)

Useful Ratio: 0.9 : 1

Introduction: Building a WPF application and want to take advantage of new Windows 7 features like the taskbar, quick launch or overlays? It is easy with the System.Windows.Shell.

Thoughts: I don’t get why this isn’t more popular, it is a VERY useful set of tools. Maybe people just don’t like WPF?

More Info: Rudi Grobler has a series on this:

ASP.NET: Routing for WebForms

Useful Ratio: 0.9 : 1

Introduction: ASP.NET MVC brought us routing support so that we can direct URL’s to specific content based on a convention or a configuration. With .NET 4 we get support for this in WebForms.

Thoughts: WebForm developers don’t care about this, they have never needed it and don’t need it now. I see the big market for this is actually hybrid scenarios where you using WebForms and MVC in the same system… a VERY small market.

More Info: http://msdn.microsoft.com/en-us/magazine/dd347546.aspx