Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why Use Interfaces
Message
De
04/01/2008 04:51:22
 
 
À
04/01/2008 04:11:03
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Divers
Thread ID:
01278205
Message ID:
01279413
Vues:
18
Thanks Thomas :o)

>Tracy,
>>Frankly, I've read a few articles on it and I'm left feeling baffled more than anything else. I think I will avoid it whenever possible and if absolutely necessary, use it sparingly. I wrote that knowing full well that anytime in the past I declared 'I will never,' I typically ended up at least once having to do exactly what I swore not to :o)
>
>for me it helps to try to think less in inheritance, but more in object compostition terms. Interpreted in that light Doru's comment about design flaws can be better understood.
>
>For the car/airplane example this means they might have common oEngine, oPassengerdoors, oCollectionWheels as well as some identical items in oCollectionDashboard. Instead of asking for the base objects interface (which would have to be implemented) I return the aggregated object (having the worker method "interface" as well) and work with that. Not totally pure in theory, but for me a better compromise rusulting in less code.
>
>I had read Anders' views once before as his take on AOP, but I think his idea of default implementations of interfaces might cut away much of the boilerplate code. Even if boilerplate code is generated, after that most of the times it will be maintained at a less automated level (even if you just scrolled over if not using partial classes). And the amount generated is growing in abundance (see XML) making things once planned to be simple (*S*OAP) a mess.
>
>my 0.02 EUR
>
>thomas
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform