473,378 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Module vs Class

Hi,

I am a VB.net beginner, I do not know what are the major difference between
Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong
Nov 21 '05 #1
16 10948
Nak
Hi there,

It's all a matter of object orientation. Look up "Object Orientated
Programming" on google or something like that, or maybe get yourself an
in-depth book, because it is something rather hard to explain in here. It
would be worth your while :-)

Nick.

" A_PK" <pk***@hotmail.com> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl...
Hi,

I am a VB.net beginner, I do not know what are the major difference
between Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong

Nov 21 '05 #2
Hello,
Module in vb.net has everything of a "shared" nature. Once delared it'll be
there throughout the lifetime and instanciated at the start of the
application. This kindof approach introduces too many global variables, which
is not good and as the program grows you'll have a lot of variabes which
belong to the whole program and you kind of kill the concept of
encapsulation, etc,. Use of classes is however an ideal approach where you
think before daclarating and have association-ship as to what variable
belongs to which class and is there for what purpose. You should avoid using
modules, i think they are there only for compatibility with older versions of
VB.
hope that helps.
Abubakar.
http://joehacker.blogspot.com
"A_PK" wrote:
Hi,

I am a VB.net beginner, I do not know what are the major difference between
Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong

Nov 21 '05 #3
Nak
Hi Abubakar,

Modules are not for legacy compatability. There will allways be the
need for modules, and it's certainly not bad programming practice to take
advantage of them. They are great for storing utility methods or global
constants for example. Some people *like* to use classes with shared
members to achieve the same effect but this is neither here nor there.

They are fit for 2 completely different purposes and shouldn't be
compared as such, Classes are for object orientated approaches, modules
aren't.

Nick.

"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
Hello,
Module in vb.net has everything of a "shared" nature. Once delared it'll
be
there throughout the lifetime and instanciated at the start of the
application. This kindof approach introduces too many global variables,
which
is not good and as the program grows you'll have a lot of variabes which
belong to the whole program and you kind of kill the concept of
encapsulation, etc,. Use of classes is however an ideal approach where you
think before daclarating and have association-ship as to what variable
belongs to which class and is there for what purpose. You should avoid
using
modules, i think they are there only for compatibility with older versions
of
VB.
hope that helps.
Abubakar.
http://joehacker.blogspot.com
"A_PK" wrote:
Hi,

I am a VB.net beginner, I do not know what are the major difference
between
Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong

Nov 21 '05 #4
A module is equivalent to a Friend, NotInheritable class with shared
properties and methods (and a private constructor to prevent
instantiation).

Nov 21 '05 #5
Nak
Hi Abubakar,

Please don't think that object orientated programming is the *only* way.
Your whole program does not need to be created in this manor. I regularly
use Modules to store global variables, constants and helper methods, I find
this very efficient. If I need a helper method associated to a single class
then I write it in-line as a shared method, but otherwise it isn't
necessary.

"object-orientation is the ultimate goal", nope, a *working* application
that you find easy to maintain is the ultimate goal!

Programming methodologies will always change, but modular and object
orientate approaches are two ways of programming that will always remain; as
they are quite closely linked. VB.NET is just as object orientated as C++,
and at the end of the day C does not exclude "modules" or "includes", it
uses them in tandem. I do see what your trying to say, but I just believe
that maybe you have been blinded by the OOP approach, use both as
appropriate!

Nick.

"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
Hello Nak,
object-orientation is the ultimate goal. Look at the design of vb.net as
compared to vb6 and before: "everything inside a class". And I was saying
that also because if you see the internal implementation of the modules in
vb.net ie at the IL level, you'll see that its nothing but a class with
shared fields and methods. You can still go for non-object oriented
approach
but changing your approach and thinking in object-oriented ways will
always
help you if you havnt done that before.

Hope that helps.
Abubakar.
http://joehacker.blogspot.com

"Nak" wrote:
Hi Abubakar,

Modules are not for legacy compatability. There will allways be the
need for modules, and it's certainly not bad programming practice to take
advantage of them. They are great for storing utility methods or global
constants for example. Some people *like* to use classes with shared
members to achieve the same effect but this is neither here nor there.

They are fit for 2 completely different purposes and shouldn't be
compared as such, Classes are for object orientated approaches, modules
aren't.

Nick.

"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
> Hello,
> Module in vb.net has everything of a "shared" nature. Once delared
> it'll
> be
> there throughout the lifetime and instanciated at the start of the
> application. This kindof approach introduces too many global variables,
> which
> is not good and as the program grows you'll have a lot of variabes
> which
> belong to the whole program and you kind of kill the concept of
> encapsulation, etc,. Use of classes is however an ideal approach where
> you
> think before daclarating and have association-ship as to what variable
> belongs to which class and is there for what purpose. You should avoid
> using
> modules, i think they are there only for compatibility with older
> versions
> of
> VB.
> hope that helps.
> Abubakar.
> http://joehacker.blogspot.com
>
>
> "A_PK" wrote:
>
>> Hi,
>>
>> I am a VB.net beginner, I do not know what are the major difference
>> between
>> Module vs Class.
>>
>> Could someone guide me when is the best situation to use Module or
>> Class.
>>
>> I have no idea when should I use module or class, because no matter i
>> use
>> module or class, i always could get the results that are what i want.
>> but
>> just the declare and calling method is a bit different.
>>
>> Regards
>> Chong
>>
>>
>>


Nov 21 '05 #6
Nak
Hi "dotnetnewbie",
Anything that requires more than one instance - think Class.
This is correct, but he possibly does not understand what an instance is
as he has no idea what object orientation is.
If you want to share a set of functions/subs and properties use a module - so long as you don't require multiple instances of the same thing (or object).

Yup, that couldn't be more close to the truth also, are you sure your a
newbie?
OO purists will always say (perhaps) think Class.
That's so true, I read something not so long ago which slagged off OOP
programming over some kind of "table" approach to programming, I can't
remember the article because I do the same thing myself, I'm OOP all over.
But you still have to utilize both classes and modules as necessary.
You should read up on Classes and OOP though.


Well said :-) It's more than we can explain in a thread, unless of
course some of us teach? But still, I have many huge books on OOP, I
wouldn't fancy explaining it! :-)

Nick.
Nov 21 '05 #7
Hello Nak,
object-orientation is the ultimate goal. Look at the design of vb.net as
compared to vb6 and before: "everything inside a class". And I was saying
that also because if you see the internal implementation of the modules in
vb.net ie at the IL level, you'll see that its nothing but a class with
shared fields and methods. You can still go for non-object oriented approach
but changing your approach and thinking in object-oriented ways will always
help you if you havnt done that before.

Hope that helps.
Abubakar.
http://joehacker.blogspot.com

"Nak" wrote:
Hi Abubakar,

Modules are not for legacy compatability. There will allways be the
need for modules, and it's certainly not bad programming practice to take
advantage of them. They are great for storing utility methods or global
constants for example. Some people *like* to use classes with shared
members to achieve the same effect but this is neither here nor there.

They are fit for 2 completely different purposes and shouldn't be
compared as such, Classes are for object orientated approaches, modules
aren't.

Nick.

"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
Hello,
Module in vb.net has everything of a "shared" nature. Once delared it'll
be
there throughout the lifetime and instanciated at the start of the
application. This kindof approach introduces too many global variables,
which
is not good and as the program grows you'll have a lot of variabes which
belong to the whole program and you kind of kill the concept of
encapsulation, etc,. Use of classes is however an ideal approach where you
think before daclarating and have association-ship as to what variable
belongs to which class and is there for what purpose. You should avoid
using
modules, i think they are there only for compatibility with older versions
of
VB.
hope that helps.
Abubakar.
http://joehacker.blogspot.com
"A_PK" wrote:
Hi,

I am a VB.net beginner, I do not know what are the major difference
between
Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong


Nov 21 '05 #8
Very loosely speaking:

Anything that requires more than one instance - think Class.

If you want to share a set of functions/subs and properties use a module -
so long as you don't require multiple instances of the same thing (or object).

OO purists will always say (perhaps) think Class.

You should read up on Classes and OOP though.

"A_PK" wrote:
Hi,

I am a VB.net beginner, I do not know what are the major difference between
Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong

Nov 21 '05 #9
Hello Nak,
object-orientation is the ultimate goal. Look at the design of vb.net as
compared to vb6 and before: "everything inside a class". And I was saying
that also because if you see the internal implementation of the modules in
vb.net ie at the IL level, you'll see that its nothing but a class with
shared fields and methods. You can still go for non-object oriented approach
but changing your approach and thinking in object-oriented ways will always
help you if you havnt done that before.

Hope that helps.
Abubakar.
http://joehacker.blogspot.com

"Nak" wrote:
Hi Abubakar,

Modules are not for legacy compatability. There will allways be the
need for modules, and it's certainly not bad programming practice to take
advantage of them. They are great for storing utility methods or global
constants for example. Some people *like* to use classes with shared
members to achieve the same effect but this is neither here nor there.

They are fit for 2 completely different purposes and shouldn't be
compared as such, Classes are for object orientated approaches, modules
aren't.

Nick.

"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
Hello,
Module in vb.net has everything of a "shared" nature. Once delared it'll
be
there throughout the lifetime and instanciated at the start of the
application. This kindof approach introduces too many global variables,
which
is not good and as the program grows you'll have a lot of variabes which
belong to the whole program and you kind of kill the concept of
encapsulation, etc,. Use of classes is however an ideal approach where you
think before daclarating and have association-ship as to what variable
belongs to which class and is there for what purpose. You should avoid
using
modules, i think they are there only for compatibility with older versions
of
VB.
hope that helps.
Abubakar.
http://joehacker.blogspot.com
"A_PK" wrote:
Hi,

I am a VB.net beginner, I do not know what are the major difference
between
Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong


Nov 21 '05 #10
Very loosely speaking:

Anything that requires more than one instance - think Class.

If you want to share a set of functions/subs and properties use a module -
so long as you don't require multiple instances of the same thing (or object).

OO purists will always say (perhaps) think Class.

You should read up on Classes and OOP though.

"A_PK" wrote:
Hi,

I am a VB.net beginner, I do not know what are the major difference between
Module vs Class.

Could someone guide me when is the best situation to use Module or Class.

I have no idea when should I use module or class, because no matter i use
module or class, i always could get the results that are what i want. but
just the declare and calling method is a bit different.

Regards
Chong

Nov 21 '05 #11
> You should avoid using
modules, i think they are there only for compatibility with older versions of VB.
Then why are there so many Modules in the framework? Examples include...

System.Math
System.IO.File

One should use a module when there is no "object" associated with the
functions you are writing.

Too often people become enamored with "Object Orientated" and forget that
objects are not everything, they are just another tool. And like all tools,
there are times when they should not be used.

Off the top of my head, VB's FileSystemObject. You have to create an
instance of the FSO before using it, even though you will never need more
than one FSO. In fact, you could create a hundred of them and they would all
be exactly the same.

I cringe whenever I someone mentions a "singleton" pattern. In all most all
cases, your so-called singleton is really just a global variable that people
pretend is a class.

--
Jonathan Allen
"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com... Hello,
Module in vb.net has everything of a "shared" nature. Once delared it'll be there throughout the lifetime and instanciated at the start of the
application. This kindof approach introduces too many global variables, which is not good and as the program grows you'll have a lot of variabes which
belong to the whole program and you kind of kill the concept of
encapsulation, etc,. Use of classes is however an ideal approach where you
think before daclarating and have association-ship as to what variable
belongs to which class and is there for what purpose. You should avoid using modules, i think they are there only for compatibility with older versions of VB.
hope that helps.
Abubakar.
http://joehacker.blogspot.com
"A_PK" wrote:
Hi,

I am a VB.net beginner, I do not know what are the major difference between Module vs Class.

Could someone guide me when is the best situation to use Module or Class.
I have no idea when should I use module or class, because no matter i use module or class, i always could get the results that are what i want. but just the declare and calling method is a bit different.

