Dinkhome Dinkhome

Niner since 2008


  • ARCast.TV - Juval Lowy on Interface Based Design

    People criticize C++ for multiple inheritence, which doesn't mean it is bad.  However, in many cases it is either poorly understood or otherwise misued.  MI almost always obfuscates the design and introduces maintenance issues.  This is one of the reasons why it is usually better to aggregate functionality through composition than to inherit it.  However, this is beside the point.

    Interface design is not direclty related to inheritence.  Interface design is about contract definition and abstraction from the client objects (decoupling).   This leads to easier replacement and reuse.

    Inheritence is about reuse within the server objects.  Both can lead to polymorphism, but interfaces do not have the rest of the inheritance baggage to carry along (which multiple inheritence was implemented to avoid).  But since MI leads to complexity, it didn't work out too well.

    I think Interface based design is just now being recognized as a very strong reuse mechanism, and this presentation helps to make that point.