[Previous] [Next]

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

  • The separation of interface and implementation
  • COM classes (attaching interfaces to code that actually does the work)
  • Class objects (static, instance-less areas for COM classes)
  • COM DLL and EXE servers
  • COM apartments

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.

Inside Atl
Inside ATL (Programming Languages/C)
ISBN: 1572318589
EAN: 2147483647
Year: 1998
Pages: 127 © 2008-2017.
If you may any questions please contact us: