当前位置:网站首页>How to draw the flow chart of C language structure, and how to draw the structure flow chart

How to draw the flow chart of C language structure, and how to draw the structure flow chart

2022-06-24 03:52:00 Good pie notes

One 、 chart 、 flow chart 、 The relationship of the prototype diagram

If a product is a / Solutions to multiple problems , Then the structure diagram can be regarded as each part of the scheme 『 modular 』, The flow chart is the specific inside of the module 『 step 』. The relationship between modules can be progressive , It can also be parallel , But most of the steps in the module are sequential .

Take didi for example , The whole product module is shown in the figure below , These four modules are sequential and progressive .

The following password management scheme , except 『 Set the password 』 In the top order , remainder 『 Verify password 』『 Change password 』 And 『 Retrieve password 』 There is no obvious sequence , It's a typical parallel relationship .

Continue to take password management as an example ,『 Password authentication 』 The execution steps inside the module are typical sequential relationships , As shown in the figure :

If you generalize in one sentence 『 chart 』『 flow chart 』『 Prototype map 』 The relationship between , That is, the structure diagram is the skeleton of the product , The flow chart is the context of the product , and 『 Prototype map 』 It is the skin bag of the product . Only build the skeleton first 、 Clear the context , To hold up the skin , So even if the structure diagram and flow diagram are in the actual document output , Occupy a small proportion , But their importance cannot be ignored .

Two 、 Definition of structure flow chart

Although the structure chart and the flow chart can be built independently , But in practice , They tend to merge the two into 『 Structure flow chart 』, Because products are usually accumulated from small to large , So the product requirements at each stage , There are not many modules included , There are two benefits of combining structure diagrams with flow diagrams :

Simplified workload

The product logic expression is more complete . If there are many demands in the project stage , The structure diagram and flow chart should be drawn independently , Because after merging the two ,『 Structure flow chart 』 It will be very huge , Difficult to maintain . 3、 ... and 、 Specific operation of the structure flow chart

Here we use 『 Password management 』 Case study , from 0 To 1 Experience the process of drawing a flow chart .

3.1 Common components

Whether it's a structure diagram or a flow chart , Are made up of graphic components , Here are some common component introductions , The meaning of these components requires product managers 、 Develop students 、 Test the students to reach a consensus , To lay a good foundation for the follow-up work .

3.2 Conceptual structure diagram

Before deciding on a plan , First, clarify the problems to be solved , The process of defining problems is also the process of requirement analysis , The specific operation will be detailed in the article on the other side , After identifying the problem , Next, disassemble the module , That is to say, what stages should we go through to solve this problem .

The process of disassembly can be thought by yourself , You can also discuss with others , You can also refer to competitive products …… Here we continue with 『 Password management 』 For example , As mentioned above , Password management can be divided into four modules : password 、 Password authentication 、 Password change 、 Password back , As shown in the figure below :

3.3 Key points for flow chart design

Disassemble the product into modules , You also need to fill in the corresponding execution steps for each module , Steps and the relationship between them , Use a flowchart to represent . A qualified flow chart should be logical 、 Think comprehensively 、 Articulate .

(1) Whether the function has multiple entrances

For example, for the password retrieval module , Its entry exists in the settings page , Is there another quick entrance ? For example, the password input page . Whether the pages accessed through each entry are consistent ? For example, enter the password retrieval module through the setting page , You may start by answering the security question , Click the shortcut entry of the password input page , The backup mailbox input pop-up box may pop up directly .

(2) Differences between new and old users

Many functions distinguish between new and old users , For example, the boot and initialization of functions are usually only shown to new users , For the password management scheme , The password setting module is only open to new users , Old users can only verify passwords 、 Change password and retrieve password .

In addition, many applications provide function setting modules , When making the structure flow chart, you should consider to provide the logic to retain the user settings .

(3) Network status

Some functions need to rely on the network for normal implementation , It is necessary to distinguish whether the network is normal 、 Weak net 、 There are three cases without network , For example, the news content details page , Under normal circumstances, the network will display news content , In the case of weak network, the loading animation will be displayed , When there is no network, a reminder that the network is unavailable will be displayed .

For password management , In the password retrieval phase , Enter the reserved mailbox and click send , You also need to judge the network status , And give users different feedback .

(4) Background interaction

For products with background data interaction , It should be reflected in the flow chart , You can't just focus on the front-end logic , Ignoring the back-end logic , Especially for students who have less experience in products , Most of the time, I will finish drawing the structure and process of the front-end products in a hurry , But when adding back-end logic afterwards , It often hurts the structure flow chart of the front end !

(5) The principle of sequence of steps

Between steps , It should be unidirectional , Sequential , If after performing the steps , There are a number of situations , You have to go through 『 scene 』 Graphical components to represent , Not directly 『 step 』 Graphic components to connect ; If there is a step crossover in the flowchart , Then the large probability shows that the logic design is unreasonable , At this time, we need to think and treat carefully .

(6) Omit the structure flow chart

If each functional level is very shallow , Logic is very simple , You don't have to draw a structure flow chart , It can be explained directly by comparing with the prototype drawing .

Four 、 Example of structure flow chart 4.1 Structure flow chart before optimization

The following structure flow chart , Although the module and specific steps are expressed in detail , But in 『 password 』 And 『 Password back 』 There are a lot of repetitive steps in , It looks very bloated , Reduced readability .

4.2 Extract sub processes

According to the analysis above , Can be 『 password 』 And 『 Password back 』 The repeated steps are extracted as sub processes , As shown in the figure below :

4.3 Optimized structure flow chart

The optimized structure flow chart is as follows :

5、 ... and 、 Summary

The structure flow chart is very important for the conception of product scheme , It can not only help the product manager to figure out the logical context of the product solution , It is also an important reference for development and testing students , The developed students will build the product architecture according to the structure flow chart , Test students will give test feedback according to each step of the structure flow chart , A well communicated logic flow chart , It can greatly reduce the communication cost , Improve the efficiency of the whole team , It's worth a try !

原网站

版权声明
本文为[Good pie notes]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/09/20210917190323849h.html