Jump to ratings and reviews
Rate this book

COM本质论

Rate this book
自1993年COM首次发布以来,COM本身经历了重大的变化,但是它的基本思想和结构一直保持相对稳定,这也正说明了COM思想的魅力所在。尽管如此,由于COM的神秘本质,并不是每个人都能够很容易地理解COM的思想,理解COM的魅力。

《COM本质论》不是一本供新手学习的书,也不是一本教授如何开发COM组件的书,而是一本帮助读者在一定的基础上继续提高对COM的理解的书,许多内容需要一定的经验基础才能看得明白。

COM是跨语言的组件对象模型,但是它与C++和OO(面向对象)思想的渊源可谓深矣。这本书中解释了这些内容,但前提是读者必须具备扎实的C++基础知识,特别要理解C++类的二进制结构以及类型转换机制。反过来,阅读这本书也可以加强在C++和OO思想方面的理解。此外,书中还涉及到许多COM高级特性,例如线程模型(或者套间模型)、名字对象、连接点等,因此,要想从这本书里获得最大受益,也需要有COM的知识作基础。

全书由国内COM方面最负盛名的专家潘爱民翻译。

356 pages, Paperback

First published January 1, 1997

9 people are currently reading
97 people want to read

About the author

Don Box

17 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
50 (48%)
4 stars
37 (35%)
3 stars
13 (12%)
2 stars
4 (3%)
1 star
0 (0%)
Displaying 1 - 9 of 9 reviews
7 reviews
April 9, 2025
It is a well-written easily readable and understandable book which is still relevant in 2025 despite some parts being slightly dated.

The book was released in 1997 (I was not born yet then). It is a good book even in 2025. The book targets mainly Windows NT 4.0. NT 5.0 (later known as Windows 2000) it mentions as a near future. Because Windows maintains very strong backward compatibility, the vast majority of the book is still valid. Of course, nowadays you will likely not heavily use distributed variant and RPC, but still, COM is used in Microsoft technologies a lot (and new technologies like WinRT are surprisingly still powered by it). Even if you want to stay on the client side, the book gives you a comprehensive description of how COM is designed and how to properly use it. Almost every enum listed in the book is incomplete and nowadays contains more options that did not exist at the time of writing the book. Similarly, all links are dead, but some resources are possible to find with some manual searching effort. The downloadable code at the end of the book is no longer downloadable, but it is printed (on 35 pages), so you can retype it. Code snippets follow the code style typical for the 90s. I do not like Hungarian notation, but who cares? Code examples are mainly in C++, some small codes are in VB (original VB, not VB.NET) and Java. Nowadays you will likely interop with something more modern like Rust, but it is very interesting to see how futureproof this technology is.

The book mentions solely COM. It does not describe related technologies like OLE and MFC much. Naturally, it does not know about any features and improvements which were released later. So nothing like COM+, WinMD, regfree COM, etc. is there.

I would welcome it if the author described more concepts with diagrams. Typically, some kind of class diagrams are here, but COM concepts are described exclusively using long textual descriptions with a huge cadence of statements. Reading/Understanding some parts is very slow due to this, especially in chapter 5. Otherwise, the book is very easy to read and follow, there are no cross-references across text. At the end of every chapter, there are nice reasonable long summaries which I liked a lot.
Profile Image for Steven Thomas.
126 reviews1 follower
June 13, 2020
Revisiting the definitive book on COM that taught me everything I needed to know. Even if you are not a developer, the first three chapters are worth a read simply for understanding it. COM has had a long life in the Microsoft developer ecosystem so that drives home the historical significance of this book even more.
Profile Image for Paweł Rusin.
214 reviews6 followers
January 17, 2023
It was very good book and I got from it what I wanted, which was to get a better understanding of 'why?' behind COM. However, I've skimmed through the second part of the book as it was a bit too much hands-on for me at this point.
Profile Image for Peter Aronson.
401 reviews20 followers
April 29, 2021
Another dip into the history of computing. This is the book I should of read before Learning DCOM, as it focuses somewhat more closely on the core of COM (although it does spend a fair bit of time on distributed COM).

The first chapter is great, as it describes the problems that COM was supposed to solve, and shows the approaches taken to solve them. The rest of the book is the details. Really.

An issue with this sort of book is that 95% of the code that uses COM uses probably at most 10% of COM, so the book spends most of its pages on things that most people working with COM needed rarely, if ever. But of course, that rarely used stuff is when a book like this is the most valuable, as that's the stuff you always have to look up before using.

The book shows its age with its obsession with saving small (by modern standards) of memory at the cost of more complex code. The trade offs described seem strange today for a software stack meant to run on PCs. I suspect that existing software using such techniques is not particularly loved by the people stuck maintaining.

There is also too much enthusiasm for varieties of remote procedure calls designed to look like local calls. This was always a weak point in COM, as you absolutely need to understand where your code was going to execute, as the latency would be enormously different depending where the component executed. A direct call <> a call into another thread <> a call into another process <> a call across the network. COM probably works best as a local system.

The book is very readable, with a light touch and very clear examples.
Profile Image for Helen.
6 reviews1 follower
Currently reading
February 25, 2008
Gave more insight to COM than I ever want to know.
Profile Image for Alex Allain.
Author 5 books9 followers
January 3, 2009
The first chapter, describing the ideas behind COM, is great. The rest of the chapters are alright, but do not recapture the majesty of the first.
9 reviews
November 19, 2009
This is an absolute must read for any developer who might ever use COM or ActiveX objects in any way.
Profile Image for Ed.
80 reviews1 follower
Read
May 7, 2012
For the average programmer, the first couple of chapters and the last are the most beneficial. A lot of the material gets bogged down in the implementation details that get abstracted away.
Profile Image for Oleg Sych.
36 reviews
September 13, 2015
This helped me understand COM without the overload of ATL. Still largely relevant today if you ignore discussion of the outdated applications.
Displaying 1 - 9 of 9 reviews

Can't find what you're looking for?

Get help and learn more about the design.