This post originated from an RSS feed registered with .NET Buzz
by Jonathan Crossland.
Original Post: Refactoring complex classes using Composition Part 3
Feed Title: Jonathan Crossland Weblog
Feed URL: http://www.jonathancrossland.com/syndication.axd
Feed Description: Design, Frameworks, Patterns and Idioms
Why should complex classes be refactored? To make code smaller and more manageable. To separate code that changes at different rates, and which are not concerned with the same things.
Composition vs Inheritance? Composition = "has a" relationship, Inheritance "is a" relationship.
Inheritance quickly makes you feel like you create Object-Oriented code, but its one of those devices that should be used for a real reason, not just off the cuff.