.NET 4, do you know the new features? - The 12 features the majority thinks are useless.
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 use of resources for Microsoft.
I am measuring this in a Useful Ratio—the number of people who think it is useful compared to the number of people who think it is useless. For example:
- 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 every one that thinks it isn’t
- 0.5 : 1 – Half a person thinks a feature is useful compared to one 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 in the top 10 least known. So this brings up an interesting thought: You either don’t know of this, or you think it is shit. My views on why this is useless are 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 useful for doing graphs, vector calculus, and other things that are pretty specialized.
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 a university math background). All it provides compared to the other two are some easier math functions. So it’s easy to see why it isn’t that useful—it’s easy to implement those functions on Tuple or KeyValuePair.
More Info: https://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, so 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 already has touch support.
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 (e.g., 1.0, 1.1, or 2.0) to 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 while the other ran 2.0, resulting in failure.
This was primarily put in place to also allow plugins built in different CLRs to run in the same application.
Besides the ASP.NET issue, I haven’t 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 from how Windows did, which is where the perception of blurriness comes from. As part of Visual Studio 2010, they used WPF and spent considerable time improving text rendering.
Thoughts: I don’t get this—it means WPF looks better now, and it costs nothing. Maybe the issue is that since it costs nothing, people don’t see the value?
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 containing many scripts that websites use, like jQuery. Using a CDN can significantly improve the performance of your website.
Thoughts: Reasons why people might not like this:
- Internal-only applications cannot benefit from this.
- People prefer other CDNs—as there are a few big ones now.
- People don’t trust CDNs.
If you can use this, you should—it’s a simple switch to turn 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 because you can log thousands of messages per second with very low CPU usage. With .NET 4, we have CLR support for this, making it easier to understand what is happening in the CLR alongside our applications.
Thoughts: We have been able to write to ETW since .NET 3.0—all this is is support for CLR events, so really, you need to be debugging performance issues in the CLR.
| 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 postbacks.
Thoughts: Simple reason why this isn’t 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 (Primary Interop Assembly) mappings between COM+ APIs and .NET are 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’ve learned to include the assemblies we need with our solution, so embedding code is just a solution to a problem that didn’t exist.
| CLR/BCL: SortedSet |
Useful Ratio: 0.9 : 1
Introduction: SortedSet is a class for doing sorting, similar to SortedList or SortedDictionary. However, unlike the old ones that internally use a hash table, this uses a binary tree and thus gets fantastic performance in many situations where the others would perform poorly.
Thoughts: I don’t think there is enough understanding of patterns among .NET developers—we are too quick to just use what Microsoft gives us without thinking. So there aren’t enough people considering the pattern for their data structures, and they see this as a solution to a problem that’s already been solved. Those who do care already have their own code for this problem.
More Info: https://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: Want to build a WPF application and take advantage of new Windows 7 features like the taskbar, quick launch, or overlays? It’s easy with System.Windows.Shell.
Thoughts: I don’t get why this isn’t more popular—it’s a very useful set of tools. Maybe people just don’t like WPF?
More Info: Rudi Grobler has a series on this:
- http://www.rudigrobler.net/anatomy-of-the-windows-7-taskbar-thumbnailtoolbarbutton
- http://www.rudigrobler.net/anatomy-of-the-windows-7-taskbar--overlays
- http://www.rudigrobler.net/make-your-wpf-buttons-color-hot-track
- http://www.rudigrobler.net/anatomy-of-the-windows-7-taskbar---progress
- http://www.rudigrobler.net/anatomy-of-the-windows-7-taskbar--tabbedthumbnail-part-1
- http://www.rudigrobler.net/anatomy-of-the-windows-7-taskbar--tabbedthumbnail-part-2
| ASP.NET: Routing for WebForms |
Useful Ratio: 0.9 : 1
Introduction: ASP.NET MVC introduced routing support, allowing you to direct URLs to specific content based on conventions or configuration. With .NET 4, we get support for this in WebForms.
Thoughts: WebForms developers don’t care about this—they’ve never needed it, and they don’t need it now. I see the big market for this being hybrid scenarios where you’re using WebForms and MVC in the same system—a very small market.
More Info: http://msdn.microsoft.com/en-us/magazine/dd347546.aspx