Back to list
Views:   5.6K
Replies:  0
Archived

Refactoring: Replace Inheritance by Delegation

I read that in the Refactoring literature that one of its approaches is to replace Inheritance by Delegation.  Supposedly, when using inheritance it is more difficult to make changes.  From experience I see that this is indeed the case.

However, if you look at for example WPF class libraries you'll find an inheritance tree that is incredibly deep and complex; sometimes up to 10-12 levels deep. 

My question is this: why is it that Microsoft does it this way and not use delegation more frequently?

Henry Wong, Mar 31, 2011


Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas.      Vsn 1.3.0