When COM meets .NET
Glory 2002
Technological advances are unable to curb trends, and new and old alternates are natural laws. With the advent of new technologies, the old technology will lose the dominant position that has been owned even if it does not completely exits the historical stage. The same is true as the mainstream component technology on the Windows platform, and it is also true for .NET and fate.
For different developers, COM means that things are different. Some people are rarely carried out because of the field limit, and most developers and COM have so much exchange, and when they transfer from COM to .NET, not how fast and nature. During the new and old technological conversion, resistance is often not from the technical itself, but the technology of the technology.
At the time of the birth of the C language, it was severely resistant from the ASM (assembly language) programmer, but with the improvement of the C compiler, the speed of the computer hardware, the advantages of easy use of C language gradually high, the result, C The programmer team is constantly growing. Although a number of ASM programmers are still active in certain low-order programming fields, this ratio is a small number of users relative to the high-order mainstream language. Similarly, C has similar history for C for C, Java.
Today, in a short period of .NET released in a short period of time, the developers will certainly not give up WIN32 API and COM, nor will they be ported to .NET, but under the background of hardware environment and business needs, in Microsoft Under the implementation of spare no effort, and in this platform itself, most of the Windows developers will put most energy into .NET in the next few years.
COM is a cross-language operation binary standard, language interoperable magic through the interface, in a sense, COM is interface. .NET achieves the same goal, but the implementation is different. .NET provides a generic language run, while the latter implements a general type system. Each .NET language knows how to display your object layout to other languages, and also know how to use and extend objects written in other languages.
But this does not mean that there is no interface in .NET. In fact, the .NET base library provides a large number of interfaces (such as Icloneable). In the CLR, the object reference can be based on an interface or class. Now, you have multiple programming style options, you can conduct traditional class-oriented object-oriented development, and you can perform interface-based design development, or even mix.
COM is not only iUnknown and API. In addition to providing an interface, COM also provides services. In addition to providing interfaces, objects, and CLRs, .NET also provides a well-friendly service. .NET overcomes the shortcomings of COM, provide and enhances all the advantages of COM. It can be said that .NET is another advancement of component technology, which is more friendly enterprise model than COM. Therefore, if COM regards COM as a programming model rather than technical details, .NET is more like an evolution of COM, not a replaced revolution.
Should you stop all COM development now? Not. As long as you wish, you can still create COM components, COM interoperability provided by .NET can ensure that your investment in COM will be protected. You can not only use COM components from .NET applications, you can use the .NET component in COM applications. In addition, the CLR does not re-implement any COM function, at least in the first edition. The COM service you are using in .NET, and your COM service in the pre.net era, in nature, there is no different.
Even in the .NET era, software development in some areas will still use COM instead of .NET. Although .NET's CLR is a great progress in many types of applications, it is not necessarily the best choice for some applications (such as system-level software), which will still use COM technology and use C . Such languages are developed. In the next few years, as a programming model, as a development infrastructure, COM will continue to use as a way of interoperability with existing code. However, for new applications created from headers using .NET, COM is usually required. Therefore, although com is still important, it will never be as important as it once, and COM's application will continue to be reduced. More and more developers will jump to .NET this "sandbox".
-Finish-