VB.net and graphics

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

--
hello

In VB6 you can do graphics OK with directx and API's.
I can do OOP in VB6.
The graphics routines may be different tha VB.net but are they easierto code
in than VB6.
Just being different isnt a good enough reason to start using VB.net a lot
for graphics and neither is the overrated argument of being OOP ( which I
could do basically in VB6 anyway). There must be a positive somewhere.
 
john andrew said:
In VB6 you can do graphics OK with directx and API's.
I can do OOP in VB6.

VB6 doesn't support PIE (Polymorphism, Inheritance, Encapsulation) out of
the box as language features, while VB.NET does. I'd suggest to take a look
at how OOP is supported by VB.NET, for example, by studying the
documentation, in order to see the differences and advantages of VB when
dealing with lots of classes.
 
john andrew said:
--
hello

In VB6 you can do graphics OK with directx and API's.
I can do OOP in VB6.
The graphics routines may be different tha VB.net but are they easierto
code
in than VB6.
Just being different isnt a good enough reason to start using VB.net a lot
for graphics and neither is the overrated argument of being OOP ( which I
could do basically in VB6 anyway). There must be a positive somewhere.

I'm a vb6 programmer, been using vb.net for the last 2.5 years.
VB for 10 years or something.
I far prefer vb.net.
There's a steep learning curve.
At first I had my doubts whether the climb was worth the effort.

Not really done enough graphics work to say whether vb.net is really better
at that.
I've done a lot of database work though.
It's easier and quicker to write common business screens in vb.net.
It'll be even easier with the next version and the data view grid wossname.

I suppose the difference is probably clearer with asp and asp.net though.
Web stuff is a hell of a lot easier with dotnet.

I was never really a big fan of OOP until I started working with dotnet.
No I'm inheriting from aggregated controls and all that mallarky....
Very powerful.
 
John,
and neither is the overrated argument of being OOP ( which I
could do basically in VB6 anyway). There must be a positive somewhere.
Ah! there's the rub!

Remember an OO language supports the following 4 concepts:
1. Abstraction - ability to define new types (Classes, VB.NET Structures &
VB6 Types)
2. Encapsulation - ability to add "behavior" to new types (Sub, Function, &
Property or Classes)
3. Polymorphism - ability to use the same expression to denote different
operations (see below)
4. Inheritance - ability to define one type based on another (the new
Inherits keyword)


VB6 only allows you to do "basic" OO, it only partially allows the first
three Abstraction, Encapsulation & Interface Inclusion Polymorphism. It only
allows encapsulation on Classes & not Types.

While VB.NET allows you to do "full" OO, it supports all four with varying
levels for #3 (depending on version!).

In addition to Abstraction, Encapsulation & Interface Inclusion Polymorphism
that VB6 supports.

It allows: Inheritance, Inheritance Inclusion Polymorphism, Overloading
Polymorphism. VB.NET 2005 (aka Whidbey, due out later in 2005) will add
Custom Coercion Polymorphism (Operator Overloading) & Parametric
Polymorphism (Generics).

It allows Structures to encapsulate any behavior by allowing Subs,
Functions, Properties & Events to be added to a Structure in addition to a
Class.


So yes, VB6 supports a very basic (very limited) level of OO, while VB.NET
(especially in VB.NET 2005) supports a significantly greater level of OO.

*NOTE: Both VB6 & VB.NET support late binding which is a form of
polymorphism, that a number of OO languages (except possibly Smalltalk) do
not support.


Polymorphism definitions taken from:
http://www.javaworld.com/javaworld/jw-04-2001/jw-0413-polymorph.html

1: Coercion - a single abstraction serves several types through conversion
2: Overloading - a single identifier denotes several abstractions
3: Parametric - an abstraction operates uniformly across different types
4: Inclusion - an abstraction operates through an inclusion relation

Within VB.NET the math operators are examples of coercion polymorphism. You
can use the + operator on two integers to add them, you can also use the +
operator on singles & doubles which also adds them. In other words the +
operator is 'overloaded' for different built-in types. While C# allows
developers to define overload operators. VB.NET needs to wait for Whidbey
(VS.NET 2005) for operator overloading.

Within VB.NET we are allowed to overload members (overloading polymorphism)
within a single type as long as the parameter signatures are unique. Across
types we are free to overload members irregardless of signatures. Of course
VB.NET does define certain rules for overloading such as you cannot have a
function & a field with exactly the same name. ;-)

We will need to wait for Whidbey (VS.NET 2005) to gain Parametric
Polymorphism (a.k.a Generics).

Within VB.NET Inclusion polymorphism is subtype polymorphism. Using Inherits
or Implements to define a type that is also another type (where type is a
Class, Structure, or Interface). Normally when developers are talking
Polymorphism they are referring to this type of Polymorphism. NOTE: VB.NET
supports both Inherits & Implements while VB6 only supports Implements.

Whidbey information taken from:
http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx
http://lab.msdn.microsoft.com/vs2005/

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top