Microsoft's Suggestions for .NET Application Improvements

Posted by nhughes Mon, 02 May 2005 07:42:00 GMT

Back in February 2005, my development group visited the Whidbey TAP lab in Redmond, WA. We met with quite a few of the groups one-on-one, such as Patterns and Practices (aka Platform Architecture Guidance), Visual C++, ADO.NET, threading, and others. Here are the suggestions from Microsoft compiled while we were there:

Threading

  • Do not use System.Timer in your applications, instead use System.Threading.Timer. System.Timer does not use the thread pool and is less efficient.
  • Instead of using a Timer for counting time in your application, a StopWatch is more appropriate and more efficient.

Enterprise Instrumentation vs. Enterprise Library

If you are using Enterprise Instrumentation for logging, STOP IT! Look into the new, and majorly improved Enterprise Library. It requires less work and is less error prone. When our application was using Enterprise Instrumentation, we had major memory leaks. Since the implementation of Enterprise Library, the application's performance has improved 100%. See this blog for more info on Enterprise Library.

Visual C++ - Ressurected

There are 3 situations in which you might use Visual C++ rather than C#:

  • If the developers are used to C++ and would like to continue its use, rather than ramp up on a new technology.
  • If the application uses complicated or multiple InterOps to native code.
  • If you want a lower-level of control in your development. For instance, the ability to override a method with a different name is available in C++ but not in C#.

They've even implemented the STL in .NET.

Comments are disabled