[Tutor] RE: OOP purpose

alan.gauld@bt.com alan.gauld@bt.com
Wed, 3 Apr 2002 12:39:58 +0100


> What is the purpose of OOP?  

To make programnming of large projects easier, 
to make the building of reusable components easier,
to make comprehension of program design easier,
to make code more reliable(debateable!)

> Why  would you use it instead of just modular 
> design?  

Its more extensible via inheritance for a start.

> I am having trouble finding the need to use it in my 
> projects.

You never *need* to use OOP. Anything you can do in 
OOP can be done without it. OOP just makes many 
things easier. Compare using string methods in Python 
against importing the string module and using the 
string functions.

Most GUIs are implemented in OOP terms because GUI 
widgets have a natural conceptual linkage to being 
objects.

OOP does take some time to adjust to however - estimates 
vary from 6 months to 2 years for an experienced 
procedural programmer.

Beginners are supposed to pick it up faster because to 
them the concept of asking a table to move across a 
room is more obvious than the idea of moving a table 
data item by explicitly changing its X and Y coordinates...

Theres lots more to be said (and most of it has been already!)
and a browse of the cetus-links web site is a good place 
to start...

But don't get hung up on OOP, it's not the final word in 
programming nor is it even the best approach in every case.

Alan G.