Best Windows Hosting

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 16 May 2012

COM Family: COM+ and DCOM, Interop, RPC and TLB

Posted on 07:49 by Unknown
Microsoft COM (Component Object Model) technology enables different software components to communicate. It was introduced by Microsoft in 1993. The family of COM technologies includes COM+, Distributed COM (DCOM) and ActiveX Controls.

COM provides interoperability. COM allows reuse of objects with no knowledge of their internal implementation.COM objects can be used with all .NET languages through .NET COM Interop.

COM interfaces have bindings in several languages, such as C, C++, Visual Basic, Delphi, and several of the scripting languages implemented on the Windows platform. All access to components is done through the methods of the interfaces.

Type Library in COM (.tlb file)

First, you must create a type library for the assembly. A type library is the COM equivalent of the metadata contained within a .NET assembly. Type libraries are generally contained in files with the extension .tlb. A type library contains the necessary information to allow a COM client to determine which classes are located in a particular server, as well as the methods, properties, and events supported by those classes. Each component or dll file must contain type library.

COM Interop

COM Interop is a technology included in the .NET CLR that enables COM objects to interact with .NET objects, and vice versa. COM Interop allows COM developers to access managed objects as easily as they access other COM objects.

The .NET Framework creates a type library and special registry entries when a component (compiled in the form of DLL) is registered. It provides a specialized utility that exports the managed types into a type library and registers the managed component as a traditional COM component. When the type is instantiated through COM, the .NET CLR is the actual COM object that executes and it merely marshals any method calls or property access to the type implementation.

Reference Counting, Pooling and Memory Management in COM:

The COM specifications require a technique called reference counting to ensure that individual objects remain alive as long as there are clients which have acquired access to one or more of its interfaces and, conversely, that the same object is properly disposed of when all code that used the object have finished with it and no longer require it. A COM object is responsible for freeing its own memory once its reference count drops to zero. Pooling for objects can also be set for different components.

RPC (Remote Procedure Call)

Microsoft Remote Procedure Call (RPC) is a powerful technology for creating distributed client/server programs. RPC is an interprocess communication technique that allows client and server software to communicate.

dcomcnfg:

To access settings on a computer running Windows 2000, Windows XP and earlier, click Start > Run, and type "dcomcnfg". (Click NO for any warning screens that appear.) To access DCOM settings on a computer running Windows Vista or later, click Start, type "dcomcnfg", right-click "dcomcnfg.exe" in the list, and click "Run as administrator".

COM is very similar to other component software interface technologies, such as CORBA and Java Beans, although each has its own strengths and weaknesses.

COM Family:

COM+: COM+ is the name of the COM-based services and technologies first released in Windows 2000. It provides  distributed transactions, resource pooling, disconnected applications, event publication and subscription, better memory and processor (thread) management.

DCOM: DCOM isDistributed COM. DCOM uses RPC mechanism for communication. It allows COM components to communicate across network boundaries.It provides load balancing.COM installation and execution is done in its clien machine where DCOM is intalled and run on selected server machine.

DCOM is generally equivalent to the Common Object Request Broker Architecture ( CORBA ) in terms of providing a set of distributed services. But unlike CORBA, which runs on many operating systems, DCOM is currently implemented only for Windows.

Migrate from COM application

Although calling a COM component from managed code is simple, you should not consider this a permanent solution for most applications. Over the long run, you'll want to migrate heavily used components to native .NET code. This will provide you with the full range of .NET capabilities, as well as make your code faster by eliminating the RCW layer.

Decline of COM

Several of the services that COM+ provides have been largely replaced by recent releases of .NET. For example, the System.Transactions namespace in .NET provides the TransactionScope class, which provides transaction management without resorting to COM+. Similarly, queued components can be replaced by Windows Communication Foundation with an MSMQ transport.
Email ThisBlogThis!Share to XShare to Facebook
Posted in Delphi | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • 13 Things to keep in mind before using DLL in Delphi
    Keep in mind the following tips when writing your DLL: 1. Make sure you use the proper calling convention (C or stdcall). 2. Know the correc...
  • How to use TADOTable in Delphi XE2?
    Following is the code snippet which will show you how to use TADOTable in Delphi XE2? procedure TClass1.GetDataFromADOTable; begin   try    ...
  • How to use FindComponent function in Delphi XE2?
    Following is the code snippet which will show you how to use FindComponent in Delphi XE2? procedure TClass1.UseFindComponent(FieldName : str...
  • Online Finance Degrees
    There is a great demand for professionals with profound knowledge of finance and accounting in most of the reputed banks and financial insti...
  • How to grab the recruiter’s attention with your resume?
    Did you know that the average recruiter spends about 8 to 10 seconds glancing at your resume before s/he moves on to the next? So, whether y...
  • 5 ways to handle workload at your workplace
    With bigger workloads, tighter deadlines and more pressure, the temptation to pack in as many tasks as possible is hard to resist. But juggl...
  • Online Marketing Degrees
    Because global competition has become so intense, it should come as no surprise that companies invest heavily in their marketing and promoti...
  • Frameset, Frame and IFrame Elements in HTML
    Frame Element With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and...
  • Oracle Streams: An Overview
    Oracle Streams enables information sharing. Each unit of shared information is called a message. The stream can propagate information within...
  • Phonegap: An amazing combination of HTML5, CSS3 and Javascript
    Phonegap (Cordova) = HTML5 + CSS3 + Javascript What a great combination!! How easy is Phonegap to learn!!! A great enhancement in mobile tec...

Categories

  • AJAX
  • C++
  • CSS
  • Delphi
  • DOTNET
  • HTML
  • Javascript
  • jQuery
  • Management
  • Online Degrees
  • Oracle
  • Others
  • Phonegap
  • PHP
  • Unix
  • XML

Blog Archive

  • ▼  2012 (155)
    • ►  September (64)
    • ►  August (11)
    • ►  July (4)
    • ►  June (3)
    • ▼  May (25)
      • Positioning Property and Z-Index in CSS
      • Validation Controls in ASP.NET: System.Web.UI.WebC...
      • COM Family: COM+ and DCOM, Interop, RPC and TLB
      • Frameset, Frame and IFrame Elements in HTML
      • List of problems occuring while using html tables
      • Alternative of XML: JSON (JavaScript Object Notation)
      • Basic Points of SOA (Service Oriented Architecture)
      • 11 Commonly used AJAX Frameworks
      • WCF: A SOA based Service Framework
      • WPF (Windows Presentation Foundation): Features
      • Relation between Tablespace, Datafile and Control ...
      • 6 Advantages of using stored procedures in your ap...
      • Window Object in Javascript: Properties and Methods
      • DECODE Function vs CASE Statement in Oracle
      • Oracle Streams: An Overview
      • Network Configuration Files in Oracle
      • 40 Objective Type ASP.NET Interview Questions (Par...
      • SQL Replay: A new feature of Oracle 11g
      • 11 Methods to implement 301 Redirect URLs
      • Partitioned Tables: Types and Advantages
      • ItemDataBound in ASP.NET
      • Protecting E-mail Addresses on Webpages: Beware of...
      • Non Breaking Space vs Zero Width Space in HTML
      • Difference between AJAX and jQuery
      • Preloading Images: A trick to overcome delays in i...
    • ►  April (48)
Powered by Blogger.

About Me

Unknown
View my complete profile