Process-oriented and object-oriented? ? ?

After studying the development of programming languages ​​for so long, have you clearly thought about the difference between process-oriented and object-oriented?

  1. Starting from the programming language:
    for C language, it is completely process-oriented;
    for C++ language, it is half process-oriented and half object-oriented (C++ is semi-object-oriented);
    for Java language, it is completely process-oriented Object.

  2. What is the process-oriented development method?
    The main feature of the process-oriented development method is: focus on the steps to achieve a certain function, that is, what to do in the first step, then what to do in the second step, until the function of the entire event is completed. In addition, process-oriented also pays attention to the realization of the causal relationship between functions, for example, because of A function, there is B function, because of B function, there is C function, and so on.
    Advantages
    of process-oriented : Compared with object-oriented, process-oriented has higher performance. For example, single-chip microcomputer, embedded development, Linux/Unix, etc. generally adopt process-oriented development, and performance is the most important factor.
    Disadvantages
    of process-oriented : The most important thing about process-oriented is the causal relationship between each step or each function. Step A is related to step B. A and B can be linked into a sub-module. If other causal relationships are linked together, the most direct impact is that one of the modules has a problem, and then the operation of the entire system may be affected. In general, the coupling between the code and the code is too high, resulting in poor scalability of the code.

  3. What is object-oriented development?
    Object-oriented programming : (OOP object-oriented programming)
    to develop an object-oriented manner mainly to the main event and the role of things to objectification, including their properties and behavior, is an object-oriented, object-oriented programming ideas, emphasizing, Object-oriented programming thinking is actually a kind of thinking that is closer to people's actual life. Generally speaking, the bottom layer of object-oriented is still process-oriented. Process-oriented is abstracted into classes and then encapsulated. It is object-oriented to facilitate use.
    Advantages of object-oriented:
    Because object-oriented has the characteristics of inheritance, encapsulation and polymorphism, a low-coupling system can be designed to make the system more flexible and convenient for expansion.
    Disadvantages of object-oriented:
    Compared with process-oriented, the performance problem is the biggest disadvantage of object-oriented.

Summary
Process-oriented is specific and process-oriented. Solving a problem requires step by step.
Object-oriented is modeled. You only need to abstract a class and define some data and methods in this class. When we need to implement a certain function, we only need to use the object to call the data and methods inside.


The above content is a bit of personal learning experience. If there are errors in the knowledge points, please leave a message to remind you, if there is any infringement content reminder, delete it immediately.

Guess you like

Origin blog.csdn.net/pf6668/article/details/107516052