By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,607 Members | 1,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,607 IT Pros & Developers. It's quick & easy.

OOP: should I learn it?

P: n/a
I've been spending alot of time learning vb.net the past 6 months (for
regular winform apps. Been somewhat experienced in asp.net for a few
years)

But my style has been using Procedural techniques, rather than OOP.
Lately i've read more and more how OOP is the way to go. So i'm trying
to learn it, and boy is it difficult if you've not worked that way much
before!

I ran into this web site: http://www.geocities.com/tablizer/oopbad.htm
It swears that OOP is over-hyped, and says that Procedural is better.
It has many arguments against OOP.

Do you pros think the info on that site has eny merrit? Or is the
author just trying to get some attention?

Thanks,
John

Nov 21 '05 #1
Share this Question
Share on Google+
21 Replies

P: n/a
Everything has its time and place. Knowing all the methodologies will allow
you to choose the right one for a particular project.

"johnb41" <or****@informatik.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I've been spending alot of time learning vb.net the past 6 months (for
regular winform apps. Been somewhat experienced in asp.net for a few
years)

But my style has been using Procedural techniques, rather than OOP.
Lately i've read more and more how OOP is the way to go. So i'm trying
to learn it, and boy is it difficult if you've not worked that way much
before!

I ran into this web site: http://www.geocities.com/tablizer/oopbad.htm
It swears that OOP is over-hyped, and says that Procedural is better.
It has many arguments against OOP.

Do you pros think the info on that site has eny merrit? Or is the
author just trying to get some attention?

Thanks,
John

Nov 21 '05 #2

P: n/a
"johnb41" <or****@informatik.com> schrieb:
I've been spending alot of time learning vb.net the past 6 months (for
regular winform apps. Been somewhat experienced in asp.net for a few
years)

But my style has been using Procedural techniques, rather than OOP.
Lately i've read more and more how OOP is the way to go. So i'm trying
to learn it, and boy is it difficult if you've not worked that way much
before!


I would learn OOP although it is a hype and often not the most suitable
tool. OO is an important technique in every programmer's toolbox.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
Well, like it or not, all modern programs for Windows are going to be
based primarily on OOP. And if you plan to use .NET, everything is
an object!

Here is a decent book that I first read when I worked in Delphi. It
does a decent job of explaining OOP.

http://www.amazon.com/exec/obidos/tg...39345?v=glance

Nov 21 '05 #4

P: n/a
That guy's a procedural ideologue, I wouldn't give him much credit. When
you see someone using that much rhetoric to make what they claim is a valid
& logical point, that's a bit of a warning sign that their point isn't as
valid or logical as they claim.

I suggest you study OOP then ask yourself which you think is best. You
might actually like OOP once you get to know it.

"johnb41" <or****@informatik.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I ran into this web site: http://www.geocities.com/tablizer/oopbad.htm
It swears that OOP is over-hyped, and says that Procedural is better.
It has many arguments against OOP.

Do you pros think the info on that site has eny merrit? Or is the
author just trying to get some attention?

Nov 21 '05 #5

P: n/a
John,

I would not spent to much time on it.

Just try to avoid:
- modules
- shared classes
- placing your declaration global
- placing your declaration in top of a method
- access to variables in another class others than that there are public
properties for that

You will see that sooner of later you are using OOP

(And buy than a good book or documentation about it how you can improve
that)

Just my thought,

Cor
Nov 21 '05 #6

P: n/a

"johnb41" <or****@informatik.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I've been spending alot of time learning vb.net the past 6 months (for
regular winform apps. Been somewhat experienced in asp.net for a few
years)

But my style has been using Procedural techniques, rather than OOP.
Lately i've read more and more how OOP is the way to go. So i'm trying
to learn it, and boy is it difficult if you've not worked that way much
before!

I ran into this web site: http://www.geocities.com/tablizer/oopbad.htm
It swears that OOP is over-hyped, and says that Procedural is better.
It has many arguments against OOP.

Do you pros think the info on that site has eny merrit? Or is the
author just trying to get some attention?

Thanks,
John

Look at it this way.
C++(hybrid, actually), C#, VB.NET, Java, etc., etc. are all object oriented
languages. Why is that, I wonder?
I would be the last person to tell you that OO is the *only* way, but it has
many appealing real world advantages conveniently ignored by the procedural
zealot.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Nov 21 '05 #7

