今天无意“邂逅”了Mark E. Russinovich和David A. Solomon写的《Windows Internals》(December 08,2004才出版啊,是第四版),感觉心中好几个月的疑问和迷惑顿时释然了。这个迷惑是:.NET出来后,COM怎么了,还发展吗,COM还有用吗?
前一段时间,看到Google Code上的3个APIs:Google Web APIs (beta);AdWords API beta;Google Desktop Search SDK。他们分别提供这些语言支持或者相关语言的示例代码支持:
1。Google Web APIs (beta):includes Java and .NET programming examples and a WSDL file for writing programs on any platform that supports web services.
2。AdWords API beta:Learn from sample code, available in five programming languages:Java - .NET - Perl - PHP - XML.
3。Google Desktop Search SDK:The Google Desktop Search SDK provides documentation and sample code for using the Google Desktop Search APIs (via COM and HTTP/XML). Developers can program in:
• Visual Studio .NET
• Java
• Perl
• Python
• any language that
supports COM and XML
通过以上不难看出,Web领域已成了Java和.NET的天下,只有在Desktop应用领域,传统的以COM为基础的应用才能发挥出它的作用。(这也是发展的要求吧,发展才是硬道理)。
言归正传,《Windows Internals》书中对于“Relationship of .NET Framework Components”是这样描述的:
The .NET Framework consists of a library of classes called the Framework Class Library (FCL) and a Common Language Runtime (CLR) that provides a managed code execution environment with features such as just-in-time compilation, type verification, garbage collection, and code access security. By offering these features, the CLR provides a development environment that improves programmer productivity and reduces common programming errors. (For an excellent description of the .NET Framework and its core architecture, see Applied Microsoft .NET Framework Programming by Jeffrey Richter.)
The CLR is implemented as a classic COM server whose code resides in a standard usermode Windows DLL. In fact, all components of the .NET Framework are implemented as standard user-mode Windows DLLs layered over unmanaged Windows API functions. (None of the .NET Framework runs in kernel mode.) Figure 1-1 illustrates the relationship of these components:
Figure 1-1. Relationship of .NET Framework components
浙公网安备 33010602011771号