Structural and object-oriented application comparison

Source: Internet
Author: User

---restore content starts---

Structural and object-oriented application comparison

In the continuous practice and theoretical improvement of countless programmers, the most important guiding ideas in software engineering design have been changing. In a relatively long period of time, there are new programs in the software engineering design ideas emerge, which in the production practice has been widely used, is a structured and object-oriented approach.

The structured program design divides the software system into several functional modules or entities, which are programmed by the modular programming language, which is connected by each module and combined into the software system of the corresponding structure.

In object-oriented program design, the so-called object refers to an entity with certain structure, attributes and functions, uses object and object classes, and communicates with each other, describes various things in the objective world and their relationships, and establishes a hierarchical world model of object-oriented and message.

1. Structured programming

1.1. Concept Overview

The so-called structured designs (structured design, SD), mainly belong to a data flow or process-oriented design approach, can be compared with the structured analysis (structured analytical, SA) method, structured programming method before and after the Echo, Form a unified and complete serialization method. In particular, structured design is a design method based on modularization, top-down refinement and structured programming, and its most basic idea is to design the system into a single and relatively independent modular structure.

In the process of structural software design, from the technical point of view, the design process of the program mainly includes data design, interface design, architecture design and process design. The data design mainly transforms the entity relation into the file system structure and the database table structure. As for architecture design, the relationship between software modules is defined primarily. The interface design is to define the various relationships and interaction mechanisms within the system with the flow graph. Finally, the process design is to determine the algorithm of the software components and the internal data structure, and take some form to describe the algorithm.

1.2 Modeling Technology

1.2.1 Data flow and streaming diagram

Data flow diagram, DFD is generated in the requirements analysis phase. A series of successive transformations in a DFD from the input data stream of the system to the output data stream of the system form a flow of information. According to the different types of data flow, it can be divided into two categories: transformation type and Thing type.

In the transformed data stream, the information is entered into the system along the input path, and the information is transformed from the external form into the internal form, which is processed by the transformation center and then transformed into an external form to leave the system along the output path. The DFD of transformed data stream can be divided into three parts: logic input, Transformation Center (main processing) and logic output. Transform Data flow structure.

  

In the object-based data flow model, information is entered into the system along the input path, and the internal form is formed from the outside to the transaction center. Typically, the transaction center is located at the starting point of several processing paths, which are easily identified from the data flow diagram, because the transaction center typically has a "Launch Center" feature. Because there is a clear transaction center for the transaction flow, a variety of activity flows radiate out as a starting point for the transaction center.

And the flow chart is the basic tool of structured system analysis. A data flow diagram determines the process of system transformation, the collection (storage) of information or substances manipulated by the system, and the flow of data or material between processes, storage, and the outside world. From what we have drawn so many data flow diagram to understand, the diagram is a graphical way to show the real world of the actual existence of the traffic into the form of the chart, and ultimately into a table, converted to a computer can accept the form, so data flow diagram is necessary for us to do the needs analysis process, Through the understanding of the flow chart, we will have a deep understanding of the whole process of the project.

1.2.2 Structure diagram

The SD method uses a structure diagram to describe the structure of the program. The flow chart generated by SA in the phase of demand analysis can be easily converted into a software structure diagram through structured design.

The structure diagram mainly describes the call relationship and information transmission between modules in the software architecture. The basic components are modules, calls, and data. In general, an arrowhead annotation is used in the structure diagram to indicate that the module passes the information back and forth during the call.

1.2.3 Data Dictionary

The data dictionary is the core of the structure. A shared warehouse that defines the meaning, type, data size, format, unit of measure, precision, and allowable range of values for all data elements and structures used in an application. Data dictionary maintenance is independent of the software Requirements specification, and the data dictionary can be accessed by each stakeholder at any stage of product development and maintenance. It defines the original data element, the complex data element that makes up the structure, the repeating data item, the enumeration value of a data item, and an optional data item.

1.2.4 E-r Map

