Visual Basic.net

P

Philipp

I think it is also a vb.net question, because I read in the internet, that
the vb.net oop is different from the originally oop concept.....;)))

thanks very much!

best wisches
 
B

bingomanatee

coming a bit late to the party are we?

I would say first off that VB.net and C# are both pretty complete
implementations of OOP. Although VB definately allows for old style
procedural code in places, OOP is pretty well spelled out in VB.NET.

OOP includes a few basic concepts.
* representing elements as self contained collections of data
(variables, nouns) and methods (subs, actions) that can be used to
allow objects to interact.
* Allowing objects to be created based on "Platonic" object types
(templates) or to be specializations of more generic "Prototypes"(elkis
to mammal), carrying along the basic qualities that define the
prototype. (the elk has fur, but not all mammals have horns).
*Allowing objects to be treated in similar ways based on their
prototypes (if you can skin or eat a mammal, you can skin or eat an
elk).

VB.NET pretty much has a check in every box.

If you want more detail on Object Theory, pick up a book on UML or read
the introduction to pretty much every programming book on VB, C#, or
Java. (you can do this at the bookstore. the concept's not that
expansive.)

It is actually pretty difficult to find a language nowadays that is NOT
object oriented in some way. If you want a counterpoint to hammer the
concept home, check out PHP. It does have allowances for objects, but
the vast majority of PHP applicaitions use basic variables and arrays
and functions, which is a proceedural approach. This will probably
change after PHP 5 is established (or maybe 6 -- the PHP crowd is
pretty entrenched in procedural code).

JavaScript is another popular example of a language which does not
force OOP methodology on you. You can access objects that reflect the
web pages' information and (though this is not emphasized in the
documentation) define and use custom objects with JavaScript, the
latter is in practice rare.

NOW: a few myths to bust:
Object Oriented Code does NOT solve problems in and of itself. It is a
framework for rethinking your task and defining it a more real world
based paradigm, but you can create bad code in OOP just like you can in
procedural code. OOP will not save you from yourself.

OOP does NOT save you time... at least in the beginning. It may take
longer to define a task in an object oriented paradigm than to crunch
out some procedural code, but if you plan to live with your codebase
for any amount of time, you will find it time worth spending.

Back to my previous example, most PHP coders can beat the pants out of
an OOP team in terms of benchmarks for simple projects. This in some
contexts makes PHP a "better" language for handling simple tasks like
form processing, SQL reporting and other basic tasks. Object Oriented
coding does have a certain amount of "Overhead".

That being said, the VB environment is absolutely hands down the best
IDE I have ever seen for any language in the last 12 years and if you
are not already entrenched in a coding language, it is a great place to
begin your exploration of Object Oriented coding.
 
P

Philipp

Hey, thanks very much, for your answer, it helps me a lot.
Currently I am writing program code in VB6.0 and Cobol, but also in C. Do
you think that VB.net is good example for a oop-language or is "vb.net oop"
different from the origanilly concept?

thanks very very much

best wishes.
 
P

Philipp

Hey, I have another questions: What are the main differenties between VB6
and .NET excepting the oop concept?

thanks
best wishes
 
H

Herfried K. Wagner [MVP]

Philipp said:
Hey, thanks very much, for your answer, it helps me a lot.
Currently I am writing program code in VB6.0 and Cobol, but also in C. Do
you think that VB.net is good example for a oop-language or is "vb.net
oop"
different from the origanilly concept?

VB.NET is a PIE language, which means that it implements the OO concepts
polymorphism, inheritance, and encapsulation. Yes, VB.NET is a good example
for a modern, object-oriented programming language.
 
P

Philipp

Hey @ all

I have another question to you:

How hard is the change from Visual Basic 6.0 to VB.net?

regards philipp
 
H

Herfried K. Wagner [MVP]

Philipp said:
How hard is the change from Visual Basic 6.0 to VB.net?

That's hard to say, because it strongly depends on your familiarity with OO.
However, it's a huge change, technically VB.NET is not a successor of VB6.
 
P

Philipp

I know VB since 4 years and VB.net since 2 days and I think that the change
from VB to VB.net harder than from C++ or Java to VB.net - this probably the
oop - concept. Every programmer say, that VB.net is so nice and so powerful,
but what are the disadvantages????, every language has disadvantages i
think.

thanks very very much!
 
H

Herfried K. Wagner [MVP]

Philipp said:
I know VB since 4 years and VB.net since 2 days and I think that the change
from VB to VB.net harder than from C++ or Java to VB.net - this probably
the
oop - concept. Every programmer say, that VB.net is so nice and so
powerful,
but what are the disadvantages????, every language has disadvantages i
think.

From a technical point of view VB.NET is a great programming language.
There are very few technical reasons for choosing another programming
language to develop applications for the .NET Framework.

However, VB/VB.NET has one huge disadvantage: Customers' investments made
in the VB programming language were not preserved in the past when a new
"version" of the language was released, at least not at the level it was
done for other programming languages (VC++, VFP, ...). Microsoft has
decided to dispose VB6 and consequently disposed its customers' assets.
There is no guarantee that this won't happen again in a few years. If you
are not writing throw-away tools, I suggest to use C++, because that is what
Microsoft uses and for that reason won't dispose.