Regards
Chong

Nov 21 '05 #12
> And I was saying
that also because if you see the internal implementation of the modules in
vb.net ie at the IL level, you'll see that its nothing but a class with
shared fields and methods.
True, but it is easier to say "Math is a Module" than "Math is a class that
isn't really a class because it has no constructors and all its members are
shared".

--
Jonathan Allen
"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com... Hello Nak,
object-orientation is the ultimate goal. Look at the design of vb.net as
compared to vb6 and before: "everything inside a class". And I was saying
that also because if you see the internal implementation of the modules in
vb.net ie at the IL level, you'll see that its nothing but a class with
shared fields and methods. You can still go for non-object oriented approach but changing your approach and thinking in object-oriented ways will always help you if you havnt done that before.

Hope that helps.
Abubakar.
http://joehacker.blogspot.com

"Nak" wrote:
Hi Abubakar,

Modules are not for legacy compatability. There will allways be the
need for modules, and it's certainly not bad programming practice to take advantage of them. They are great for storing utility methods or global
constants for example. Some people *like* to use classes with shared
members to achieve the same effect but this is neither here nor there.

They are fit for 2 completely different purposes and shouldn't be
compared as such, Classes are for object orientated approaches, modules
aren't.

Nick.

"Abubakar" <Ab******@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
Hello,
Module in vb.net has everything of a "shared" nature. Once delared it'll be
there throughout the lifetime and instanciated at the start of the
application. This kindof approach introduces too many global variables, which
is not good and as the program grows you'll have a lot of variabes which belong to the whole program and you kind of kill the concept of
encapsulation, etc,. Use of classes is however an ideal approach where you think before daclarating and have association-ship as to what variable
belongs to which class and is there for what purpose. You should avoid
using
modules, i think they are there only for compatibility with older versions of
VB.
hope that helps.
Abubakar.
http://joehacker.blogspot.com
"A_PK" wrote:

> Hi,
>
> I am a VB.net beginner, I do not know what are the major difference
> between
> Module vs Class.
>
> Could someone guide me when is the best situation to use Module or Class.>
> I have no idea when should I use module or class, because no matter i use> module or class, i always could get the results that are what i want. but> just the declare and calling method is a bit different.
>
> Regards
> Chong
>
>
>


Nov 21 '05 #13
Nak
Hi Jonathan,

More than likely you will cringe when you see this reply from me, but it
isn't bad; in context, so there is no need. Anyway...
One should use a module when there is no "object" associated with the
functions you are writing.
Exactly, everything has a purpose and there is no right or wrong way
about programming. Some techniques prove much better for certain uses than
OOP does. It all depends on what you are trying to achieve.
Too often people become enamored with "Object Orientated" and forget that
objects are not everything, they are just another tool. And like all
tools,
there are times when they should not be used.
ACK.
Off the top of my head, VB's FileSystemObject. You have to create an
instance of the FSO before using it, even though you will never need more
than one FSO. In fact, you could create a hundred of them and they would
all
be exactly the same.
I'm a little OT, but I started using JAVA before I used the beta of
VB.NET and I am rather surprised as to how close the JAVA "run-time" is to
the .NET Framework, the way the class hierarchy is laid out is almost
identical in certain circumstances. I'm sure Microsoft had a lot to say but
it just goes to show how much the CLR is needed! I crated my own file
objects for VB6 that are almost identical to VB.NET, it's weird how an
inferior "desktop" language has come up with far better ideas!
I cringe whenever I someone mentions a "singleton" pattern. In all most
all
cases, your so-called singleton is really just a global variable that
people
pretend is a class.


But even they have their uses. For example, if you are sharing objects
between instances then sometimes a singleton is essential! For example, if
I create a singleton object for my application it would make it much easier
for me to maintain only 1 running instance. This appears to be something
that is really overlooked by people that utilize command line arguments, a
singleton is essential! What's the point in having an MDI application with
multiple instances?

