Developer

Live from LA: The ultimate question of the development world

In this edition of "Live from LA," Lamont Adams tackles the programmer's version of the ultimate question: To .NET or not to .NET? The answer hinges on the system you're dealing with.


If I had to make a list of the questions I’ve been asked recently, ranked by number of occurrences, I think some form of this one would top the list:

“If you were to build an application today, would you use VB6 or .NET?”

This is sort of the development world’s version of the “ultimate question of life, the universe and everything” that so concerned the transdimensional white lab mice in Douglas Adams’ Hitchhikers’ trilogy. Unlike Deep Thought, my answer to this ultimate question actually depends on context—in this case, the sort of system in question. Sometimes that’s specified as part of the question or understood from the context of the discussion; other times, it’s not. For those times when I’m not clear on the type of system, I fire off three pat answers.

A desktop application—no .NET yet
If it’s a monolithic or two-tier (database with some logic) app we’re talking about, and I don’t expect to expand it much, my choice usually surprises people. I’d actually go with Visual Basic 6 over .NET. Why? Well, I’ve found that for relatively simple desktop applications, I just don’t need the complexity and overhead of dynamic compilation and garbage collection that comes with .NET.

I’m also of the opinion that the .NET Windows engine just isn’t up to the performance level of VB6’s Ruby engine, especially at startup. On midrange machines, a .NET app doesn’t give the instant response most users expect. Instead, it seems just sluggish enough to be annoying, though I’m sure this will be corrected in due time through enhancements to the JIT compiler. Add to this the fact that VB6 is very mature, meaning it’s likely to run on most machines without significant trouble, and that there’s no shortage of competent programmers out there who could take over any maintenance, and you’ve got a winning combination.

An n-tier desktop app—.NET all the way
On the other hand, if we’re talking about a multitiered application (especially one that will have component logic spread out over multiple machines) with a desktop front end, .NET makes much more sense. For one thing, the new .NET architecture finally gives developers a coherent framework for developing distributed applications and represents a huge improvement over what came before it. COM+ and DCOM always felt terribly convoluted and restrictive to me, full of potential gotchas to snare the unwary developer. For another thing, with ADO.NET, I finally have a data access library in which I can easily cache those all-important database connections and work with my data without tying up one of those connections.

Web front end—no contest
If it’s an application with a Web-based front end, there’s simply no contest. ASP.NET is hands-down a superior development option to ASP. Web developers can now write real code in real programming languages instead of slinging messy script code everywhere. Even if we’re talking about a new front end for an existing COM app, I’d still say ASP.NET is the best option. As Tim Landgrave pointed out in a recent Builder.com article, just because .NET is here, COM doesn’t just go away.

I like feedback
Hey, you, behind the monitor. Feed my hungry inbox and send me your comments on my ramblings today. If you’re the shy type, just post to our discussion below.

 

Editor's Picks