On the understanding of structured method and object-oriented method

Source: Internet
Author: User

People's understanding of the world is constantly deepening, the transformation of the world is also in constant change, in the process of the world, there is no absolute right, or wrong, there is no absolute good or bad, as long as can solve a problem, that this method is feasible, is good, so-called structured method, Or is the object-oriented approach, is that people in the world's objective understanding of the changes, some of the response is to the different perspectives of the society, or to solve the problem from different angles to propose some of the solutions, and there is no fundamental right and wrong points, Nor does it say that a certain method will never be used again, leaving the stage of history.

By conceptually comparing the object-oriented approach and the structured approach, we can better understand the two methods, or we can use them better in future work.

Structured approach is an intuitive way of interpreting the world with an analytic perspective, and when we encounter a problem, if we try to solve the problem with a structured approach, the core idea is to divide the hierarchy, and to use a structured approach to resolve the problem by constantly layering it. Gradually reduce the difficulty until the final solution to the problem is achieved. In the process of decomposition, each stage is under the control of people.

Object-oriented approach to the solution of the problem is not the same as the structured approach, generally more focused on the macro and generics, the main reason is that people want to solve a problem to meet other similar problems at the same time, can do comprehend by analogy, do less boring code purposes, The main focus of the programmer's effort is to debug the effective code so that the programmer can work more efficiently. Object-oriented through the understanding of the environment generated by the problem, through the establishment of objects. The problem of the participants to the object, the description of the problem into the object of interaction, so that the way people know the world is consistent, such as when we imagine something, such as cooking, we first imagine the food, pot, stove and so on, and then think of the whole process of cooking, We are more inclined to each object's attributes, and the whole process is through the interaction between objects to understand the completion, in contrast, the process-oriented thinking way is: the first preparation of ingredients, stir fry and so on, some process, if we have finished a fried rice program, with a structured approach to write, that if you need to write a stir-fry program, the changes may be very much, but if we use the object-oriented approach to write, then modify it will be very simple, we only need to modify the properties of this object, and change it to the properties of the corresponding dishes, the basic completion of the entire program transformation of the workload, because the two process is almost , the difference is not the same as the object. Through the object-oriented thinking method, it can be better to do the program to describe the purpose of the world, making programming difficult to reduce a lot.

As far as my personal understanding is concerned, the object-oriented approach is more standardized, unified, better maintenance management, porting, and the structure of the idea more flexible, more unpredictable, but the problem is more sophisticated, but also more targeted, in many cases may be more rapid. The structure method produces the time relatively early, and the object-oriented method has the tendency to surpass the former, but this does not mean that the structure method is declining, the structure method still has the great use, for example the domain of the algorithm analysis, many times we only need the process to describe the algorithm, tests an algorithm efficiency, If you use the object-oriented set of many times will appear very procrastination, heavy, with the process of writing will appear very concise, very practical. In the field of industrial applications, we are more applicable to the object-oriented approach, in order to facilitate management, in order to solve more complex problems, focus on efficiency and focus on robustness.

Object-oriented approach is the general term of a class of methods for system development guided by object-oriented thinking. This kind of method takes the object as the center, takes the class and the inheritance as the construction mechanism to abstract the real world, and constructs the corresponding software system. The object-oriented approach also has a certain defect type, that is, different people with object-oriented approach to the design of the software may have a natural, no matter from the structural aspect or from the efficiency, there is a big gap, the reason is that different people for a problem often have different ways of understanding, the design of the object is often different, Good designers often design the architecture is very beautiful, and poor designers often can come up with a scheme, but the results are often unsatisfactory, and the structured approach to design software may be more efficient, although different people write out the level of things are also very big difference.

In terms of difficulty, object-oriented approach is more complex and difficult to understand than structured object method. The content of Surface object method is wide, the concept is many, and many are difficult to understand, so mastery is more difficult. The application of object-oriented approach often requires a supporting analysis, design methods, such as RUP methods, agile methods and so on. This knowledge is abstract and boring, difficult to master. The method of surface image object can be well understood and mastered through long-term development practice. In contrast, the structure method knowledge content is few, easy to get started;

A structured approach to design products often has a certain degree of certainty, but the structural approach often lacks a grasp of the global and some certainty about future changes, which will be weaker in adaptability. The structure method consists of three aspects: structural analysis, structured design and structured programming. The structural analysis mainly includes: analyzing the current data, making a DFD, and then using DFD to analyze the data processing process. The structure design mainly includes: Transforms the information which the data flow diagram shows to the program structure design description. At this stage, firstly, through the result of demand analysis, a concrete system design scheme is constructed, then the internal structure and algorithm of each module are determined based on the overall design, and the program flowchart of each module is generated. The basic principles of structural design include: abstract principle, decomposition principle, modularization principle.

Structured method is to emphasize process abstraction and modularization, to construct or deal with the problem of objective world by process, it is a process-oriented development method, and the object-oriented method emphasizes that the point of problem domain is directly mapped to the interface between object and object, and it is the problem of dealing with the objective world in accordance with people's usual way of thinking. The Structured method abstracts the problem of the objective world into the process that the computer can deal with, the basic unit of dealing with the problem is the module that can express the process clearly, and summarizes the relation and function between the module and the module with the hierarchical structure of the module. The object-oriented method uses computer logic to simulate the physical existence in the objective world. Taking the object's collection class as the basic unit to deal with the problem, the computer world should be brought closer to the objective world so as to make the problem more straightforward, and the object-oriented method is to use the class hierarchy to embody the inheritance and development between classes.

In summary, the goal of software development is to develop a software that meets the user's needs at the lowest cost. Therefore, according to the actual demand of the system, different design methods are chosen for the specific situation, which can give full play to the advantages of the object-oriented and structured methods. At present, in the analysis and design process of most software systems, both methods are both. The author thinks, the developer in the development practice, from the reality, consider the execution efficiency, the technical level of the developer, the system scale, whether is the system and so on the change of the demand, make full use of their advantages and avoid their shortcomings. For the development of some small embedded real-time monitoring system or the same stable small system, the use of structured methods, for the development of beginners, using a structured approach and object-oriented approach, for large-scale systems or requirements of the variable system, the use of object-oriented methods. In a word, according to the actual situation, select the appropriate software development method to achieve the best development efficiency.

On the understanding of structured method and object-oriented method

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.