Architect Road (1) --- procedure-oriented and object-oriented Wang Zebin

1. Introduction The
   machine is a computer science applied science, its knowledge system is a typical inverted triangle structure, basic knowledge is not much used, but with different application areas and directions, resulting in a lot of branches, so that programming is not a very difficult thing, a high school student through specific training can be done. However, it will compile a good program and process absolutely two different things, the same programmer, and some people a few years later became the architect, some people are still constantly coding, but ctrl-c, ctrl-v was used more skillful. In China, the final way back programmers nothing less than two: First steering technology management, it is the end of CTO; second is to continue in-depth, its end is the chief architect, CEO who are in the minority. If you are still an ordinary programmer, want to continue to move forward in technology this road, I think you should start by supplementing the idea that software engineering, learn a little bit about design patterns, only have these capabilities, you can from the overall and the macro level to consider the issue, analyze and solve problems. Coding for many years, among quite a few detours, although ultimately no big achievement, but at least have some experience, very willing to come up with some of their own experience to share with you, this may help your development.

The concept by the programmer into an architect, even if most are not open around the object-oriented (OO) a. I remember in college, we opened a specialized course called "object-oriented programming." At that time, we just learned a C language, Turbo C, the slightest experience in project development or the development environment used under DOS are not pure air to air. So, one semester down, I always in a state of ignorant, neither understand process-oriented and object-oriented in the end what is the difference, did not get to know what are the benefits of object-oriented energy.


2, process-oriented (OP) and object-oriented (OO)


2.1 fried rice and rice bowl
    was so different to describe the OP and OO: write out the program with a process-oriented approach is a fried rice, and object-oriented program is written in a rice bowl. The so-called rice bowl, Beijing called the Rice Bowl, Northeast called risotto, Guangdong called head rice dish, is a bowl of white rice in a covered dish and pour the above, what food do you like, what you pour dish. I think this analogy is quite apt.
Details fried rice production, I do not know, because I'm not a cook, will not cook, but in the end of a process must be put rice and egg mix and stir well. Rice bowl does, it is to cover the rice and vegetables are good, if you want to do a braised pork rice bowl, pour a Pork give you; if you want a green pepper potato rice bowl, pouring give a parts of green pepper potato silk.


    Benefits fried rice is tasty uniform, tastes sweet. If you happen to do not eat eggs, only eat vegetables, then the only way is to pour all the re-do a vegetable fried rice. Rice bowl not so much trouble, you just need to cover the above dishes pulled out, the replacement of a covered dish on it. The disadvantage is the rice bowl of tasty uneven, it may not be so fragrant fried rice.
In the end is good fried rice or rice bowl is good? In fact, these problems are difficult to answer, than a non-down level, then it is necessary to set a scene, or can only be said to be their own merits. If we are not gourmet, not so much about, so from the perspective of the restaurant, then do the rice bowl is clearly more advantageous than the fried rice, he can be combined in any number of combinations out, and will not be wasted.

2.2 Software Engineering
    benefit rice bowl is the "food", "food" separation, thereby increasing the flexibility of making rice bowl. Rice satisfied with the change of rice, vegetables are not satisfied with changing dishes. In technical terms of software engineering is the "maintainability" is better, "rice" and "food" coupling is relatively low. The fried rice "egg", "rice" mix together, want to change the "egg", "rice" in any of a very difficult, a high degree of coupling, so that "maintainable" relatively poor. One goal is to software engineering maintainability, serviceability, mainly in three aspects: understandability, testability and modifiability. One of the benefits of object-oriented is significantly improved maintainability of software systems.


    Process-oriented (OP) and object-oriented (OO) is not encoded in two ways refers to it? Not! You get a user's needs, such as someone looking for you compile software, you are not required to go through needs analysis, then the overall / detailed design, coding and finally, in order to ultimately write software, delivered to the user. This process is in line with the way the basic human behavior: first want to do, then think about how to do it, and finally do something. Some students said: "I did not follow the steps do you say, ah, I was directly encoded." In fact, you will go through these three stages, but your subconscious does not share so clear. Demand for people to get on coding may ed ed, they have to go back and re-pondering, they will inevitably these processes,


    OO to an example, corresponding to the process of software development, OO derived three concepts: OOA, OOD and OOP. Way of using object-oriented analysis is called OOA, object-oriented design is referred to OOD, by way of encoding is called object-oriented OOP. Process for the (OP) and object-oriented nature of the difference (OO) of that analyzed differently, resulting in different coding schemes.

2.3 Process for the (OP) and object-oriented (OO)
(To be continued)

Guess you like

Origin blog.csdn.net/wanghao72214/article/details/3923366