Programming Microsoft Visual Basic 6
Chapter 6
Classes
and Objects
Since Microsoft Visual Basic 4 introduced the concept of class modules, a furious debate has raged among Visual Basic developers about the object-oriented nature of the language. Is Visual Basic a real object-oriented programming (OOP) language? Is it just an object-based language? Or is it somewhere between these two extremes?
For what it’s worth, my position on the question is a compromise: Visual Basic definitively is not a true OOP language and it won’t be one until it possesses some essential OOP features, such as inheritance. But this deficit shouldn’t excuse your not learning in depth what classes and objects have to offer developers. This is what I’ll show in this chapter and in the remainder of this book:
- Class modules can immensely improve your productivity, help you solve many common and intricate programming problems, and even permit you to perform tasks that would be extremely difficult, if not impossible, otherwise.
- Even if Visual Basic isn’t a full-fledged object-oriented programming language, you can still use its classes to better organize your code into truly reusable modules and design your applications entirely using concepts derived from the Object-Oriented Design discipline. In this sense, the inclusion of a tool such as Visual Modeler in the Enterprise Edition is a clear sign of Microsoft’s will to pursue this goal.
next page....
|