View RSS Feed

Recent Blogs Posts

  1. Design Principle: Choose Composition vs. Inheritance

    by , 11-30-2011 at 03:48 AM
    With composition or inheritance you can place sub-objects inside your new class. If you do this explicitly than you are using composition otherwise if you do this implicitly, you are using inheritance. I will outline the difference between the two below as well as point out one of the key design patterns to use in your development. Prefer composition vs inheritance.

    Composition is used when you want the features of an existing class to be included inside your new class, but not be ...