FAQ 34.20 What is the biggest problem with COM?

graphics/new_icon.gif

Complete confusion for beginners.

Programmers can expect to experience a COM haze when they first work with COM. This comes from having to mentally juggle all the different issues:

  • COM is relatively large and has its own way of doing things, and often its approach is unlike other systems (including C++ and CORBA).

  • COM terminology is Humpty-Dumpty terminology (if you remember, Humpty-Dumpty said, "When I use a word it means just what I choose it to mean neither more nor less"). Thus, COM uses many of the same terms as C++ and other object technologies but uses them in its own way. This can lead to misunderstandings.

  • Most COM examples are written in C++, and this makes it hard to figure out where COM stops and where C++ begins. Programmers often find themselves wondering which of the five C++ classes in a COM example represent COM interfaces, which ones represent COM classes, and which ones are internal classes that are used only within the implementation of the COM classes.

  • Different C++ class libraries use different approaches for declaring and implementing COM classes and offer different trade-offs. Some class libraries (like MFC, the Microsoft Foundation Class library) use numerous macros for defining COM classes, whereas other libraries (like ATL, the ActiveX Template Library) use C++ templates.

  • There are numerous ways of declaring and implementing COM classes, and it is sometimes hard to figure out how they fit together. Examples in books don't always make it clear whether they are describing a new and distinct feature of COM or are simply describing another way of implementing a feature described earlier.



C++ FAQs
C Programming FAQs: Frequently Asked Questions
ISBN: 0201845199
EAN: 2147483647
Year: 2005
Pages: 566
Authors: Steve Summit

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net