是.NET“下面是所有COM”? [英] Is .NET "all COM underneath"?

查看:163
本文介绍了是.NET“下面是所有COM”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多年来,我一直是Juval Lowy在.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 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:


JuvalLöwy: ..... 在.NET,lo
中,每个类都是一个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....

Carl Franklin:你应该澄清一下
。我的意思是,每个
对象不是一个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.

JuvalLöwy:否,不。首先.NET实际上建立在COM的
顶部。

Juval Löwy: No, no. First of all .NET is actually built on top of COM. It's all COM underneath.

然后,在Carl Franklin要求澄清此评论后:

Then, after Carl Franklin asks for clarification on this comment:


Carl Franklin:是的,我明白了。我的
问题是.NET上建立在COM?

Carl Franklin: Yeah, I get that. My question was is .NET built on COM?

JuvalLöwy:当然,所有COM

Juval Löwy: Of course, it all COM underneath.

Carl Franklin:不,我知道这是
交织在一起,是必需的,但是
.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.

JuvalLö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接口注册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.

JuvalLö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"?

我假设完全可以编写与.NET / 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”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