Software system design steps and principles

Software system design steps and principles

In the system analysis phase, we have figured out the systemdo whatproblems, the most important of which are requirements analysis (to determine user requirements, functional requirements, system performance, system security, etc.), data flow diagram (to determine data requirements and conversion process); then in the system design stage, it is the process of starting to realize the requirements, that is, to solveHow to do itThe problem.


1 Contents and steps of software system design

The main content of software system design includes the overall structure design of the new system , code design , output design , input design , process design , data storage design , user interface design and security control design . The basic tasks of system design can be roughly divided intooutline designanddetailed designtwo steps.

1.1 Basic tasks of conceptual design

  • Design the overall structure of the software system

    Its basic task is to use a certain design method to integrate a complex systemDivide into modules by function; Determine the function of each module
    : determine the calling relationship between modules ; determine the interface between modules, that is, the information transmitted between modules; evaluate
    the quality of the module structure.
    The design of the overall structure of the software system is a key step in the outline design, which directly affects the work of detailed design and coding in the next stage . The quality and some overall characteristics of the software system are determined in the design of the overall structure of the software system.

  • Data structure and database design

    1) Design of data structure . The method of gradual refinement is also applicable to the design of data structures. During the requirements analysis phase, theData DictionaryIt describes the composition of data, operational constraints, and the relationship between data, and determines the structural characteristics of data. It should be refined in the outline design stage, and the specific implementation details are stipulated in the detailed design stage. Abstract data types should be used in the outline design stage.

    2) The design of the database . Database design refers to the design of data storage files, mainly in the following aspects:
    Conceptual design . On the basis of data analysis, the bottom-up method is adopted to design the view from the user's point of view, and the ER model is generally used to express the data model. The ER model is not only the basis for designing the database , but also the basis for designing the data structure.
    logic design . The ER model is independent of the database management system (DBMS), and it is necessary to combine specific DBMS features to establish the logical structure of the database.
    ③Physical design . For different DBMS, the physical environment is different, and the storage structure and access methods provided are different. Physical design is to design some physical details of the data model , such as data item storage requirements, access methods, and index establishment.

    3) Write the outline design document
    The documents mainly include outline design specification, database design specification, user manual and revision test plan.

    4) Review Review
    whether the design part has fully realized the functions and performance requirements specified in the requirements, the feasibility of the design method, the key
    processing and the correctness, effectiveness, and consistency between the internal and external interface definitions, etc.

1.2 Basic tasks of detailed design

The fundamental objective of the detailed design phase is toDetermine exactly how the required system should be implemented, that is, after this
stage of design work, an accurate description of the target system should be derived. The task of the detailed design stage is not to write the program specifically, but to design the "blueprint" of the program, and then write the actual program code according to this blueprint . The main tasks in the detailed design phase are:

  • righteach modulePerform detailed algorithm design . Describe the detailed algorithm of each module's processing process with tools such as graphics, tables, and language.
  • rightwithin the moduledata structure design .
  • The physical design of the database is to determine the physical structure of the database.
  • Other designs. Depending on the type of software system, the following designs may also be required:

    Code Design
    Code is a group of ordered symbols used to represent objective things, so as to facilitate computer and human identification and processing. In order to
    improve operations such as data input, classification, storage and retrieval, and save memory space,
    code design is required for the values ​​of certain data items in the database. The principles of code design are: uniqueness, rationality, scalability, simplicity, applicability, normativeness and
    systematicness.
    ②Input and output design
    ③User interface design

  • Write a detailed design specification.
  • review

    Both the processing algorithms and the physical structure of the database are reviewed.
    The result of system design is a series of system design documents, which are an
    important basis for the physical realization of an information system (including hardware devices and software programs).


2 Basic principles of software system design

2.1 Abstraction

Abstraction is a design technique that focuses on essential aspects of an entity while ignoring or obscuring less important or non-essential aspects . Abstraction is an important tool used to simplify complex phenomena to the point where they can be analyzed, experimented, or understood. In software engineering, there are multiple stages from software definition to software development, and each step forward in this process can be regarded as a refinement of the abstraction level of the software solution. The lowest level of abstraction is the source code that implements the software. There can also be multiple levels of abstraction in modular design. ①The modules at the highest level of abstraction describe the solution to the problem in a general way, and ②The modules at the lower level of abstraction are the refinement of the description of the solution to the problem by the modules at the higher level of abstraction .

2.2 Modularity

In a program, a module is a collection of program objects such as data descriptions and executable statements , or individually named and addressed elements , such as procedures, functions, and subroutines in high-level languages. In the software architecture, a module is a unit that can be combined, decomposed and replaced. Modularization refers to decomposing a software to be developed into several small simple parts—modules, each module can be independently developed, tested, and finally assembled into a complete program . It's a complex issue"divide and conquer"Principle. The purpose of modularization is to make the structure of the program clear and easy to read, understand, test and modify.

2.3 Information concealment

Information hiding is the principle used when developing the overall program structure, that is hiding or encapsulating the components of each program in a single design module, and revealing as little as possible of its internal processing when defining each module . When designing, first list some factors that may change, and when dividing modules, hide a factor that may change inside a certain module, so that other modules have nothing to do with this factor. When this factor changes, only the module containing this factor needs to be modified, and it has nothing to do with other modules. The principle of information hiding plays an important role in improving the modifiability, testability and portability of software.

2.4 Module independence

Module independence means that each module completes a relatively independent specific sub-function, and the connection with other modules is simple
. There are two criteria to measure the degree of module independence: coupling and cohesion .

  • coupling

    Coupling refers to the tightness of the connection between modules .The higher the coupling, the less independent the modules are. The level of coupling between modules
    depends on the complexity of the interface between modules, the way of calling and the information passed
    . There are several types of module coupling:
    (1) No direct coupling : refers to the connection between two modulesno direct relationship, they belong to the control and call of different modules respectively, and no information is passed between them. Therefore, the coupling between modules is the weakest, and the module independence is the highest.
    (2) Data coupling : refers to the connection between two modulesThere is a calling relationship, what is passed is a simple data value, which is equivalent to the value transfer in a high-level language. The degree of coupling is low, and the independence of modules is high.
    (3) Label coupling : refers to the connection between two modulesThe data structure passed, such as the data group name, record name, file name, etc. in the high-level language are tags, and what is actually passed is the address of the data structure.
    (4) Control coupling : when one module calls another module,Control variables are passed, the called module
    selectively executes a certain function in the block through the value of the control variable.
    (5) Public coupling : means through acommon data environmentThe coupling between those modules that interact.
    (6) Content coupling : This is the highest degree of coupling. whenOne module directly uses another module's internal data, or transfer
    to another module through an abnormal entry, the coupling between modules is content coupling, which often occurs in
    assembler programming.

  • cohesive

    Cohesion means inside a moduleThe degree of connection between the elements, for example, a module that fulfills multiple functions has a
    lower degree of cohesion than a module that fulfills a single function. The lower the cohesion, the less independent the modules are . There are several types of cohesion:
    (1) Accidental cohesion : refers to the processing of each process within a moduleno connection between elements.
    (2) Logical cohesion : refers toSeveral logically similar functions are performed within the module, determine which function the module completes through parameters.
    (3) Temporal aggregation : The module formed by combining actions that need to be executed simultaneously is a temporal aggregation module.
    (4) Communication cohesion : It means that all processing elements in the module operate on the same data structure, or that each processing uses the same input data or produces the same output data.
    (5) Sequential cohesion : means that each processing element in a module is closely related toThe same function must be executed sequentially, the output of the previous
    functional element is the input of the next functional element.
    (6) Functional cohesion : This is the strongest cohesion, referring toAll elements in a module work together to complete a function,Indispensable.
    Coupling and cohesion are two qualitative criteria for module independence. When dividing a software system into modules, try to achieve high cohesion and
    low coupling to improve the independence of modules.


Guess you like

Origin blog.csdn.net/qq_42774234/article/details/130462158