Reasons for choosing com

I was wondering why you can choose Com as your software development technology.

my first, although this is a machine / programming. Language independence

what's yours

+4
source share
4 answers

COM is the de facto standard for automation and IPC on windows (although .Net began to shift focus), so there are areas that you simply don't have (or had) a choice:

  • Shell extensions
  • ActiveX runs on COM
  • Internet Explorer Extensions
  • MS Office application extension
  • Script for JScript, VBScript, ... with one binary

Before the .Net event, almost all MS application automation went through COM, and some firms also got on this train.

Also DCOM, if you want to limit yourself to windows, is a reliable and proven technology for distributed components.

+9
source

The main strength of COM is that it is a widely applicable interoperability technology.

  • COM is very well supported on Windows without having to install anything.
  • It offers rich interoperability for various combinations of managed / unmanaged applications and applications in different languages ​​- the client does not care how the server works, and vice versa.
  • If you already have a large unmanaged code base (for example, we have millions of lines of C ++ code) and you want to expose its functionality for clients in different languages, COM will definitely be your choice - ATL makes it easy to create COM servers and clients will be able to use without extra effort.
  • Do not forget that COM + is great if you have a 32-bit unmanaged COM server proc-proc and you want to expose it on a 64-bit client. Many times you only need a few clicks and you don’t need to encode anything new at all.
  • COM supports streaming models (see this article for more details), which allows you to determine how much scalability you need from your COM component and how much you are willing to pay for it, and no client will be able to abuse your component and get injured due to simultaneous access to data.
+2
source

As gf said, people use it for automation. In addition, large parts of Windows are only available as COM objects. An example is DirectX.

0
source

My first thought - no need !!! If you can stay away from COM / DCOM.

Of course, if you need to integrate with legacy applications, you won't have a choice, but even then use COM only for cross-managed / unmanaged borders.

If legacy compatibility is not a problem, stay in control. .NET has everything COM can offer, and then some. And the complexity and stability of .NET code cannot be compared with equivalent COM code.

I have been working with Visual Studio Integration for some time. It was originally all COM, but MS is slowly converting various parts of it to manageable ones. The new editor structure, based on MEF, reduces the amount of code needed by orders of magnitude. And do not mess with the registry. Such a relief.

0
source

All Articles