Just my 2 Euro cents...
 
P

Philipp

Hmm, this is a problem, but the main reason why I am interested in VB.net is
because in C++ it is much harder to connect to a sql-server database and
this is required.
Whats about the connection to an existing SQL Server Database - does VB.net
assist SQL Server 2000 or I need SQL Server 2005? - I already downloaded the
VB.net BETA Version from Microsoft and the installer from MS install
automatically the SQL Server 2005 Beta...

thank you very much for your help!

regards
 
C

Cor Ligthert

Philipp,

The same as from C to C++.

The language elements are the same, the way of using it is different.

Just my opinon.

Cor
 
C

Cor Ligthert

Herfried,
That's hard to say, because it strongly depends on your familiarity with
OO. However, it's a huge change, technically VB.NET is not a successor of
VB6.
I don't see the relation to the question in this answer. It is for Microsoft
a successor from VB6 where it is in our both opinion absolute not a child of
VB6. We have forever had the same idea about that.

However that something can be a successor without to be a child, we see
more, by instance when you see the history of all European countries, there
have (I thought beside Austria) been a lot of "successors" that where not
the child of there predecessor and still it where successors.

When you have an opposite meaning of that, than you should tell that in my
opinion in a message in his context. Now it sounds if it is Microsoft who is
telling this, while it is in my opinion just your and some others idea about
the subject. ("Some" related to the millions of users).

However, probably was this just wrong use of the word successor by you.

Cor
 
B

Bob Powell [MVP]

I think that in fairness to Microsoft and it's recent controversial
announcement, VB6 is an old dog that should have been put down years ago. To
maintain a language entrenched in 1960's programming ideas for so long was
not good for the VB community. This is evidenced by the fact that there are
so many VB programmers today who are still asking the fundamental question
"What is OOP?"

Object oriented programming was invented in 1968 and even C++ was 15 years
down the road from that milestone. The VB6 crowd have a lot of catching up
to do.

Regarding your comment on using C++ I would say that the fact that ASP+ is
written largely in C# with a little C++ mixed in and that more and more
products at Microsoft use C# as the primary source code suggests that this
lanaguage and, by association, .NET won't go away.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
H

Herfried K. Wagner [MVP]

Bob,

Bob Powell said:
I think that in fairness to Microsoft and it's recent controversial
announcement, VB6 is an old dog that should have been put down years ago.
To maintain a language entrenched in 1960's programming ideas for so long
was not good for the VB community. This is evidenced by the fact that there
are so many VB programmers today who are still asking the fundamental
question "What is OOP?"

I disagree. VB6 should have been /extended/ to support OO without breaking
existing code. This would have been possible, Microsoft worked on such a
VB7. Over the time there were improvements of OO support in VB, and VB7 was
expected to contain better/full OO support. However, VB7 has never been
released; instead, an incompatible VB.NET was marketed as VB6's successor,
which technically is not true.

I don't think that a platform or technology shift is a bad thing, I believe
it's necessary from time to time. Nevertheless, typically a programming
language should /abstract/ from platforms and technologies and thus a change
in platform or technology should not break existing code. Microsoft chose
to design a programming language from scratch instead of evolutionarily
extending an existing programming language.
Object oriented programming was invented in 1968 and even C++ was 15 years
down the road from that milestone. The VB6 crowd have a lot of catching up
to do.

Well, VB contains lots of things C++ doesn't provide, decent property
support, for example. Do you think this is a reason for "putting down C++"?
Languages can evolve over time and missing features are added, but this must
not be a revolutionary change.
Regarding your comment on using C++ I would say that the fact that ASP+ is
written largely in C# with a little C++ mixed in and that more and more
products at Microsoft use C# as the primary source code suggests that this
lanaguage and, by association, .NET won't go away.

Did anybody think that COM will be "deprecated" and replaced by .NET some
years ago? It's utopistic to think that .NET won't have a, most likely
incompatible, successor.
 
H

Herfried K. Wagner [MVP]

Cor,

Cor Ligthert said:
I don't see the relation to the question in this answer. It is for
Microsoft a successor from VB6 where it is in our both opinion absolute
not a child of VB6. We have forever had the same idea about that.

I wrote "technically" to make clear that I am not referring to Microsoft's
marketing of VB/VB.NET. For the rest, I agree with you.
 
P

Philipp

Good morning ;))))

Yesterday I read an article about the .net framework and the article say
that a .net framework is also available for Mac OSX and FreeBSD is this
correct and when it is so, can I also use all .net languages on the FREEBSD
framework?

philipp
 
M

Mark Rae

How hard is the change from Visual Basic 6.0 to VB.net?

IMO, you need to think about it differently. You firstly need to focus on
learning the .NET Framework and its namespaces - that's where the big
learning curve will be. After that, it really doesn't matter too much which
language you use to write your managed code in - VB.NET, C#, C++, even J# if
you enjoy being in the minority.

The syntax of VB.NET is almost identical to that of VB6 - the underlying
engine is totally different. As has been mentioned before, if you think of
VB.NET as a a totally new language rather than VB7, you'll be fine :)
 

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

Top