Nick.
Nov 21 '05 #14
Nak
My app-o-log-gies, I have just observed that you are not the Jonathan that I
thought you were! So Ignore the first paragraph!
"Nak" <a@a.com> wrote in message
news:eN**************@TK2MSFTNGP15.phx.gbl...
Hi Jonathan,

More than likely you will cringe when you see this reply from me, but
it isn't bad; in context, so there is no need. Anyway...
One should use a module when there is no "object" associated with the
functions you are writing.


Exactly, everything has a purpose and there is no right or wrong way
about programming. Some techniques prove much better for certain uses
than OOP does. It all depends on what you are trying to achieve.
Too often people become enamored with "Object Orientated" and forget that
objects are not everything, they are just another tool. And like all
tools,
there are times when they should not be used.


ACK.
Off the top of my head, VB's FileSystemObject. You have to create an
instance of the FSO before using it, even though you will never need more
than one FSO. In fact, you could create a hundred of them and they would
all
be exactly the same.


I'm a little OT, but I started using JAVA before I used the beta of
VB.NET and I am rather surprised as to how close the JAVA "run-time" is to
the .NET Framework, the way the class hierarchy is laid out is almost
identical in certain circumstances. I'm sure Microsoft had a lot to say
but it just goes to show how much the CLR is needed! I crated my own file
objects for VB6 that are almost identical to VB.NET, it's weird how an
inferior "desktop" language has come up with far better ideas!
I cringe whenever I someone mentions a "singleton" pattern. In all most
all
cases, your so-called singleton is really just a global variable that
people
pretend is a class.


But even they have their uses. For example, if you are sharing objects
between instances then sometimes a singleton is essential! For example,
if I create a singleton object for my application it would make it much
easier for me to maintain only 1 running instance. This appears to be
something that is really overlooked by people that utilize command line
arguments, a singleton is essential! What's the point in having an MDI
application with multiple instances?

Nick.

Nov 21 '05 #15
> But even they have their uses. For example, if you are sharing
objects
between instances then sometimes a singleton is essential!
Well, there are cases when you want a pointer to either "this single
instance" or "that single instance". For example, different engineer for
calculating geographical distance. (Geo-distance is a lot harder than one
might suppose.)
For example, if
I create a singleton object for my application it would make it much easier for me to maintain only 1 running instance.
Bad example. Each instance of the application would have an instance of the
singleton.
This appears to be something
that is really overlooked by people that utilize command line arguments, a
singleton is essential!
I've never used one, I just use a module.
What's the point in having an MDI application with
multiple instances?
True.But if for some reason you later decide you really do want multiple
instances of the main window, you'll be glad you didn't use the singleton's
global.

*****************

Accidental Classes OR How I just screwed up.

If you find that your class has this pattern, you screwed up...

1. There is a shared array.
2. All created objects are stored in the array.
3. There are lots of shared methods that work on said array.

I didn't notice at the time, but I had a collection class hidden within my
shared fields/methods. Now that I need two instances of that collection, I
am [insert explicative here].

In this instance, I should have used a real singleton in order to allow me
more flexibility over the long run.

--
Jonathan Allen
"Nak" <a@a.com> wrote in message
news:eN**************@TK2MSFTNGP15.phx.gbl... Hi Jonathan,

More than likely you will cringe when you see this reply from me, but it isn't bad; in context, so there is no need. Anyway...
One should use a module when there is no "object" associated with the
functions you are writing.
Exactly, everything has a purpose and there is no right or wrong way
about programming. Some techniques prove much better for certain uses

than OOP does. It all depends on what you are trying to achieve.
Too often people become enamored with "Object Orientated" and forget that objects are not everything, they are just another tool. And like all
tools,
there are times when they should not be used.
ACK.
Off the top of my head, VB's FileSystemObject. You have to create an
instance of the FSO before using it, even though you will never need more than one FSO. In fact, you could create a hundred of them and they would
all
be exactly the same.


I'm a little OT, but I started using JAVA before I used the beta of
VB.NET and I am rather surprised as to how close the JAVA "run-time" is to
the .NET Framework, the way the class hierarchy is laid out is almost
identical in certain circumstances. I'm sure Microsoft had a lot to say

