Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If inheritance is a prime reason for OOP, then why...
Message
 
To
31/12/1998 14:56:56
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00171748
Message ID:
00172161
Views:
29
>Thank you for taking time with the example. I'll mull it over!

Still mulling? Look for the pattern(s) in my way to change option C) in order to favor object composition over class inheritance and you'll see how I came up with this whole deal in the first place.

Basically, what I was getting at is that when you encounter a situation for partial reuse it's real easy to fall into the over-use of inheritance scenario. Now there's always more than one way to skin a fox, and I think what we've seen here with this thread is that you can avoid the inheritance abuse trap by creating a new object (like Geo's input) that doesn't overwrite original functionality, OR you can do the organized heirarchial approach of the abstract parent & redefined subclasses (my original option C) ), OR you can completely isolated functionality from interface and go the route of my new technique to reach for the aggregate object and use composition (see Jim B's DataMgr example on this thread too).

Now I jumped in on this thread for 2 reasons - To get Geo to fess up some of his OO practices (heh :D) ), and to see if my new technique that I like to favor when I find myself recognizing partial reuse after-the-fact was going to come back to bite me. And by-jove, I do believe I'm at the tail end of the OOP learning curve (finally!).
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform