问题描述
多年来,我一直很欣赏 Juval Lowy 在 .NET 开发方面的教学和指导.他还写了我最喜欢的书之一:Programming .NET Components.
I've been an admirer of Juval Lowy's teaching and guidance in .NET development for a number of years. He's also written one of my favorite books: Programming .NET Components.
然而,在最近的 DotNet Rocks 播客(2010 年 1 月)中,他在讨论 WCF/COM 和 .NET 时发表了一些令我非常惊讶的评论:
However on a recent DotNet Rocks podcast (Jan 2010) in discussing WCF/COM and .NET, he made some comments that greatly surprised me:
Juval Löwy: ..... 在 .NET 中,瞧瞧,这里的每一个类都是一个 COM目的.我们知道. 事实上,它不仅仅是 COM,因为我们已经得到了 git 编译,我们得到了垃圾收集,我们有安全堆栈....
Juval Löwy: ..... in .NET, lo and behold, every class here is a COM object. We know that. In fact, it's much more than COM because we've got the git compiling, we've got garbage collection, we've got the Security Stack....
卡尔·富兰克林:好吧,你应该澄清一下尽管.我的意思是,每对象不是 COM 对象.每一个对象具有 COM 的能力对象可以,但 .NET Framework不是 COM 库.
Carl Franklin: Well, you should clarify that though. I mean, every object is not a COM object. Every object has the capabilities that a COM object does, but the .NET Framework isn't a COM library.
Juval Löwy:不,不.首先.NET实际上是建立在COM的顶部.下面都是COM.
Juval Löwy: No, no. First of all .NET is actually built on top of COM. It's all COM underneath.
然后,在卡尔富兰克林要求澄清此评论后:
Then, after Carl Franklin asks for clarification on this comment:
卡尔·富兰克林:是的,我明白了.我的问题是 .NET 是基于 COM 构建的吗?
Carl Franklin: Yeah, I get that. My question was is .NET built on COM?
Juval Löwy: 当然,这都是 COM下面.
Juval Löwy: Of course, it all COM underneath.
卡尔·富兰克林:不,我知道是交织在一起,这是必需的,但是当您新建一个 .NET 对象时不创建 COM 对象.
Carl Franklin: No. I know it's intertwined and it's required, but when you new up a .NET object you're not creating a COM object.
Juval Löwy:您正在创建一个 .NET 对象,但所有我是说 .NET 是构建的下.都是 C++ 和 COM.
Juval Löwy: You're creating a .NET object, but all I'm saying is that .NET is built underneath. It's all C++ and COM.
Carl Franklin:它是 C++,但你不是通过注册 COM 对象通讯接口.这不是所有的东西除非你专门这样做.
Carl Franklin: It is C++ but you're not registering a COM object through the COM interface. It isn't all that stuff unless you specifically do that.
Juval Löwy:但有些东西正在使用COM 在下面,但那在旁边观点.忘记它是如何制作的.
Juval Löwy: But some of the stuff is using COM underneath, but that's beside the point. Forget about how it's made.
您如何阅读这些评论?
虽然我了解(并已确认)某些系统程序集是用非托管 C++ 编写的,但说它们是所有下面的 COM"是否也有效?
While I understand (and have confirmed) that some of the System assemblies are written in unmanaged C++, is it also valid to say that they are "all COM underneath"?
我假设完全有可能编写与 COM/ATL/ActiveX 完全无关的 .NET CLI 兼容 C++ 程序集?
I was under the assumption it is perfectly possible to write .NET CLI compliant C++ assemblies that have absolutely nothing to do with COM / ATL / ActiveX?
这里是相关播客的 PDF 成绩单.请参见第 7 页.
Here is the PDF transcript for the podcast in question. See Page 7.
推荐答案
就好像 Löwy 故意试图模糊他所说的内容.我没有听过播客,但从元音变音来看,我认为英语不是他的第一语言.
It's almost as if Löwy is intentionally attempting to be unclear in what he says. I've not listened to the podcast, but judging by the umlauts, I reckon English is not his first language.
您在 .NET 中使用的某些对象实际上是 COM 对象的包装器.您创建的 .NET 对象完成了 COM 应该做的很多事情,甚至更多,而没有 COM 令人讨厌的烦恼.我不认为下面都是 COM"的说法是准确或清楚的.
Some objects that you use in .NET really are wrappers for COM objects. And a .NET object you create does a lot of what COM is supposed to do and more, without COM's nasty annoyances. I don't think the statement "it's all COM underneath" is accurate or clear.
我希望采访的对象是 Jeff Richter.;-)
I wish the interview had been with Jeff Richter. ;-)
这篇关于.NET 是“下面的所有 COM"吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!