Learn To Program NOW!

VB.Net - How did we get here?

Last updated: 2007-11-21 00:00:00

VB.NET isn't much like the Visual Basic of yore. But still, Microsoft is doing its best to make it as easy as possible to get work done in VB.NET, just as it did with Visual Basic Classic. Lets see what it's all about.

The roots of VB.Net

Most of us are aware of Visual Basic and its history - and if you want to know more about that, you can find it on the web easily enough. But the main value of VB was that it provided a very easy environment in which to write full featured Microsoft Windows applications. You can argue that it had some weak spots - but it did what it did extremely well, and there are countless, very large, and very successful applications in daily use all around the world written in Visual Basic.

The important point here is that a great deal of useful and dependable software has been written VB, and the main reason for this is that VB is easy to work with while at the capable of doing very powerful things. Projects were staffed up with a few advanced developers leading a hoard of entry level and junior level developers. As long as the "chief" developers were up to the task, a lot of work could get done with less experienced and less expensive developers

But times change

Of course, times change. And the world of computers and software development has been changing as well, with a lot of concerns that didn't exist (more or less) a few years ago. Demands for better security, better scalabilty, distributed architectures, browser based user interfaces, improved UI features, SOA, and so on, require that the development languages and tools have to keep up. So along comes the Visual Studio .NET and the .NET languages. The real challenge is to provide all the additional capability while keeping the language relatively easy to use. I suspect Microsoft wants to keep all those existing VB programmers more or less in the fold, and so they are trying to make VB.NET as familiar and easy to learn as possible.

So how close to VB Classic is VB.NET?

Well. It's a whole new world. However, for a lot of things, an old-school VB Classic programmer should feel right at home in VB.NET. The basic syntax is about the same, and the overall paradigm of drag-and-drop development still exsits and has even been improved. Most of the intrinsic functions familiar to are made available in VB.NET, even though in most cases there are better ways to do the same things.

Here is an example of two ways to do the same thing: One using the familiar VB Len function, the other using the Length method that is a member of the string type:

Debug.WriteLine(Len("test").ToString())
Debug.WriteLine("test".Length.ToString())

You'll also notice the "ToString" method, which has to be used because VB.NET no doesn't coerce types - if you want a number to act as a string, you have to tell it to do so.

What this means is that some things are the same and a lot of things are different

Essentially, in VB Classic you could ignore some things that you no longer can ignore. For example, in VB Classic you could go about your business and pretty much not know much about classes and objects, even though it would have been greatly to your advantage to have done so. Perhaps you figured that some day you'll learn these things. That day has come. In .NET just about everything is an object, and you better get used to it. It is up for discussion whether OOP is a good thing or a bad thing (I think it is a good thing) - but regardless, if you are going to program in .NET anything (or Java, or Ruby, or lots of other languages) you gotta learn this stuff. To be really useful, you don't just want to learn how-to write and use classes and objects, but also the principles, "theories", and thinking that allows you to master them.

More to come... time to go to the movies for me.