but it just goes to show how much the CLR is needed! I crated my own file
objects for VB6 that are almost identical to VB.NET, it's weird how an
inferior "desktop" language has come up with far better ideas!
I cringe whenever I someone mentions a "singleton" pattern. In all most
all
cases, your so-called singleton is really just a global variable that
people
pretend is a class.
But even they have their uses. For example, if you are sharing

objects between instances then sometimes a singleton is essential! For example, if I create a singleton object for my application it would make it much easier for me to maintain only 1 running instance. This appears to be something
that is really overlooked by people that utilize command line arguments, a
singleton is essential! What's the point in having an MDI application with multiple instances?

Nick.

Nov 21 '05 #16
Nak
Hi Jonathan,
Bad example. Each instance of the application would have an instance of
the
singleton.
As far as I am aware there is more than one type of singleton. If you
implement a singleton object that uses remoting then you have the perfect
solution, I've been using it now for quite a while and I haven't actually
used anything that's been more reliable or easy to implement. That's after
I got past the initial confusion of remoting.
I've never used one, I just use a module.
They are worth looking into, imagine multiple instances of Adobe
Photoshop, 1 is enough for me that's for sure. But having that quick link
between your instances is great, it saves allot of time and stops you having
to mess around with window messaging and the like.
True.But if for some reason you later decide you really do want multiple
instances of the main window, you'll be glad you didn't use the
singleton's
global.
Well that's where a singleton's flexibility comes in, I'm sure it
wouldn't be difficult to set a maximum number of instances, and when you
launch 1 after the limit has been met; to have the choice of which instance
to send the arguments too.
Accidental Classes OR How I just screwed up.

If you find that your class has this pattern, you screwed up...

1. There is a shared array.
2. All created objects are stored in the array.
3. There are lots of shared methods that work on said array.

I didn't notice at the time, but I had a collection class hidden within my
shared fields/methods. Now that I need two instances of that collection, I
am [insert explicative here].

In this instance, I should have used a real singleton in order to allow me
more flexibility over the long run.


I'm obviously no master of singleton implementation, most of the
information that I found about it was written by an MVP in here, though I
can't remember the exact person, may have been Jay. Anyway, I think the
phrase is "6ugger"!

http://www.codeproject.com/dotnet/remotingsingleton.asp

^Check that out :-) With a remoting singleton you could even maintain 1
instance across a network, though I'm sure it wouldn't be without it's
difficulties!

Nick.
Nov 21 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bo Peng | last post by:
Dear list, I am writing a Python extension module that needs a way to expose pieces of a big C array to python. Currently, I am using NumPy like the following: PyObject* res =...
5
by: dody suria wijaya | last post by:
I found this problem when trying to split a module into two. Here's an example: ============== #Module a (a.py): from b import * class Main: pass ============== ==============
4
by: Edvard Majakari | last post by:
Greetings, fellow Pythonistas! I'm about to create three modules. As an avid TDD fan I'd like to create typical 'use-cases' for each of these modules. One of them is rather large, and I wondered...
2
by: Reid Priedhorsky | last post by:
Dear group, I'd have a class defined in one module, which descends from another class defined in a different module. I'd like the superclass to be able to access objects defined in the first...
25
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30...
10
by: Bonzol | last post by:
vb.net Hey there, could someone just tell me what the differnce is between classes and modules and when each one would be used compared to the other? Any help would be great Thanx in...
9
by: Rudy | last post by:
Hello All! I'm a little confused on Public Class or Modules. Say I have a this on form "A" Public Sub Subtract() Dim Invoice As Decimal Dim Wage As Decimal Static PO As Decimal Invoice =...
32
by: Matias Jansson | last post by:
I come from a background of Java and C# where it is common practise to have one class per file in the file/project structure. As I have understood it, it is more common practice to have many...
6
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
13
by: André | last post by:
Hi, i'm developping asp.net applications and therefore i use VB.net. I have some questions about best practises. According what i read about class and module and if i understand it right, a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.