是.NET"下"?所有COMNET、QUOT、COM

2023-09-02 10:34:56 作者:閉上眼說再見

我一直Juval洛伊的教学和指导的.NET开发了数年的崇拜者。他还写了我最喜欢的一本书:编程.NET组件。

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的岩石播客(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洛伊: ..... 在.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洛伊:不,不。首先,.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洛伊:当然,这一切的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洛伊:您正在创建一个.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.

卡尔·富兰克林:这是C ++,但你不   通过注册的COM对象   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洛伊:但是有些东西是用   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"?

我的假设是完全可以编写.NET CLI标准的C ++组件有绝对无关,与COM / ATL / ActiveX技术?

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.

推荐答案

这几乎就像洛伊故意试图不清楚他说的话。我没有听播客,而是由变音的情况来看,我觉得英语不是他的第一语言。

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.

我希望采访中曾与杰夫里氏。 ; - )

I wish the interview had been with Jeff Richter. ;-)