P: n/a
"Workgroups" <no*****@domainless.com> schrieb:
That guy's a procedural ideologue, I wouldn't give him much credit.


OOP only puts a meta-structure over procedural programming. Procedural
programming is still one of the main programming techniques. I often see OO
code written by people claiming that they are "system architects" which show
a lack of knowledge in procedural programming. Thus the solutions may have
a good object model, but the implementation is flawed.

It's never good to have only a single tool in the toolbox, especially if you
need to combine the tools to get the best solution.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #8

P: n/a
Cor,

"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
Just try to avoid:
[...]
- placing your declaration in top of a method
[...]
You will see that sooner of later you are using OOP


Block-level scope is not an OO feature.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #9

P: n/a
Herfried,

Do you have advice on when is a good time to use OOP and when it is
not? How do I know?

John

Nov 21 '05 #10

P: n/a
"johnb41" <or****@informatik.com> schrieb:
Do you have advice on when is a good time to use OOP and when it is
not? How do I know?


Databases are one example. In this field relational databases/programming
is currently used in most cases because it has benefits over object-oriented
databases/programming. In simple scripting scenarios procedural programming
is often sufficient and object-oriented programming is oversized.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #11

P: n/a
"johnb41" <or****@informatik.com> schrieb:
Do you have advice on when is a good time to use OOP and when it is
not? How do I know?


Databases are one example. In this field relational databases/programming
is currently used in most cases because it has benefits over object-oriented
databases/programming. In simple scripting scenarios procedural programming
is often sufficient and object-oriented programming is oversized.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #12

P: n/a

"Workgroups" <no*****@domainless.com> schrieb:
That guy's a procedural ideologue, I wouldn't give him much credit.

This was well said!
Herfried K. Wagner [MVP] wrote:
OOP only puts a meta-structure over procedural programming.


This is true. All code is procedural at some level. However, OOP's
abstraction and data-hiding concepts make it possible for a single
programmer to code very complex programs single handedly. Making an
argument that objects shouldn't be abstracted and modeled in classes is
like making an argument that tasks like writing to the console shouldn't
be represented and abstracted into functions.

Even if OOP isn't the best methodology, it's is simply what is in use
today (in Windows, in .NET, in Java, etc.) Sure, you can make an
argument that OOP should be less prevalent in programming today, but
that's like saying that books in English should be less prevalent,
because other languages are more concise and descriptive.

Idealists don't really change the world, they just annoy it. In the
end, it's a lot easier just to use things the way they are to your own
advantage, rather than insisting on reinventing the wheel.

-Joel

Nov 21 '05 #13

P: n/a

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eX**************@TK2MSFTNGP14.phx.gbl...
"Workgroups" <no*****@domainless.com> schrieb:
That guy's a procedural ideologue, I wouldn't give him much credit.


OOP only puts a meta-structure over procedural programming. Procedural
programming is still one of the main programming techniques. I often see
OO code written by people claiming that they are "system architects" which
show a lack of knowledge in procedural programming. Thus the solutions
may have a good object model, but the implementation is flawed.

It's never good to have only a single tool in the toolbox, especially if
you need to combine the tools to get the best solution.


I don't disagree with you.

But none of this justifies the outrageously misleading demonization of OOP
found on that website. The numerous vague examples where the philosophy
itself is roped into a faulty guilt-by-association with the implementation;
the attempt at prophetically equating the spread of OOP to the spread of
communism; a particularly obnoxious claim that the basic human learning
process (starting small and building upon core concepts) is, within the
context of OOP, a devious "bait and switch" drummed up by the OOP "pushers";
he implies that those who embrace OOP are "elitist". This ideological
rhetoric is woven into the fabric of every article.

I'm sure the guy is a good procedural programmer, but his website is not
exactly what I'd call a "fair" analysis of OOP.
Nov 21 '05 #14

P: n/a
Herfried,

Block-level scope is not an OO feature.

That is not the intention. The intention is to force you to use OO in VBNet.

Block-level scope learns in my opinion the behaviour of the constructing and
deconstructing from an value/object

However, I agree with you that this was for me as well a little bit a kind
of decision if I would include that in the text or not

While I left out passing values using a constructor

Cor

Nov 21 '05 #15

P: n/a
Herfried,

