VSLive! Speaker Interviews—Billy Hollis


Billy Hollis knows a thing or two about VB .NET—he was coauthor of the first book ever on the topic, VB .NET Programming on the Public Beta. A regular VSLive! Speaker, we asked Billy for some of his expertise on Visual Basic .NET and more. Check out his interview below or register for the next VSLive! Conference near you and experience this content live and in person!

Also, check out your chance to save with upcoming Early Bird Discounts!



As the author of a best selling book on VB .NET you must have tons of tips on improving inheritance in VB .NET, can you give us just a few?
One key is to know the .NET classes, and which ones are good candidates for inheritance. Windows Forms controls, for example, are almost all good candidates to inherit and extend. Only a few, like NotifyIcon, cannot be inherited.

On the other hand, it's hard to do a good implementation of form inheritance, except for doing some basic cosmetic standardization on forms. Coordinating the logic on the base form and the inherited form can be tricky. It can be done, and the results can be nice, but it takes some good design to get it right.

I'd suggest that your first inheritance attempts should definitely be using the Framework classes as base classes. It doesn't have to be Windows Forms controls — there are many other possibilities, such as inheriting from the DataSet class to create your data layer, or creating your own exception classes. Only after you've gotten the basics figured out this way should you go on to creating your own base classes.

When you do get to that level, it's easy to get carried away, so be careful. I'm not a big fan of many-level inheritance frameworks. The "fragile base class" syndrome can bite you if you do that. Besides, I've known some organizations to get so bogged down in doing their framework that they never got any real product done. However, it's always a good idea to look at your design problems and see if a generic approach will work. A well-designed base class can be very reusable across projects, using inheritance. But only if you design it right in the first place!

What are some of the benefits of upgrading to VB. NET?
The biggest benefit in my mind is the dramatic increase in flexibility and power. You just are not limited in VB .NET the way you are in VB 6. Want to do a Windows Service? Fine, do it. Need multi-threading? No problem.

One of the new areas of flexibility that is extremely important is the capability to do Web sites purely with VB .NET (using ASP.NET, of course). The earlier attempts to give VB a Web interface (WebClasses and DHTML Pages) were too limiting to be useful. But now you can actually do a pretty impressive Web site without becoming a DHTML guru. VB developers who never got into Active Server Pages can now get into Web development much more easily. You still need to learn basic Web concepts, but you don't have to learn some of the minutia of ASP.

How can you get the most out of OOP?
Well, I wrote a whole book on that, so it's tough to summarize. There are two points that it's paramount to understand. Number one, you really need to understand OOP to get the most out of .NET. You can do decent work in .NET without being heavily into objects, but you'll definitely use .NET more effectively if you do understand OOP. Number two, getting to an OOP state of mind takes months. It's not something you do in a weekend. It changes the way you think about software construction at a very basic level, so it takes time for it sink in. The absolute best tip I can give on making the transition is to find someone who already understands OOP to help you through the process, criticizing your early designs and explaining (and re-explaining) the concepts to you.

What can be the biggest challenge in debugging and how can you overcome it?
I think the biggest challenge in debugging is having the discipline to create code in the first place than can be easily debugged. You have to learn exception handling, which is conceptually similar to error handling in VB, but the best practices are different. Ken Getz had a great session on that at VSLive! San Francisco , and there are other resources. But you can't do effective debugging in .NET if you don't understand how to write your exception handling code in the first place.

Is .NET profiling worth it?
That's a good question. I have not worked on a .NET project big enough to really need profiling yet. The tools seem to work fine, but the results in projects to date did not really dictate many changes to the applications.


Billy Hollis

Billy Hollis is an author and software developer from Nashville, Tennessee. Billy is co-author of the first book ever published on Visual Basic.NET, VB .NET Programming on the Public Beta. He has written many articles, and is a frequent speaker at conferences, including Comdex and VSLive!. He is the Regional Director of Developer Relations in Nashville for Microsoft, and runs a consulting company focusing on Microsoft .NET.