BYTE.com > ActiveXplained > 2000 > December
Common Language Runtime
By David Platt
December 21, 2000
(Understanding Microsoft .NET, Part I
: Page 2 of 4 )
The reason COM doesn't provide these features is that it was originally designed to enable object linking and embedding in Office applications. This required that COM be able to be bolted onto existing applications, which in turn meant that it had to paper over the differences in implementations rather than eliminate them.
In its .NET framework, Microsoft provides a new level of run-time functionality called the Common Language Runtime (CLR). It contains prefabricated implementations of such universally required features as object lifetime management, garbage collection, security, and versioning.
A CLR-compatible language doesn't compile its source directly into native code. Instead, it compiles into an Intermediate Language (IL), conceptually similar to the way Java compiles into byte codes. When it's first run, the CLR runs a just-in-time compiler to convert this IL into native code, which then executes within this runtime environment, conceptually similar to the way that Java code executes inside a Java virtual machine, except that .NET code is always compiled, never interpreted. Because all languages use the same OS-provided services, language implementation gets much easier and you don't have the problems of implementation strategies not quite matching.
One main difference between .NET and Java is that the .NET framework is available to any language vendor that wants to produce IL output. Microsoft is providing Visual Basic, Visual C++, JScript, and C# (C-sharp) implementations of CLR languages. The website msdn.microsoft.com/net/thirdparty/ lists third-party vendors that are supplying many more CLR languages, such as APL, COBOL, PERL, and Smalltalk.
While not implemented internally using COM, .NET objects can register themselves to be used as COM objects by COM clients. They can also easily create and use COM objects present on the system. So you don't have to throw away your COM code to use the .NET framework; you can transfer over a piece at a time.
BYTE.com > ActiveXplained > 2000 > December
|