Interpreting COM + and MTS in the. NET Framework

Source: Internet
Author: User

". NET support COM? "

"How do COM + and MTS exist on. NET?" "

". What is the difference between a net component and a COM component? "

COM + is still present in. NET, and if the application does need to use COM + and MTS features, then you can choose the appropriate technology and. NET components work together. In fact, a component is part of any type of solution, whether it's a distributed solution or a non-distributed one. Component in. NET environment is very similar to a COM component, which is a DLL that contains one or more classes that can be instantiated by other applications. The main differences between the two are their implementation methods, where we do not discuss technical details in detail.

There are a number of options for considering what components to use in your application. Use COM + or MTS. COM + and MTS can work together with COM components. Therefore, when you create a component, the component must conform to the COM binary standard, and you need to register with the registry before you use it.

The. NET Framework supports COM + and MTS through COM Interop (COM interop) technology. A traditional COM application can invoke a. NET component, while a. NET component (called. NET Assembly in. net) can also invoke a COM component. This very powerful bidirectional interoperability feature allows you to mix two types of technologies in your application.

COM + and MTS work in concert with COM components. When you place one. NET component into an MTS package or a COM + application, the component is still able to be one in the same way. NET application, you will not realize the existence of COM + and MTS at this time.

Let's look at the performance overhead when using COM interop. NET and COM use different execution mechanisms (. NET uses the common language runtime, Common Language Runtime, and COM is not) ... NET components and COM components are implemented on different standards (. NET components use common type standards, and COM uses binary standards). The mutual invocation between the two adds some performance overhead, and in fact, it takes about 20 to 30 CPU instructions per operation to perform an interop call. When you call a class method that exists in COM +, the performance overhead is incurred for each invocation.

If you must use COM + and MTS features, store the components in COM + and MTS and confirm that you need all the features. If your component performs transactions only in one database and always works in a single database environment, you do not need to use COM + to complete transaction management, just use ado.net. Conversely, if you need object pooling and transaction support between multiple databases, then the application needs COM + and MTS.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.