Python- On the understanding of object-oriented and process-oriented

Learning to program, always not open around the object-oriented and process-oriented two mountains, after a period of study, the following talk about my understanding of process-oriented and object-oriented (python) is.

The following is a brief Baidu Encyclopedia of object-oriented and process-oriented
Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description

Here Insert Picture Description
In my opinion, aside "all things are objects, encapsulation, inheritance, polymorphism," and many other objects associated with the professional-oriented vocabulary.
Despite the specialized vocabulary associated with process-oriented "top-down, thinning down" and so on.

in short

Object-oriented world is to have portrayed the N interaction between the initiative "living creatures";
the process is oriented to have a "hand of God" to manipulate a bunch of "dead" by developing a set of rules.
One thing is process-oriented "how to do?", Object-oriented is one thing "that lets anyone do?", Which is inside the " who " is the subject, as to how it should do its own thing, anyway, finally group objects together to be able to do things trying to be difficult.

From different angles to analyze words

Process-oriented object-oriented &
a) understanding the perspective of the problem: process-oriented, dead by rule passive control; object-oriented, active living creatures interact.
b) problem-solving ideas: process-oriented, function; object-oriented, object.
c) Center for Settlement of perspective: "? How do" process-oriented, How, (encapsulation process as a function of "how" is the process, who will do only parameter); object-oriented, Who, "? Who will do" ( " "who is the object, how do its own operation, coordinated multiple objects to complete the task).
d) the step angle to solve the problem: the process for the first logic specific details, the overall problem by abstracting; object-oriented, first overall, the specific details abstract logical problem.
e) the number of transmission angle: process-oriented, global variables or parameters; object-oriented methods.
f) the relationship between the angle: process-oriented, object not found; object-oriented, procedure can be found.

For example,
object-oriented: the dogs (feces).
Process-oriented: eat (dog feces)

Published 16 original articles · won praise 0 · Views 274

Guess you like

Origin blog.csdn.net/JOKERSNEAKER/article/details/105282507