[Tutor] Help - Where and when to use OOP

Sean 'Shaleh' Perry shaleh at speakeasy.net
Fri Jan 23 21:38:35 EST 2004

On Sunday 18 January 2004 23:36, Lakmi munasinghe wrote:
> Hi,
> I have a little exposure to OOP. I 'd like to know for what kind of
> programs that I should use OOP programming concepts and for what kind of
> programs that the stuctured programming would be more suited.
> As far as I know if we don't see any repeating processes in our system
> applying OOP programming will cause no effect.In such cases we should
> manage with structured programming with functions and procedures where
> necessary. Am I correct ?

From my experience I find OOP excels at GUI coding.  This is because, as Alan 
points out, you often refer to distinct things like "window", "mouse", 
"sprite", etc.

A lot of daemon / server code can be written either in procedural or OO 
fashion.  I tend to use procedural more often but then again I began life as 
a C coder.

I find OOP beneficial when I am sharing code because it is easy to wrap things 
up nicely and define safe points.

As for your project, will you have actors and things acting with / on them?  
An example from a programming class in college was a video rental system in 
which there were patron and video objects which acted on each other.

More information about the Tutor mailing list