COM Versus .NET Components

Snoops

   

 
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET
By Dhananjay  Katre, Prashant  Halari, Narayana  Rao  Surapaneni, Manu  Gupta, Meghana  Deshpande

Table of Contents
Chapter 10.   Dealing with Legacy Components in .NET


COM exposes standard interfaces to communicate with other components. COM encapsulates the language-specific and implementation details, thus shielding the code to be modified by the client. COM follows the binary format standard. As long as the components adhere to the binary standard, the components will be able to communicate with each other irrespective of the language used to develop a COM component.

A COM-compatible component must support the IUnKnown interface. This interface is responsible for reference counting of the component. If this reference count is 0, COM deallocates memory automatically. When you compile a COM component, all the information about various methods and their parameters is stored in a type library.

COM implements an algorithm, which is based on time and zone and generates a GUID, which is a 128-bit unique ID.

Microsoft .NET components are self-describing about the classes they implement, and the information is stored in an internal segment known as the manifest. Apart from that, metadata has the following functions:

  • Describes and references the data types defined by the Virtual Object System (VOS) type system

  • Lays out instances of classes in memory

  • Resolves method invocation

  • Solves versioning problems

Table 10-3 summarizes the differences between COM and .NET.


Snoops

   
Top


Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
ISBN: 131009621
EAN: N/A
Year: 2001
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net