The ER diagram (ERD) is a conceptual data model established to describe the user's data requirements clearly and accurately. The main features are as follows: the solid type represented by the rectangle, the entity name in the rectangle, the property represented by the ellipse or rounded rectangle, the non-oriented edge is connected with the corresponding entity, the multi-valued attribute is connected by two lines, the main attribute name is underlined, and the contact name is indicated in the Diamond box. and the non-forward side is connected with the relevant entity, and the type of contact on the non-edge side label.

1.2.5 State transition Diagram

The behavior of the system is represented by describing the state of the system and the events that cause the system state to transition. Additionally, the state transition diagram indicates that the system will do those actions (for example, processing data) as a result of a particular event. Therefore, the state transition diagram provides a behavioral modeling mechanism

In a state transition diagram, each node represents a state in which the double loop is the terminating state.

1.3 Process of structured design

First, the data Flow diagram research, analysis and the market, which can help us from the software Requirements specification to master the process of dataflow processing.

Secondly, according to the data flow graph to determine the type of processing, it is necessary to pay attention to the object type and the transformation type, the designer should pay attention to the analysis and processing respectively.

Thirdly, the initial structure diagram of the system is deduced through the flow diagram.

Finally, the heuristic principle is adopted to improve the initial structure of the system until the structure diagram satisfies our requirements.

The data is designed using data dictionary and Analysis model E-r graph, including data file design and database design.

The process design is based on the state conversion diagram and the processing specification.

1.4 Advantages and disadvantages of structured design

Advantages: The structured approach is a software development method that emphasizes the structural rationality of the development method and the structure of the software developed. The essence of the structured approach is functional decomposition, starting from the single processing that represents the overall function of the target system, and constantly decomposing the complex processing into sub-processing from top to bottom, so that it is decomposed one layer at a level until there are only a few easily implemented sub-processes left. When the decomposed sub-processing is very simple, you can write the processing description of each of the lowest layer processing.

Cons: First, the structured approach is to construct the system around the process of implementing the processing function, however, the changes in user requirements are mostly for function, so the structure of the system is often unstable. Secondly, the structure method defines the boundary of the target system, and the system structure depends on the definition of the system boundary, so it is difficult to extend the system to the new boundary and the system is difficult to modify and expand. Furthermore, when designing a system in a structured way, almost every development of a new software system has to do a lot of repetitive and tedious work for the specific system, and the weight of the thought result is poor.

2. Object-Oriented Programming

2.1 Concept Overview

Since the advent of object-oriented technology since the early 80, due to its modularity, encapsulation, inheritance, polymorphism and dynamic bundle can meet the requirements of software engineering, easy to maintain, reusable, easy to expand and today's multimedia and distributed computing requirements, a moment to become a computer in various fields of the new technology focus. The so-called object refers to an entity with certain structure, attributes and functions, uses object and object classes, and communicates with each other, describes various things in the objective world and their interrelationships, and establishes a hierarchical world model of object-oriented and message-based. The object-oriented program design method is based on the above object-oriented world model.

2.2 Object-oriented analysis (OOA)

OOA emphasizes that the object in the OOA model is set up directly for the objective things in the problem domain. The static characteristics and behaviors of a thing are described by the properties and methods of the object. There are things in the problem domain that are worth considering and which objects are in the OOA model. And the naming of objects and their methods is consistent with objective things. In addition, the OOA model retains the original relationship between things in the problem domain. This includes attributing objects with the same attributes and methods to classes, and describing the relationship between the General class and the special class (i.e., the inheritance relationship) with a general----special structure (also known as the classification structure); Describe the composition of things in a whole part of the structure (also known as the assembly structure) ; Use case connections and message connections to represent static relationships between events (the properties of one object are related to another object) and dynamic relationships (the behavior of one object and the behavior of another object). As you can see, whether it's a single thing in a problem domain or a relationship between things, the OOA model retains its original appearance, is not transformed, distorted, or is re-assembled without breaking the original boundaries. Therefore, the OOA model can map the problem domain well. OOA the observation, analysis and cognition of the problem domain is direct, and the description of the problem domain is very direct. The concepts and terminology used in the problem domain are kept to a maximum extent, and there is no language gap.