Databases are one example. In this field relational databases/programming
is currently used in most cases because it has benefits over
object-oriented
databases/programming. In simple scripting scenarios procedural
programming
is often sufficient and object-oriented programming is oversized.

--

I absolutly disagree with you. The concept of the dataset (what is one big
container of objects needed for database programming) is for me a good
example how by using objects than all kind of structures, values or whatever
things which are everywhere placed in a program, data handling with well
organised objects can be done more secure, documented and easier (This is as
well for me when there are own classes created to handle and store the data
objects).

The reason that with databases still a lot of non object oriented procedures
are used is because some of those programs which handles that (and used
language or methods) are from before 1980. As I have seen an in your opinion
benefit, that we forever disagree about.

However just my opinion.

Cor
Nov 21 '05 #16

P: n/a
Tym
On Thu, 28 Jul 2005 17:40:25 -0500, Joel Whitehouse
<jo************@gmail.com> wrote:
Making an
argument that objects shouldn't be abstracted and modeled in classes


Being an old procedural programmer (Turbo Basic) I "migrated" to VB a
few years ago, and am now toying with VB.Net

Obviously I've grasped the principles of forms and modules, but am
lost as to what classes are!

Could someone give me an idiot's guide to what's what in vb??
---
Tym

Please do not adjust your brain, there is a fault with reality
Nov 21 '05 #17

P: n/a
Tym,

A class is a template (type) from which you can make (instance) an object.

That class (instanced object) can contain as every program
Methods
Variables (including properties the accessors to that)
Events

You can use shared (static) methods and variables in a class direct because
those are part of the application.

That is all.

I hope this helps,

Cor
Nov 21 '05 #18

P: n/a
"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
Databases are one example. In this field relational
databases/programming
is currently used in most cases because it has benefits over
object-oriented
databases/programming. In simple scripting scenarios procedural
programming
is often sufficient and object-oriented programming is oversized.


I absolutly disagree with you. The concept of the dataset (what is one big
container of objects needed for database programming) is for me a good
example how by using objects than all kind of structures, values or
whatever things which are everywhere placed in a program, data handling
with well organised objects can be done more secure, documented and easier
(This is as well for me when there are own classes created to handle and
store the data objects).


I was talking about relational databases query languages like SQL. Even
datasets are only a thin wrapper around relational databases and
programming. IIRC there are plans to include features for convenient access
to relational databases into the VB and C# programming languages.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #19

P: n/a
Tym
On Fri, 29 Jul 2005 10:13:35 +0200, "Cor Ligthert [MVP]"
<no************@planet.nl> wrote:
A class is a template (type) from which you can make (instance) an object.


So we're back to the OOP debate again? >:->

Thanks for your explanation - are there any good online tutorials for
class modules?
---
Tym

Please do not adjust your brain, there is a fault with reality
Nov 21 '05 #20

P: n/a
"Workgroups" <no*****@domainless.com> schrieb:
That guy's a procedural ideologue, I wouldn't give him much credit.
OOP only puts a meta-structure over procedural programming. Procedural
programming is still one of the main programming techniques. I often see
OO code written by people claiming that they are "system architects"
which show a lack of knowledge in procedural programming. Thus the
solutions may have a good object model, but the implementation is flawed.

It's never good to have only a single tool in the toolbox, especially if
you need to combine the tools to get the best solution.


I don't disagree with you.

But none of this justifies the outrageously misleading demonization of OOP
found on that website. The numerous vague examples where the philosophy
itself is roped into a faulty guilt-by-association with the
implementation; the attempt at prophetically equating the spread of OOP to
the spread of communism; a particularly obnoxious claim that the basic
human learning process (starting small and building upon core concepts)
is, within the context of OOP, a devious "bait and switch" drummed up by
the OOP "pushers"; he implies that those who embrace OOP are "elitist".
This ideological rhetoric is woven into the fabric of every article.


ACK. I don't think that this is a good idea, but it's always interesting
for me to see the different points of view ;-).
I'm sure the guy is a good procedural programmer, but his website is not
exactly what I'd call a "fair" analysis of OOP.


ACK. However, it raises some interesting points. It's the exact opposite
of pro-OO-evangelism ;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #21

P: n/a

"johnb41" <or****@informatik.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
: I've been spending alot of time learning vb.net the past 6 months (for
: regular winform apps. Been somewhat experienced in asp.net for a few
: years)
:
: But my style has been using Procedural techniques, rather than OOP.
: Lately i've read more and more how OOP is the way to go. So i'm
: trying to learn it, and boy is it difficult if you've not worked
: that way much before!
:
: I ran into this web site: http://www.geocities.com/tablizer/oopbad.htm
: It swears that OOP is over-hyped, and says that Procedural is better.
: It has many arguments against OOP.
:
: Do you pros think the info on that site has eny merrit? Or is the
: author just trying to get some attention?
:
: Thanks,
: John
The short answer to your question is, yes - you would do well to learn
and understand the OO programming model. Whether you choose to use it
will depend on your personal preferences as well as the task at hand.
However, OOP seems to be moving towards becoming the dominant paradigm
in modern languages: C++, Java and .Net are just a few examples that
represent mainstream languages. Even the venerable Javascript scripting
language allows the developer to utilized a limited implementation of
OOP.
I'm a relatively recent convert to the OOP approach (dare I say,
'paradigm') and frankly I think it's great. As a pratical matter
however, I use both approaches. I think a pure OO approach has its
shortcomings. As a result, I tend to think more in terms of a component
model approach rather than a pure object model.
I work for a company that makes extensive use of VB based COM+
components. While not OO proper, the concept of a component model is
very close in my mind. You have code and data encapsulation as well as
limited polymorphism (via implementation). The full OO implementation of
VB.net, C#, etc., makes that approach more robust and flexible (in
particular, I think function overloading is the best thing to come along
since individually wrapped cheese slices). Components, like objects,
allow you to isolate and reuse code in a manner I consider to be much
more flexible than a procedural model. They become black boxes that do a
job and the calling process can, at least in principle, disregard how a
component/object does its magic (although in the real world, that is not
always realisitic).
On the other hand, we have a large legacy of classic ASP web pages which
I help maintain and there the coding is strictly top down. Other than
calling COM+ components to implement business logic and access the data
layer (as well as using the occasional function embedded in the page),
the code is basicly start at line 1 and go until you reach the end, a
redirect, an error or a 'response.end' statement.
Of the two types of coding I do, I much prefer the compartmentalization
of the component model and so find myself very much at home in an OOP
environment. For my own coding outside my work environment, I much
prefer to think and code using a component/object model instead of the
top down approach. I even go so far as to use the limited object
oriented features of javascript on the client whenever it is a practical
alternative.
As for the website you've listed, I found it interesting but not
terribly compelling. I tend to agree with others that the arguments are
overstated.
"Procedural" programming techniques are themselves the result of an
evolutionary, and sometimes revolutionary, progression. At one time,
procedural languges were line number based, riddled with goto and
gosub/return statements, lacked variable typing and everything was
global (etc.). The introduction of a structured model changed all that:
variables and processes were given scope, variables could be typed
(double, integer, string, etc.); conditional blocks and loops were
easier to construct; and the program flow was more intuitive and self
documenting (e.g.: the statement 'Call OutputLogFile(Path, Data)' is
much better than '1365 gosub 1400' - we know what the call is for and
what variables are involved, etc.).
Still, this approach has its limits: core data for process A is visible
and can be changed by process B; everything you need in order to make
the program run has to be included in the program itself (resulting in
duplicated code and creating major maintenanance headaches); function
calls are not sufficiently flexible to allow one to implement similar
functionality with different input types; etc., etc.
OO attempts to address these concerns. All in all, OO is a major
improvement over a strictly top down, procedural approach which is
reflected by the fact that the IT community has largely embraced it.
Developing OO languages and using them represent a huge financial
commitment on the part of companies like MS; .Net (as Java was before
it) was a major effort to bring about. Companies that use the technology
have to make significant outlays of capital in order to make use of the
new technology. The fact that the business community is making this
switch (slowly perhaps, but nonetheless) reflects the value that OO
offers.
Ralf
--
----------------------------------------------------------
* ^~^ ^~^ *
* _ {~ ~} {~ ~} _ *
* /_``>*< >*<''_\ *
* (\--_)++) (++(_--/) *
----------------------------------------------------------
There are no advanced students in Aikido - there are only
competent beginners. There are no advanced techniques -
only the correct application of basic principles.
Nov 21 '05 #22

This discussion thread is closed

Replies have been disabled for this discussion.