1, the role of COM
As a software model, COM provides the standard of communication between programs, but its greatest contribution lies in the change of programming method. COM combines both object technology and component technology. Object characteristics make application system design and implementation more in line with the face of the real world; Component characteristics enable application system to give full play to the advantages of components to meet the needs of modern applications.
2, the characteristics of the components
Components can be integrated and reused at the binary level, and components must be independently produced, acquired, and configured.
Component interfaces describe the services that a component provides externally, interacting between components and components, and between components and customers simultaneously through interfaces. Component interfaces must be self-describing, and components should remain unchanged.
3. com-based Modular programming method
The modular programming method inherits and develops the Object-oriented programming method. The modular programming approach emphasizes real software reuse and high interoperability.
4. MTS
Mts,microsoft Transaction Server, which provides us with basic components to run and configure the environment. MTS provides the underlying infrastructure for distributed applications, which organically organizes client programs for application systems with application component objects and various resources.
In MTS applications, all component objects run in the MTS Runtime environment, which implements the basic application logic rules. Since MTS manages the component objects organically, its operating environment is responsible for all the concurrency processing, resource management, security management, environmental management and other system-level characteristics, so developers can ignore these elements when writing component objects, simply implement the basic application logic rules.
MTS applications can include multiple MTS service processes, each of which runs one or more component objects, so every component object that MTS applies must be an in-Process component object that runs in the MTS service process. In addition to these application component objects, MTS provides a number of services in the MTS service process, including thread management services, environmental management Services, resource distribution management, and so on. This is how MTS provides a variety of system services.
The resource Manager is an essential tool for MTS to manage persistent data, using the Microsoft DTC (Distributed Transaction Coordinator, Distributed Transaction Coordinator) system service. Transaction (transaction) functionality is implemented in two-stage commit mode.
MTS implements two resource distributors: the ODBC resource distributor and the Shared Property manager.
MTS is just a manager of a COM component object that simplifies the development of complex application systems through a set of built-in services.
5. MTS Program DESIGN Concept
(1) Business
A transaction is an abstract concept, which refers to the whole of a set of data operations. Transactions have four attributes: Atomicity (atomicity), consistency (consistency), isolation (isolation), and permanence (durability), which can be abbreviated to acid.
(2) MTS objects
An MTS object is an instance of a COM component running in an MTS environment, and MTS maintains an environment object for each object.
(3) MTS Customers
An MTS customer is a client of an MTS object that can be an application that runs outside of the MTS environment, which we call the base customer; MTS customers can also be another MTS object, so the concept of MTS customers and objects is also a relative concept.
(4) Security control
MTS recommends the use of role-based security models, where roles are the core of the MTS security model, and a role defines a user's logical mix.