Microsoft Versus
Dissecting Microsoft | Directory

How I Learned To Hate Microsoft .NET

My initial experiences with Microsoft's .NET version 1.0 software development platform

Day 1 - Installation of Microsoft Visual Studio .NET Enterprise Architect on Windows 2000

16 CDs... That's a lot for any suite of applications. It starts with Disc 5 for some preliminary components. But before that I'm told to install security patches from the Windows Update web site. Getting through that site and downloading all of the patches takes about 45 minutes over a 700 K/s internet connection.

The CDs have been all copied onto one network drive. The install runs for over an hour, after which I leave for the evenining. The time estimate switches periodically between 1 hour and 59 minutes and 1 hour and 1 minute.

Day 2 - Joining Team Project, Getting The Shared Code

Getting the files from Visual SourceSafe (VSS) and opening the project in Visual Studio .NET (VS.NET) isn't sufficient. VSS isn't integrated into VS.NET. What team of corporate developers doesn't use a version control system? Microsoft should have integrated VSS 6 or waited to release VS.NET until their next version control system can be released with it. This is a tremendous hastle for almost every user of VS.NET.

I should clarify my use of the term "integrated." VSS functionality can be called from VS.NET. This is the bare minimum of integration. Beyond mirroring file structure there is no cohesion among web "studio solutions" as they call them, the web server IIS, and VSS. VS.NET will create an IIS virtual web application, but starting from a teammate's project is hardly intuitive or well integrated. Microsoft has had to write massive documents for developers to get the most basic projects started among teams. In my experience NetBeans and Eclipse are far ahead in valuable techniques for IDE team project integration and version control.

Day 3 - Running A Web Project From The IDE

The lead developer informed me the standard development method will be to run IIS on our workstations. I've installed the old COM+ business components our development group will still be using. Running Visual Studio.NET, plus IIS, and running the project in debug mode, approximately 89.2mb of RAM is used (inetinfo.exe - 14.7mb, dllhost.exe - 14mb, dllhost.exe - 5.9mb, dllhost.exe - 3.3mb, aspnet_wp.exe - 21.1mb, devenv.exe 19.7mb, iexplorer - 8mb, msdtc.exe 2.5mb). Inetinfo and dllhost launched with the running of the web app and can't be terminated in Task Manager, so I assume they're required. The msdtc is only required because we're using COM+ components. Netbeans easily grows to 100mb of memory for Java™ development, debugging web apps on Windows and GNU/Linux. That 100mb of ram includes the JVM and therefore everything needed to debug the web app (the Tomcat Servlet/JSP server is integrated into the IDE, along with a web browser), and is therefore comparable to the 89.2mb VS.NET is using. Netbeans uses the SWING GUI API, so that 100mb of ram the JVM uses includes code and graphics for drawing the user interface, where .NET is using the Win32 API to draw the UI, so I don't know how that memory efficiency compares. I've only just begun but I have yet to see the superior memory efficiency of .NET.

Days 4 & 5 - New Web Development

A wizard exists in VS.NET to insert a property into a class for C#. It asks for the basics: name, type, etc. It then inserts a propery... an empty propery. It doesn't create the variable needed to store the property. The developer still needs to edit the property to set and get values and create the class variable. The "Add Property..." feature has no value.

The data store for all of our applications is SQL Server 2000. Naturally by now I expect database development to be integrated well with VS.NET. It'll connect to the databases and let you browse tables. But we do everything through stored procedures, and all of our object definitions are in VSS (SQL scripts). I can't look at or created stored procedures through VS.NET because there's no SQL script window like ISQL. There's no integration at all with VSS. We don't want to use the version control stored in SQL Server but VS.NET gives us no other option. I can create a blank document in VS.NET for a SQL script, but can't execute it in the database. I've found the database integration in VS.NET completely useless. With many other IDEs out there having decent database development integration I expected better.

Day 6 - ASP.NET

Creating an .aspx page in designer mode renders something apparently harmless but potentially deadly. Just as with JSP tags from a non-HTML namespace are mixed with standard HTML tags. The server picks out these alternate tags to do something beyond standard HTML rendering. This is all in compliance with the HTML 4.0 specification.

While it's HTML compliant, the intentions behind .aspx pages are more in line with XHTML/XML. So the "proper" thing to do would be to create and reference a schema or DTD and use standard XML namespaces, marking the page as XML or XHTML doctype. Instead, the current implementation forces the page to be considered HTML with custom tags and entities ignored by the standard, basically making it proprietary. Following standard XML practice would keep the pages more portable to other editors and IDEs. For example, another IDE wouldn't be able to parse the page as strictly XML, forcing proprietary coding for .aspx documents.

Since I'm new to .NET I'm using the help system of VS.NET often. There's something called a language filter. Apparently it doesn't filter the samples, just the APIs or language constructs specific to the selected language. As I have C# selected, I see many samples in VB. That's very annoying to me. They're also lacking samples for many basic things, so I don't see their help documentation improving much over prior versions of Visual Studio.

While I'm finding coding through web forms using events is interesting and often useful, using non-ASP.NET forms and controls is not easy or intuitive. Doing things "the old fashioned way" while still using .NET classes seem mostly impracticle. It makes a developer feel more boxed into coding with only ASP.NET tactics, which I don't appreciate.

COM / Interop

I opened a can of worms calling a COM object (stand-alone EXE) from .NET. While .NET will clean up its own managed objects, references to unmanaged COM objects are not always automatically decremented. To prevent memory leaks a developer must often call Marshal.ReleaseComObject() explicity at the time of object destruction. .NET's garbage collection is incomplete. The argument is usually made that .NET is fine at cleaning up its own memory space, but since the reference count to external COM objects is predictable their cleanup should be handled automatically. Instead a stand-alone EXE called by a .NET application will remain in memory after the application closes if the application does not explicitly tell the marshalling system to release.
Copyright © 2004-2007 Matthew Schwartz