Columns

Q&A: Objects meet VB .NET

The migration of Visual Basic developers to .NET has been a sometimes controversial journey. To cast some light on the issue, ADT’s Jack Vaughan spoke earlier this year with Deborah Kurata (below) of InStep Technologies Inc., not long after she chaired some sessions at VS.Live.

Q: Back in the day when Microsoft objects skipped inheritance, it made sense to some. Was a little ‘objectivity’ good enough, and did inheritance just make trouble?

A: There were lots of rumors going around that Microsoft thought Visual Basic programmers in general weren’t up to understanding inheritance, and I never really believed the rumors. But I have heard people say that before. I don’t believe that it was something intentionally left out because of the language. It was intentionally left out because Visual Basic was merely written to support COM, and COM itself didn’t really support inheritance. So I believe that the reason it wasn’t in there is just because it influenced the whole COM-based model.

Q: When you say Visual Basic was primarily written to support COM, you mean VB 4?
A: Yes, VB 4, 5 and 6.

Q: If I’m doing well with VB 6, and I’m interested in .NET, what are the things I should do to help my crew make that paradigm shift to VB 7 and .NET?
A: A lot of professional Visual Basic developers have migrated to an object mindset around VB 5 and VB 6; [for] those developers who have done that, the shift into Visual Basic .NET is much easier because they are already thinking the right way. And there are a huge number of those professional developers. There are some developers who developed in VB 4, 5 and 6 the same way they did in VB 1, 2 and 3 — not using object-oriented techniques, not using classes. Those are the programmers that have the biggest learning curve, the most catching up to do to learn those things, because it was possible in prior versions of VB to code without understanding how all of that worked. And .NET is much more difficult to work with the tool if you don’t understand the basics of object-oriented techniques.

Q: What kind of mixes of language use are you seeing with .NET?
A: A lot of firms that I’m talking to now, as opposed to a year ago, when things were a little bit different, are standardizing on the .NET platform. The difference between the languages — especially the [difference in the] C# and VB languages, [which] is so small — [means] that the company is frequently supporting both [languages] or allowing both ends of development. You might have a lot of developers doing VB, and then you might also have some doing C#.

Q: Are there places in a program where performance becomes an issue?
A: If you’re going to use the managed code environment of .NET, then for your basic kinds of business-type applications there isn’t really a performance difference between the languages because they’re all running against the .NET platform.

Q: What problems are people having?
A: The primary problems people are having is in the case that they really did not explore the whole object thing. I actually had a gentleman come up to me at the VSLive conference and say ‘I’m lost. I have no idea what you’re talking about.’ For those kinds of people, there will be more of a learning curve. I recommend that they dive into a good book or go to a good training course because there is a paradigm shift, and a need to think differently as you attack design and development of your app.

Q: What questions come up among people in this realm?
A: Visual Basic [Versions] 1 through 6 were sometimes seen by professional development shops as kind of a toy language. You would prototype with VB, and then when you got to really doing the application, you would do it in Java, C or C++. With the exception of .NET, VB is truly a professional development tool because it does provide inheritance and all of the same tools and functionality as C++ and C# in the Visual Studio .NET environment.

Visual Basic .NET also makes things so much easier to do. You can build great Web apps without having to know so many different languages to make it work. You can very easily and quickly build Web services. However, as I mentioned before, there is a bit of a learning curve now. You have to understand how object-oriented principles work because the entire .NET Framework is basically a set of classes that you have to know how to talk to using object-oriented techniques.

It used to be with Visual Basic that your child’s kindergarten teacher could go in and build a VB app. But it’s not quite down to that level any more — it has become a professional development tool. Now Microsoft has realized that they’ve sort of dropped out that low-end kind of hobby group, and they are working on adding some shortcuts or simplifications in later versions that would allow those lower-end developers to have a simpler time coming up to speed. But for all of the professional Visual Basic developers, there are so many great tools available to us that it’s helped to make us more productive and able to build apps more quickly.

Q: I’m not sure if you use the term Web services, but .NET is associated with Web services, and XML is associated with Web services, and in the Java camp it’s a combination of Java and XML and SOAP that make Web services. From your perspective, what do Visual Basic programmers now learning or using object techniques need to know about XML? Is that in the mix or is that under the covers?
A: XML is available. The entire data access platform, ADO.NET, does provide for getting data at any point in time in an XML structure, but your average VB developer doesn’t need to know anything about it to make it work. [With] Web services, you can pass data without realizing that that data is being passed with XML. You don’t need to know how to write the XML. And so it is possible to build Web services without really knowing how to create a good XML document because Visual Basic — actually, the Web services in Visual Studio — help you with that.

Q: That brings up an issue that people have discussed around Microsoft and Visual Basic. Is it possible to build things, to use XML and to save time in the production because you don’t have to know it that deeply, but maybe not get the performance you might have if you had people that were reading XML books, too?
A: I’m not sure that the XML I would create myself would be more efficient than the XML that they create for me. XML is just a big, long text string. When I create it, I might shorten some of the names, but it usually gives pretty good names.

About the Author

Jack Vaughan is former Editor-at-Large at Application Development Trends magazine.