Big changes may be on the way for Visual Basic developers with the upcoming VB.Net.
Tom Barnaby is lead instructor at Intertech, Inc. in St. Paul, Minn. The company is a certified Microsoft Certified Solutions Provider and regularly delivers workshops to professional developers. He recently sat down with SearchVB Assistant News Editor Eric B. Parizo to discuss VB.Net and its impact on the developer community.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
SearchVB: Microsoft's .NET technology is so new. How did you become so knowledgable about this subject since there's not a lot of information currently out there?
Barnaby: That's one of the great things about my job, it's to dig into these things. We had some people at the PDC (Professional Developers' Conference) who came back with the disks and the info, and we here at Intertech just got into it and found out about it. There are groups on the Web too, so you collect info in the groups on the Web, and you read through the lines and do your own research too.
SearchVB: Microsoft has not been traditionally known for embracing standards. What's your take on Microsoft's whole .NET strategy? Are they serious about building their .NET architecture upon standardized protocols and technologies?
Barnaby: They certainly seem to be serious about it now. They seem to be putting the key technologies before standards organizations, so I think that's a big step, versus, 'here's the standard, if you want to go do it, do it.' Philosophically in that aspect, they've taken a larger step forward than what Sun has with Java, so I think it's for real, to some degree. I can't commit to having an insight about what Microsoft's attitude is, but my take is... for the core things, the common language run time, and the common language sub type, they seem ready.
Another sign of Microsoft's new openness so to speak is with the whole SOAP thing. They've brought in a number of other vendors for input, IBM, Lotus... so it looks like they're trying to get the infrastructure right.
SearchVB: VB.Net is coming, whether some like it or not. What do you see as the biggest changes for Visual Basic developers, and how important will it be for developers to adapt to those changes?
Barnaby: That's going to be extremely important, obviously. The syntax is still the syntax. You still dim variables, you still have use for loops, but there're some underlying assumptions that just aren't true anymore.
Probably the thing that is going affect people the most is garbage collections, because now that makes object destruction non-deterministic, and if we are programming our COM objects to rely on that terminate event, to clean up resources, then we can't rely on that anymore under the .NET architecture. The resources will be cleaned-up, but they won't be cleaned up right away. It's on the garbage collector's sweet time.
I think that for developers to get used to that, there's going to have to adopt a more of a Java-ish style of programming those types of objects, or when they find themselves looking at an object that doesn't acquire resources like this, they may have to rethink that object and try to determine other ways if possible of develop the same thing. For the most part, the task is going to be, if you can't reengineer it, you're going to have to expose a well-known teardown method. Of all the issues, I think that one is creating the most stir. It's so fundamental, and it's something VB programmers have taken for granted for so long. To put it in perspective, you're coming from the C++ work environment moving to C#, this is a wonderful thing. So it's a step forward for them, but it might be considered a step back for VB programmers.
The other challenge is going to be learning when and where to use inheritance and using it correctly. We've got inheritance now, but it's so easy to use incorrectly, and it's so easy to overuse it, and along with it comes the idea of, in C++ terms, of abstract classes and pure virtual functions, and default constructors... there's just so much that comes along with it that this probably represents the biggest chunk of learning that a VB programmer will have to go through, especially if they haven't had to go through a language like Java or C++. For those who have been exposed to it, there's really nothing new here. In fact, in the talks I've been giving, this is of my first points -- study the constructs of Java and C++. Inheritance as a concept is fairly easy, but as in implementation, it's a different matter. The devil is in the detail. As an instructor, it's been my experience that the details get to people the most.
SearchVB: Visual Basic, Visual C++, C#, and Visual FoxPro will reportedly share a common IDE in the next version of Visual Studio.Net. Is the idea to eventually melt everything down into a single environment and a single language?
Barnaby: I think the idea is to make the language choice a matter of whether you like semi-colons or you don't, or you like curly brackets, or you don't. Because if you look at VB code versus C# code, really that's the key difference. When you look at them side by side, it's which text to you prefer.
Really, there is only one .NET language, and that's IL, the intermediate language because they all compile down to that. No one is going to be writing IL, but it's the equivalent of Java byte code. I see it as being an opportunity, for the most part good. There's some concern with performance whenever you're dealing with the intermediate set of code. If you're disassembling with IL, it's more easily reverse engineered, so there's concern with intellectual property
SearchVB: We've all heard that Visual Basic.Net will have new object-oriented programming features. What type of OOP features can our users expect in the next version of VB.Net?
Barnaby: Inheritance is the primary new feature, we didn't have that on VB 6, it's there in its full glory on VB.Net this is definitely a huge step as well for VB programmers to grasp. In my opinion, this is one of the things that borders on the 'be careful what you wish for, because you just might get it.' For a long time, VB programmers have been screaming for this, but now it's here and we need to learn how to use it and use it responsibly. Because it was such a neat feature, it was expressed too much in computer science courses and it was overused, and used in places there it was inappropriate. From this we had this surge of things where people thought inheritance was always bad. We've been burned by overusing it, basically.
The key point to remember is we have the key new feature, use it wisely. By using it wisely I mean recognize relationships. A relationship is a manager is a type of employee, or a dog is a type of animal. Those are the types or relationships that inheritance is designed for. One where it wouldn't be a good place for is a car has a wheel, so you might want to try to inherit car from wheel, but we have a very distinct way of determining it, because I said the car has a wheel, it's completely different type of relationship than is a type of wheel.
Tomorrow, read more of the SearchVB conversation with Tom Barnaby and learn more about Web Services and VB.Net and find out what Tom thinks is the coolest new feature in VB.Net.
For more information on the differences between VB6 and VB.Net, what's new, what's different, and how you can prepare now, join us for a Live Expert Q&A on Friday October 6th at 3:00 PM EDT (19:00 GMT) with Tom Barnaby to discuss Previewing VB.Net. The focus will be on the changes specific to Visual Basic, but Tom will also take your .Net architecture questions.