[Tutor] RE: when to use OOP

Dan Shafer pydan@danshafer.com
Sat, 10 Aug 2002 18:10:11 -0700


At 02:56 PM 8/10/2002 -0700, Danny Yoo wrote:


> > So my advice is not to look for a reason to use OOP but rather to start
> > every project with the assumption that OOP is in order and only deviate
> > from that decision when clear circumstances dictate. I've never seen a
> > project that was harder to extend or maintain because it was built using
> > OOP strategies and techniques.
>
>I still feel that unmaintainable code can be written using the most
>sophisticated of techniques.  *grin*

Oh, that's for sure! You can write unmaintainable code in English. They're 
called user manuals! :-)


>But seriously, there are ways of writing really bad OOP programs if we
>apply OOP techniques gratuitously.  Bruce Tate has written a book called
>"Bitter Java" that talks about hideously bad OOP designs and how to
>improve them:
>
>     http://www.manning.com/tate/
>
>His focus is on "Antipatterns" --- OOP designs that can cause long-term
>maintainability problems.  It's quite good, and even if its implementation
>language is Java, there's quite a lot that can apply well to Python
>programming.

Patterns are another level of complexity and are, IMNSHO, more suited to 
designing frameworks than applications. I know that flies in the face of 
conventional wisdom but I've seldom let that slow me down!


>Best of wishes to you!

Dan Shafer, Chief Scribe and Tablet Keeper
PythonCard Open Source Project
http://pythoncard.sourceforge.net