Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tips wanted for a .net newcomer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01594688
Message ID:
01594754
Vues:
88
>>Rick, If you are talking about OO then the right person to read is Alan Kay, after all he coined the term, so go tell him that inheritance is not part of it but interfaces are.
>
>Deep class hierarchies are evil.
>
>Inheritance is fine, just used in a minimal way. Even the various patterns revolve around inheritance, but in a limited way. Maintainable code spreads horizontally (composition) rather than vertically (inheritance)...
>
>+++ Rick ---

I know about the issues deep class hierarchies, there are also issues with composition and there are even people that are not even sold on the whole design patterns paradigm, and then you have interfaces which can also be overused (and many times they are used to overcome issues that should not exist in an OO language, in my opinion). So, now that we established that all solutions have the potential of causing troubles, lets go back to the original assertion:

> Inheritance (which is what you get with VFP subclassing) is pretty much frowned on. There are exceptions, of course. Interfaces, Composition, Aggregation are much better OO practices.

The four pillars that I mentioned are 1.Abstraction 2.Encapsulation 3.Modularity 4.Hierarchy, those are basic principles of OO. Interfaces, Composition, Aggregation are NOT much better OO practices, they are techniques or mechanisms used to solve or overcome issues with a more pure OO approach, for example maintainability, as you said.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform