[Tutor] impact of OO

Erik Price erikprice@mac.com
Thu, 4 Apr 2002 19:13:56 -0500


I have a general question about Object Oriented programming in general:  
why is it so lauded by... well, by everyone?

Granted, this is coming from Erik Newbie, and I only just figured out 
the basics of OO programming this week.  Obviously I haven't seen even 
close to the extent of what OO programming can do.  But that's why I'm 
asking this question.

It seems to make certain things easier -- for instance, in my 
application that I'm writing in PHP (whose OO facilities are no match 
for Python's, I've discovered :( ), I am now using objects to represent 
items which need to be inserted into the database, that I used to refer 
to with a group of variable names.  It's hard to describe, but this 
makes it much easier -- attributes/properties represent field names, and 
I can neatly group all of my error-checking functions (for user inputs) 
into the class, and the instance attribute doesn't even get assigned 
unless the error checking code returns true, for example.  As opposed to 
running each user input through a function and assigning it to a 
dynamically-generated variable name.  It's not really much different, 
but it is far more organized and cleaner.

But everywhere I used to read about programming would talk about how OO 
had revolutionized programming.  Now that I know what it is, although I 
really appreciate it and will use it whenever I can (it's so... clean 
compared to what I was doing before), but I still don't really see how 
it's that big a deal -- it's simply a different way of organizing code, 
as far as I can tell.

Please prove me wrong and help me see how OO "changed everything".

Erik





PS:  Also, I have heard someone say that "in Java everything is an 
object".  What does this mean?  I think I am interested in learning 
Java, especially since there are many employers in my area (Boston) 
advertising an interest in Java programmers (and I will be out of a job 
as soon as my project is finished).  Sadly, much more than Python or 
PHP.  But it seems like a big language to learn.