|
Putting Productivity Back in VB
Visual Basic 2005 has its "mojo" back.
November 8, 2005
Bill McCarthy, a frequent contributor and advisor to VSM and member of Microsoft's software design review team for VB, discusses the imminent release of Visual Studio 2005 with VSM's editor-in-chief, Patrick Meader. The theme of the day: productivity, productivity, and well, more productivity.
 |
|
Bill McCarthy
|
PM: Jim Duffy wrote in a recent blog that VB has "its mojo back." Is this something you agree with?
McCarthy: I'd have to say that's true. The more I use it, the more I notice the productivity improvements. VB 2005's productivity frees you up to think about the bigger picture, much as pre-.NET versions of VB did. You don't waste your time on the little things, but spend your time now solving the big things—which is exactly as it should be. My Classes, code snippets, edit-and-continue—these are tremendous productivity features.
PM: All but one of the features you mentioned—My Classes—are part of C#, as well. Would it be fair to say that C# has VB's mojo back too?
McCarthy: C# is certainly following VB's lead here. VB invested heavily in snippets and edit-and-continue early on, but the C# team recognized the value of these features and added them too. So sure, VS 2005 heralds great productivity for both languages, and C# gets a little bit of the feel of VB, in a good way. That said, the My Classes and Application framework that only VB has are significant.
PM: You think My Classes give VB an edge; does that mean you consider them viable for production in business-class apps?
McCarthy: Definitely. The code in My Classes has been thoroughly tested and designed from the ground up for the enterprise. I confess that I thought they were just another set of code libraries initially, but they've won me over.
PM: In what way?
McCarthy: Assume I'm working with files on a computer, and I want to write out a string to a file. Before VS 2005, I had to think about opening a file stream of some sort—a text stream, for example—then think about writing the data, closing the stream, and so on. My Classes enable me to do all of this with the My.Computer.FileSystem.WriteAllText call. VB 2005's IntelliSense assists with this, as well. Together, My Classes and IntelliSense enable me to concentrate on the big picture instead of waste time with the stream details.
My favorite example is copying or moving files. In VB6, we used to do some Win32 API and use SHFileCopy to get the pretty Windows UI stuff, such as the dialog that prompts a user if he wants to overwrite a file. In .NET, we had to use PInvoke to accomplish the same task. So in both cases we were writing a lot of code for a simple Windows-standard operation. In VB 2005, all you need to do is use a simple My.Computer.FileSystem.CopyFile(...) call.
PM: What's your favorite new feature in VS 2005?
McCarthy: The code snippet editor, of course, which has nothing to do with the fact that I wrote a good portion of the utility. With it, you can easily create and edit your own code snippets. (You can download the utility from MSDN, or visit the GotDotNet workspace to download the source code.)
Back to top
|