2.3 Object-oriented design (OOD)

The division of responsibilities between OOA and Ood is: OOA the application of Oo method to the problem domain, a OOA model is established to reflect the problem domain, regardless of the factors related to the implementation of the system (such as what programming language, graphical user interface, database, etc.), so that the OOA model is independent of the concrete implementation. Ood is a specific implementation of the system using the Oo method. These include two aspects of the work, one is to move the OOA model directly to Ood (without conversion, only some necessary modifications and adjustments), as a part of the Ood: In addition to the specific implementation of human-machine interface, data storage, task management and other factors to supplement some of the implementation-related parts. These sections use the same representation and model structure as the OOA. The consistent representation of OOA and Ood is one of the important factors of object-oriented analysis and design over traditional software engineering methods. This makes no conversion from OOA to Ood, only partial modifications or adjustments, and adds several separate parts related to the implementation. Therefore, there is no gap between the analysis and design of traditional methods between OOA and Ood, which can be closely connected, which greatly reduces the difficulty, workload and error rate of OOA transition to Ood.

2.4 Object-oriented programming (OOP)

Object-oriented programming is the first domain of object-oriented approach from birth and development to maturity, and also an important stage for the final implementation of object-oriented software development. Before the advent of Ooa and Ood theory, programmers should write a good object-oriented program, first of all to learn to use Oo method to understand the problem domain, so oop is regarded as a more advanced technology. Now, in the Ooa->ood->oop software Engineering process series, the division of OOP is relatively simple: the work of recognizing the problem domain and designing the components of the system has been completed in the OOA and OOD phases, OOP works by using an object-oriented programming language to write the various components of the OOD model.

2.5 UML-based software analysis and design

System (user) requirements. It is the problem of the proposed process, the software generally to achieve what function, what participants. The application diagram expresses the relationship between the actor (actor) and the software application (use case), the application, and the system response. In the process of understanding the system requirements, you can add the corresponding actor and use case to the application diagram. At the end of the understanding of the system requirements, the relationship between the different actor and use case can be connected with the corresponding connection and the definition of the connection is made clear. You can then analyze the system response of the use case, which is to draw the system execution sequence, which has entered the system analysis stage.

System analysis. At this stage, the functionality of the software needs to be detailed, taking into account the relationship (hierarchy) of the data, then establishing the corresponding object, then analyzing the relationship between the objects (that is, the software structure) and defining the properties and methods of the object. The commonly used analytical methods include flow chart, bubble map and top to bottom analysis method, but each method can only reflect one party of the system, and combine them together, that is the analytic method of UML.

Code writing. The process is to transform the abstract software model into specific code. Using the UML-based case tool to build a model, or a multi-View related database system (RDMS), you can use software to directly generate a corresponding code framework based on this model. At this point, a software system with a clear structure has a prototype, and the next stage is to fill in the frame with a specific code.

Maintenance and extension of the code. Object-oriented program design method, the main purpose is to make the program easier to maintain, expand. In order to change and add code, it is generally necessary to read through the source code and comments, and then understand the structure of the program and the completion of the function, and then modify. But for the software designed by UML, it is possible to express the software structure clearly by looking at the graphs of different angles in the model. The document that is written when the model is created is also added to the source code. In addition, some case tools also provide a COM interface, through the programming of the established model analysis, output the corresponding reports, documents. The above 3 points show that using UML to build a model is more conducive to software maintenance and expansion.

2.6 Advantages and Limitations

Superiority: Adopt object-oriented thought design structure, readability is high, because of the existence of inheritance, even change the demand, then maintenance is only in the local module, so maintenance is very convenient and low cost. At design time, you can reuse existing classes that have been tested in the field of previous projects to make the system meet business requirements and have high quality. It is more efficient in software development and can abstract and produce classes based on the needs of the design for real-world things. Using this method to solve the problem, close to the daily life and the natural way of thinking, is bound to improve the efficiency and quality of software development. Due to the characteristics of inheritance, encapsulation and polymorphism, the system structure of high cohesion and low coupling is designed naturally, which makes the system more flexible, easier to expand and less cost.

