Component Object Model

2019-04-13 08:56发布

问题:

My question is directed towards developers who are familiar with COM. I am currently writing my college thesis which is partially about Microsoft COM.

  1. is COM still used today for purposes besides legacy code
  2. everyone says COM is obsolete. Why is the new Windows Runtime an 'enhanced' COM based API? What is meant by the word 'enhanced'
  3. are there any significant upsides to COM compared to .NET or vice versa
  4. any recommendations where to learn more about COM and .NET Interop and how exactly does it work

Please support your answers with facts as much as possible! Thank you.

回答1:

  1. Yes.

  2. COM is still core to the way Windows works. Wherever a C-style api won't suffice, COM is the next step to expose an object model. And yes, Store apps are COM servers.

  3. COM is native code, it adds very little overhead and is usable from practically any language that was ported to Windows.

  4. Visit amazon.com to search for books, read the reviews.

It is not essential anymore to have to know COM to write programs that run on Windows. Lots of work was done to wrap it and make it friendlier. The language projections in Store language runtimes are notable, there are very few traces of the underlying COM code visible. Relegating it to a status that's comparable to learning assembly language programming.



回答2:

Component based model developed by Microsoft to introduce the language interoperability. To know about COM we first know the scenario when COM concept comes in the .Net. We know that in object orientation concept was re usability of the code within the same application, but in any case if i want to call the function of any class from other application of different language then it was not possible. Another disadvantage of object orientation is that after development of the software any change is required in any classes then the whole application needed to be rebuilt and deploy again to the client machine. Actually the problem is that in this case we are getting the re-usability for a particular application not for whole application level.You can read more about COM here : Component based model



标签: .net com