BT

Obsolete Features in .NET 4

by Jonathan Allen on Mar 09, 2010 |

With the introduction of a new CLR and Base Class Library, Microsoft has taken this opportunity to do some house cleaning. Though not much has been actually removed, we do see even longer lists of obsolete types and members.

Some of the deprecations are pretty obvious. For example, it is impossible to catch an ExecutionEngineException so there is no reason for code to make the attempt. Others represent a fundamental change in how the CLR works. A good example of this is anything having to do with Code Access Security or Evidence objects.

The XmlDataDocument class, which was supposed to allow one to treat DataSet objects as if they were XML DOM objects has been marked. While it is hard to think of a real use case for this functionality, one could still achieve it by combining DataSet.WriteXml with the much easier to use XDocument class.

Also in the Data namespace are the key classes in OracleClient such as OracleCommand and OracleConnection. Microsoft is recommending that developers turn to third-party implementations.

On the web side, Microsoft has completely abandoned their mobile offerings for ASP.NET. Instead they direct developers to use ASP.NET MVC. Scott Hanselman outlined this technique back in 2009 in his MIX presentation titled Mobile Web Sites with ASP.NET MVC and the Mobile Browser Definition File. The Mobile Browser Definition File is an open source project run by Microsoft to catalog and programmatically expose the capabilities of all major mobile devices.

Finally there are some methods that were marked obsolete from the beginning. For example, this parallel variant of GroupJoin appears to have been created specifically so that you wouldn’t use it. Presumably this prevents developers from accidentally using the non-parallel variants based on IEnumerable.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Great! by John DeHope

I'm really happy to hear about this. They should go farther. Clean this stuff out! I wonder if they'll ever do such a thing with the C# language? Aren't there parts of the language (not the clr runtime) that could go?

Re: Great! by Jonathan Allen

I really don't see them being willing to remove language features. Even adding a warning message is a really painful decision for them.

Mobile development via ASP.NET WebForms backtracking is possible by Binoj Antony

When VS 2005 (.NEt 2.0) was introduced, initially they had stopped supporting Web Application Projects, then they had to add the support due to popular demand and deployment hell.
Possibly the ASP.NET WebForms Mobile development will go the same way.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT