Basic concepts of object-oriented programming and Component Object Models

Source: Internet
Author: User

The software development process has not changed much over the years. The main problems that need to be faced during the software development process are: the long development cycle makes it difficult to ensure the correctness of the program, difficult to maintain and so on have not been well solved, despite the emergence of object-oriented, framework design and other concepts and tools. The component object model is an extension of the traditional object-oriented model. The focus of the traditional object-oriented model is the source program, as well as the system analysis and design process. The concept of components emphasizes how large software systems are made up of small executable components of Different developers.
· Object-Oriented Programming
Object-oriented is a concept that has been recognized by many programmers and the industry for a long time. The object-oriented programming language allows developers to write programs based on the patterns in the real world where people think about problems. It allows developers to better use code to directly express existing objects in reality, in this way, the development code is simple and easy to maintain. Object-oriented language has the following three most important concepts:
Encapsulation-hides the implementation details of an object. The object user only uses the object through the defined interface.
Inheritance-new objects can use the functions of old objects.
Polymorphism-the ability to present multiple different behaviors based on the objects used.
From the perspective of the program, the most important concept that object-oriented programming provides to users is code sharing and reuse, which is extremely important to improve the efficiency of programming. However, once the code is shared and reused in practice, there are still various problems, such as version upgrades, interface changes, and code sharing among different programming languages. There is no answer to these difficulties in the original object-oriented programming method, which is the background of the component object model.
· Component Object Model
Decomposing a project into logical components is the basis for component-oriented analysis and design, which is also the basis of component software. Component software systems are composed of reusable binary software component modules, which can be combined by Different developers with only a few changes. It is particularly important that such a combination does not require source code or re-compilation, and components communicate through binary-based standards. This is called binary reuse. Component modules are independent of programming languages. The customer programs and components that use components communicate with each other in addition to standard methods.
Components can be divided into different types, including visual components such as buttons or list boxes; functional components such as printing or spelling check. For example, a component-based architecture provides a mechanism to insert the spelling check components of multiple developers into another developer's word processing application, in this way, users can easily select and replace word processing software based on their preferences.
Interfaces are the most important concepts in the component structure. An interface is a set of related methods under the same name (usually a unique ID value of a system. Communication between components is based on interfaces, and interfaces are strictly typed contracts between components and their customers. The two objects that implement the same interface are considered to be polymorphism. The polymorphism here does not contain meanings such as the base class pointer pointing to the object of the derived class, this means that the same interface can be implemented by multiple objects in different ways.

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.