There was an interesting article a couple of days ago by Richard Grimes, who is a fairly well known author and editor of a .NET column in Dr. Dobbs journal. Apparently Richard stepped down and made some not very flattering comments about .NET that have a lot of people up in arms. I’m always surprised by the outcry and knee jerk reaction that comes over any sort of criticism against .NET – especially from the VB crowd which got a real slap in the face from Richard as basically an irrevelant language.
I find this interesting in a number of ways, because in some ways I’ve made a number of comments along the same lines and have also been attacked as a whiner and naysayer. I say that counter comments like this are an important part to a community and very vital to provide a little controversy instead of all the yes men (and a few wo-men) who think .NET is the end all programming environment for all time. There’s not nearly enough counter commentary here from inside the community although there’s plenty from without.
What really surprises me when things like this happen is the vehemence with which the response comes. Take a look here and here, especially in the comments area.
Getting back to Richard’s post. While I agree that Richard made is point on a purely negative side, he also makes some very valid points about .NET. The most vivid point in mind is this:
In general, I think the library was released too early, and I think it was too large.
This is something that’s been on my mind for a long time, because at first blush it seems so great to have such full featured framework like .NET on your hands. But then you realize that lot of the classes are just not thought all the way through and that you won’t be able to do what the tools advertise to do in the first place.
There are countless places where you still have to rely on interop or alternate mechanisms that require re-inventing the wheel and using - gasp - unsafe code. Not only is this a hack it also compromises the whole security model that .NET is based on as unsafe code will not run even in a lightly locked down application. A few things that come to mind are the Service implementation which is awful, the WinForms TaskTray class, the Eventlog class that Richard mentions as well, and a whole host of WinForms controls (TreeView, Listview and the godawful Toolbar class that seem to have been thrown in at the last minute). Let's not even get into databinding in V1.x in both Win and Web forms <g>.
On the same token it’s important to say that at least we as developers could work around many of these shortcomings with a little effort and this is a sign of an overall well designed framework. It just seems that a lot of features where treated as last minute add-ons or wrappers of existing APIs rather than truly designed interfaces to the functionality they need to serve.
This is certainly not true for the entire framework – there are plenty of well designed classes there where stuff was designed from the ground up rather than just slapping a thin wrapper around a COM interface (WebMail/CDO for example) or Win32 API – but sooner rather than later you run into those half-assed classes that don’t work as they should. The ASP.NET engine comes to mind, which is a fine piece of software architecture (IMHO) and shows that some serious thought went into the design at all levels. The XML classes and the remoting architecture are other examples. Fortunately, the low level aspects of the framework are on the well designed end of the spectrum and this is why most things can be worked around at least.
The problem is that in a lot of cases of shortcomings the damage is done and it may not be fixable in future versions without a side by side replacement that will set up for a monster of a framework in a few versions. We’re already seeing that in Whidbey where most of the WinForm controls get completely replaced by a new set, while the old controls need to still be around so 1.1 apps can run on the 2.0 platform. It will be fun to see what happens 3 versions down the line – 25 megs will seem like a tiny runtime then.
Side note:
Interestingly enough the .NET 2.0 distributable is still only 24 megs. I'm not sure how this can be when the codebase has grown so much in 2.0 AND has to include the old framework functionality.
I think the framework size is a huge issue and the main reason that .NET has not made the inroads it could otherwise have made. Commercial developers – especially smaller vendors and utility producers and tool vendors (like myself) – cannot justify forcing people to download and install a separate piece of software that is 10 times the size of the application itself.
The reality is beyond the developer community and the server .NET has practically no reach at the moment. Commercial applications are far and between. Other than developers tools or server based apps how many .NET applications are you running?
For me the list is short:
NewsGator
Lookout
Fiddler
And even these are stretching it as mostly developer related tools. Beyond that are some internal applications:
My West Wind Web Store front end and Time Tracking module
Web Monitor
That's it on the desktop. Of course add a slew of server application. Am I completely atypical here? I doubt it...
The problem is not the shortcomings I would guess. Heck the VB6 runtime was much less full featured than .NET and there were loads of commercial applications written with it. My guess it comes down to two things:
* Size
* Speed
We've already talked about size. The other one is speed. .NET applications are fast enough, once they're completely loaded up and compiled by the JIT. Up until that point they're a dog. Starting a .NET application for the first time (especially if .NET wasn't loaded anywhere else before) is a 10 second + affair. For commercial software that's unprofessional to say the least. Even VB6 could do better than that and even Visual FoxPro apps will take less than 3 seconds or less from a cold boot. Add to that the massive memory usage (8 megs for a hello world windows form) and you got issues that are not appealing to commercial developers.
Maybe this will change in the future as hardware catches up with the requirements of this environment. But even a gig of memory gets eaten up real quick if you have a dozen .NET utility applications running. It’s a sad state of affairs when people make the argument, that ‘getting faster hardware’ will solve the performance problem. Remember that whenever you upgrade your hardware just to get something new to run, you’re also making whatever else you were running before running that much faster. It’s very instructive to take a step back some time and run applications you built 5 or 10 years or longer ago and run them on today’s hardware. It really makes you realize how much of a pig today’s software is.
And are we really that much better of in building applications today than 5 years ago? In some places like the Web I would say no doubt it - ASP.NET makes life a lot easier. Web Services and remoting make it drastically more easy to communicate among machines. But for desktop development in the current state of .NET? I’m not sure…
I agree with Richard that it would be REALLY nice to a have a stripped down version of the framework that doesn’t include all the server related components – the whole Web space, Enterprise Services, Messaging etc.
Microsoft has been able to create a tiny framework for portable devices, so it should be possible to create something similar with for the desktop. Of course this is day dreaming – this will never happen.
And so Microsoft is shooting itself in the foot. Don’t wanna ship the framework with the OS, but yet they’re making it rather unpalatable to bundle it with smaller applications.
I don’t quite understand the logic here. Why was .NET 1.1 not shipped with XP SP2 for example? The .NET framework is fairly unobtrusive – it doesn’t require a reboot and it doesn’t affect the machine if not used. With all the other worthless shit that gets installed without asking the footprint of .NET is not exactly a big problem.
The problem of distribution of the framework will always be a problem though. LongHorn isn’t going to fix that. By the time Whidbey ships there maybe quite a large number of machines that do have .NET 1.x installed. Of course by then that version will be obsolete because now you don’t want 1.1 to be there but you need 2.x. And the cycle repeats. Once LongHorn ships it will be tied to a specific version of .NET. And then things may become really fun as the .NET framework gets tied to the OS. And we thought it was a pain in the ass to have VS, SQL Server and .NET all tied together in an intricate dependency shuffle.
Interesting times ahead for sure. I’m quietly laughing of the complaints I’ve had in the past with runtimes – the Visual FoxPro runtime and VB runtimes not being part of the OS. That seems paltry now in comparison with a 4 meg footprint for VFP and less than that for pure VB (much more with data components). I still fret at Help Builder being a 10 meg download now (4 megs for the VFP runtime, 2.5 for the documentation the rest for the app and templates). 10 megs is a small download these days... Still, if I had to add 24 megs to that for people who don't have .NET how many people would balk? This is a problem that has immediate $$$ concerns and shouldn't be taken lightly as some of the .NET Yes-Men will do.