Modules versus Class Method
I was talking with another vb programmer who suggested something to me.
At the moment I use a common module to set up global variables ( public rather than dim/private)
This is mainly for flag switching, controls such as recordsets, connections, passing on file position info, etc.
It was suggested that using class methods would be more efficient?
Especially in the process of releasing resources.
My guess is that class methods are part of object oriented methodology, and it presents a different way of coding logic?
Has anyone gone down the object oriented approach, or know a bit about class methods?
I am curious to learn some more.
Maybe object oriented programming is more powerful and produces better results? ?
Oop vs structured developing
Two bells ringing (two friend of mine said) :
one (oop) says:
Differece between oop and structured is like what you could
know about well structured and "spaghetti code"
The other (structured) says:
Objects does not even exist, they are only a way to wrap the
structured code and add complexity till you get totally confused
What do I thing?
I believe Oop is wonderful as long as I do not get confused...;)
It is like difference in using FyleSytemObject or do the same using
commands like Dir$ or name,....
Objects may be very useful as long as you can manage them.
Start having a class to hold your global variables as long as they
are state infos, making them properties of the class.
...Remember object will not survive the scope of the variable that
holds an instance of it....
Take a look at collections as holder of classes: you can have a class (say Folders) which holds a collection of another type of
classs (say Folder). Start using class builder to have a look
(=adding a class to a project and choosing the wizard as type of
class)