moving to the world of being object oriented

timcyberbanjo

New member
Joined
Oct 20, 2008
Messages
3
Programming Experience
5-10
Hi,
I originally developed a set of web applications with VB6.
For the generic functions that are used throughout the application, I added a "utilities" module that contains all of pubic functions.
Later, I converted the applications to dotnet (2010) where I still have the "utilities" module containing a suite of public functions.
This all works fine.
My concern is though that I have not really embraced the potential of object oriented design.
I have reviewed the process of building classes and using them. I think I have enough to get started on moving the functions into classes, (although I am still struggling to see the advantages over what I already have).
What I am trying to find is some tips on how to best place the functions etc into classes and therefore get the advantages of being object oriented.

Maybe there are sites that can walk you through comparisons?

Thanks
 
It's still legitimate to use the approach you have in VB.NET but generally not too much. If you look at the Directory and File classes in the System.IO namespace, that's basically what they are. They are both static classes, which is basically the C# equivalent of a VB module. Things tend to be a bit more granular in the .NET Framework than they might be in VB6 though.

The thing about object-oriented programming is it's all about objects, so the first thing you need to consider is what objects you can represent by classes in your app. You would first consider the physical entities and then the more abstract ones. The more abstract an entity is, the less obvious it tends to be that it can be represented by a class. It's something you get better at with practice. It's not a bad idea to peruse the .NET Framework and take a look at the structure and the types of things that are represented by classes.
 

Latest posts

Back
Top