Chapter 2 -- Conclusion [Previous] [Next]

Conclusion

So there you have it—the basic atoms of COM. These are the fundamental concepts to understand in COM:

With the exception of COM's apartment and remoting support, everything in COM is really just a matter of exercising some discipline. C++ programmers have always had the option of separating the implementations from their interfaces. Most of us were brainwashed into accepting the mantra of implementation inheritance. Not that implementation inheritance is bad in itself—it can be very useful within certain contexts. It's just that when you take advantage of implementation inheritance you implicitly couple base classes with their derived classes. Interface-based programming lends itself to a different kind of software philosophy—here software parts exist as real decoupled components.

As you examine ATL throughout the rest of this book, keep in mind that ATL is doing exactly what we covered in this chapter—even though here we've given you only an overview of the most important parts of COM. We'll uncover more nuances of COM (such as identity and threading issues) as we dig through ATL.