Limitations: Need a certain software support environment; Not very suitable for large-scale MIS development, if the lack of the overall system design division, easy to cause the system structure is unreasonable, each part of the imbalance and other problems; only in the existing business based on the classification, can not be rationalized and optimized from the perspective of scientific management; beginners are difficult to learn.

3. Structural and object-oriented design comparisons

The first concern of the structured method is the function, emphasizing the module (i.e. process) as the center, adopting the modular, top-down, step-up design process, the system is a set of functions and processes to realize the function of the module, the structure is clear, the readability is good, is indeed an effective means to improve the quality of software development. Each module is likely to maintain a strong independence, but it is often independent of the database structure, the function module and the database is not mapped between the logical mode, the program and data structure is difficult to encapsulate together. If the functionality of the problem world is more complex or more important than data, then the structured approach should still be the preferred method.

If the data structure is complex, the module independence is difficult to guarantee. Abstract system structure of object-oriented method is often not simpler than that of structured method, but it can be mapped to database structure, it is easy to implement program and data structure encapsulation. The structural design starts from the function of the system and decomposes the system into several functional modules according to the engineering standard and strict specification. However, due to the user's needs and the development of software and hardware technology, the functional modules as the basic components of the system are easily affected, and local modification may even cause fundamental changes in the system. It is more common to start early in the development process and change frequently in the late stage. The object-oriented method starts from the processed data, describes the system with the data as the center, and the data is more stable than the function, so the system model can map the problem domain model well. The application of object, class, inheritance, polymorphism, dynamic concept and facility, obviously makes the object-oriented design method have some advantages, and can provide an effective way to produce reusable software components and solve the complexity problem of software.

Object-oriented design process is to solve real problems by establishing some classes and their relationships, which requires the whole analysis of the objects in the problem domain, the design requirements of class and inter-class relationships are high, otherwise the design is not the real object-oriented software system, but only some kinds of piling up, Can not reflect the advantages of object-oriented design approach.

The advantage of the object-oriented approach is not to reduce development time, the initial use of this technology software may be longer than the structured approach development time, developers must spend a lot of effort to analyze what the object is, what each object should be responsible for, all of these objects how well to work together to achieve the intended goal. The benefit of this is that it improves the reusability of the target system, reduces the workload and possible mistakes in the subsequent phases of the life cycle, and improves the maintainability of the software.

4. Summary

Whether the structure of the module as the core or the object-oriented software engineering design ideas, are based on the practice, summed up the scientific program design method. In the process of real program design and development, the developer must combine the characteristics of the project itself, as well as their own actual development experience, choose the most suitable design and development method.

5. References

[1] 刘薇. Research on structured design method in software engineering [a].2013

[2] Cai Wei. Structured design method in software engineering [a].2011

[3] Horondan. Comparison of structured methods and object-oriented methods in software engineering [a].2007

[4] Zhangjing, Li Cheng da. Comparison of structured software engineering methods and object-oriented engineering methods [a].2000

[5] di Jian, Li Xin Leaf, Songyu. Object-Oriented Software engineering analysis method [a].2002

[6] Cho. Structural programming and discrimination [a].1997

[7] Wang Dejun, Ling Yongfang. A comparison of structured programming methods with object-oriented program design methods [A]. 2003

[8] Zhang Yaomin. Structural Design method in software engineering [A]. 2012

[7] http://blog.csdn.net/lxd8731247769/article/details/47101589

[8] Http://blog.sina.com.cn/s/blog_71e00b8801010msv.html

[9] http://blog.csdn.net/zhoukun1008/article/details/40450627

[Ten] Http://wenku.baidu.com/link?url= Ywwtwt2lti-qiab9bk6loafhty3fidl1cxnsacqx7f6m1zi2rk-hxs8w9wjyyg7hroukv38a42lespzrznw3uvsftrxvou5atze8zyrcbgy

---restore content ends---

Structural and object-oriented application comparison

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.