For beginners, COM is not a very clear definition. It represents both a component specification and an implementation. In short, COM is a component model at the language layer, because different development environments often need to cooperate with each other to complete a certain function, thus promoting the emergence of COM. com exists in binary format, it is supported by the Windows system, rather than a development tool platform. The design is fully implemented by the OOP design method, so that developers can more close the function calls and organization in the object rather than a DLL, in another aspect, developers can focus on the relationship between the business Implementation represented by objects and related objects. the specific implementation of COM is very complicated, not just a few simple sentences can be clarified, but the key point is that the communication between the program and the COM component should be implemented by the RPC method, the boxing and unboxing of method calling, coupled with the implementation of its server (MTS), implements a distributed model. MTS mainly controls security and coordinates transactions.
The underlying structure of COM + is still based on COM. It covers almost all com content. COM + integrates the technical elements of COM, DCOM, and MTS, it promotes the COM component software to the application layer instead of the underlying software structure. It enables the component object model to be built on the application layer through various support of the operating system, leave the underlying details of all components to the operating system. Therefore, the combination of COM + and the operating system is closer. COM + is no longer limited to the COM component technology. It focuses more on the design and implementation of distributed network applications. COM + inherits almost all the advantages of COM and avoids some shortcomings in COM implementation. It combines the programming models of COM, DCOM, and MTS and inherits the vast majority of their features, new features have been added to the original features: for example, COM + has extended the MTS security model, which allows developers or administrators to specify method-level security control through COM + object environment information, this makes the security model of COM + more effective and meticulous. COM + supports the transaction semantics of MTS. It not only supports setabort or setcomplete, but also supports byot (bringyourowntransaction ), that is, allow COM + components to participate in transactions managed by non-MTS transaction processing environments. COM + inherits the MTS Object pool concept and implements the object pool function, COM + not only inherits most of the original features, but also adds some services, such as load balancing (in the DCOM era, this is the responsibility of MTS, and it can be said that this is the inevitable result after MTS integration), queue service, memory database, event service, etc. The queue service is very meaningful for distributed applications, especially when the network speed is very slow, this mechanism can ensure that the application system can run reliably. When the application system contains a large number of nodes but the server is busy, the customer application can put their requests in the queue and process these requests when the server load ratio is lighter; another example is that COM + provides the load balancing service, which can achieve dynamic load balancing. In addition, the load balancing feature of COM + applications does not need to be supported by coding, both client programs and component programs can be implemented in the usual way. The load balancing feature is not implemented by programming, but by configuring Load Balancing for distributed applications. The Queue Service mentioned above, in fact, it also reflects a load balancing. A standard interface environment management program called MMC is used in COM +. It is similar to the MTS Management Program, but not exactly the same. Each COM + application can contain one or more COM + components and role information related to the application. Through the COM + Management Program, we can set attributes of COM + applications and COM + components, such as transaction and security features of components.
This floor replies to re:
The biggest difference is that com can be stateful, and COM + must be stateless. What is stateful, that is, multi-thread re-import is allowed when an object method is called, and what is multi-thread re-import? That is, when multiple threads use the same COM Object, there is no access conflict.
COM + is a process space provided by the system, and COM is running in the caller process or an independent user process.
To maintain private data (status will be generated), COM + must use context objects instead of private members.