Tutorial :Is there any good reference for object oriented|good design in vb6?


i'm currently in the process of modifying a legacy editor application and i need to add in a few data structures which i have made into a class of it's own which i later add to a collection object. but thus far i'm little bit blurry on where to put all of my functions which is related to that object. i'm thinking maybe OO like design, but i'm not quite sure how to do this in vb6. else all the functions are currently in a module mdl file. which are set as public function.

is there any good reference, book or whatever which i can learn more about how to properly design for vb6 app? for the current work and for future work i guess.



Are you familiar with Rocky Lhotka's work? I would recommend reading Visual Basic 6 Business Objects.

Visual Basic 6 Business Objects provides a thorough introduction to employing objects that are used to model real-world business problems.

You can also visit www.lhotka.net

Edit :

I know it sounds like a lot of trouble, but I would really recommend you take the time and read Rocky's book. He talks about simulating OOP principles eg. like simulating inheritance in vb6 ect.


Another good source of information is Deborah Kurata, she's written a series of books about OO coding in VB. Less well known than Rocky Lhotka (who is excellent), and concentrates more on pure OO, not the ORM/DB layer that he does.


All the reference cited so far are good. However the Design Patterns by the Gang Of Four is usable for Visual Basic 6. The trick to remember that most of the pattern talked about in Design Patterns rely on implementing interfaces which VB6 can do well. In fact you will find most design patterns involve implementing interfaces.

This is because most design patterns focus on setting up how various objects interact as opposed to reusing behavior. So interface become much more important.

Design Patterns by the GoF Patterns by Martin Fowler The various GUI and presentation patterns is the most applicable in my opinion.

My own application is structured completely as a series of design patterns. For example I use a Passive View for my presentation layer. The various views called command objects which does the actual modifications of the model. I use factories to retrieve the list of reports, file types, and shapes my software support. All done in VB6 using the Design Patterns book by the GoF.


Before getting deep into the theological aspects of OOP those books cover you might begin by simply reading the VB6 documentation. In particular the sections on component design.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »