Module Definition
1. A program with a small space and complete structure that can be called independently.
The module cannot be too large. Otherwise, the application cannot be flexibly applied. The program structure must be independent and complete for ease of decomposition and combination,
For the second-Development Program to call freely.
Some modules need to be used with the public module. Because the public module is the basis of the design of all modules, it can still be regarded
Independent call.
2. High Efficiency and elasticity, making it easy for other program callers.
The Program System of secondary development is built on the module structure. If the module is not efficient, the Operation will inevitably be affected. At the same time,
Various applications have special requirements and conditions, while modules must consider universality. Otherwise, it is difficult to meet various conditions.
Therefore, when designing a module, we must consider the elasticity of the application so that it can not only meet various needs, but also achieve special tasks.
Service.
3. The function is clear and its changes are implemented by parameter settings.
If the function is not clear, the application may be confused and cannot achieve the expected purpose. Whether the function is clear, except for the program
Outside, manuals and instructions also account for a large proportion.
A specific function is not a single function, but a function category. In classification, there is a need
It is easy to distinguish, and the simplest is to set parameters and use them as the branch conditions.
The following classification methods are not static. In principle, modules can be divided
Is:
1. function module: separates the implemented functions.
Such modules should consider the convenience of applications and the completeness of functions. However, the so-called function integrity is limited to independence, single
One goal is never to design multiple different functions in an inseparable module.
2. Public module: it does not have clear functions, but it has shared benefits or other special purposes.
Designed as a module.
This type of module is often attached to other modules. Pay attention to the flexibility of its calling during design, and set up a directory for details.
Detailed records of its use, so that you can search at any time.
3. interface module: a module between two planes to solve the two problems. Generally, in a program, all data
The interface relationship is between data, between programs, and between hardware and hardware.
Interface Module.
4. Application Module: The application module that is provided to the application for operation because the application is a person and the worker is a program.
Block.
In essence, this module is still a kind of interface, but because the use of value is related to the success or failure of a program, it must be independent
Stand.
This type of module has the largest change, and it is necessary to modify or increase according to the user's needs at any time. Therefore, pay special attention to it during design.
Basic Principle of module Segmentation
In fact, apart from the continuous accumulation of knowledge, human intelligence has not grown ever since ancient times.
A module is a very valuable concept, such as the form, structure, steps, and concepts and cognition of any thing,
Analysis can be made into several modules on the premise of a certain target. With the module, the scope will be reduced and the problem will also
It becomes simple and easy to master. If the module can be effectively used as a solution to the problem
Negative.
Essentials
Life is limited. In order to effectively use energy to solve all problems, we should learn how to master things. Original
The module is the basis of the composition of things. Capable people must be good
By analyzing facts and understanding the basic structure of things, you can easily find problematic modules when faced with problems,
In the crux of the problem, the problem will be solved.
Module Segmentation
The reason for the module separation is not fixed. It can be divided into the following types:
1. For the convenience of production, the program is divided into modules, which is easy to maintain.
2. For work efficiency, speed, or space-saving programs, use different techniques.
3. Division by the programmer's ability to work or working conditions.
4. program functions are classified and made separately to facilitate flexible application.
Regardless of the reason, before dividing a module, you must first determine the target, fully understand the pattern of the program, and then adjust it.
Classification can be divided by category.
After the classification is determined, it is named by category to facilitate memory and application. At this time, the Unified Definition of the format is the key
. Because there are many modules, the calls between each other are extremely frequent. If the format cannot be unified
It should be adjusted, but it increases the difficulty of use, not worth the candle.
Secondly, a summary table must be created for each module and maintained frequently.
Yes, do not be lazy. During each call, you also need to modify the record, such as the number of times of use and the called program.
If the program production scale is large and the number of participants is large, it is ideal that a dedicated person is responsible for module management. Engaged in such work
You must be clear-minded, responsive, and hardworking.
Module features
The so-called module feature refers to the factors taken into consideration when each module is designed or split. Features include functions,
Special requirements on efficiency and the focus of use should be paid attention to and other details of relevant modules.
Regardless of the purpose of the module design, the module should be highly efficient. Modules
Block division is an inevitable factor. efficiency is pursued for both functions and convenience of production.
Each module has its own features. To meet the efficiency requirements, we should first understand the features of the module.
Module call
A prerequisite for a module is that it can be called flexibly, otherwise it will lose the significance of its design. And the purpose of the module
I. It is used for secondary development for other programmers. Therefore, the called method is crucial and must be comprehensive.
All.
Procedure
The program has a certain running rule, known as the "process", that is, during execution, according to the pre-arranged order, 1
First-class process.
The traditional program writing method is very important because people need to follow a concept to gradually test and put it into practice.
. However, since the importance of the module, each module represents a complete function, and the set of functions can be implemented
The effect is far from being expressed by the process. As a result, the importance of the process is reduced, and its position is only in the structure.
.
Because modules can be combined, the more modules, the shorter the main process. Although each module has its own process,
Well-structured modules can be subdivided into several sub-modules, and so on. Therefore, the process is far less flexible than the module,
Concept also seems dull.
However, even in the module design process, it is sometimes necessary to gradually reason through the process to understand the details.
Structure. In this position, the application of the process is understandable. However, once the customer is anti-customer, programmers cannot use the process.
Think, it's a big mistake.
The process is a single-line thinking. Although people often use this process reasoning, the more important capability comes from "abstraction ".
Thinking 」. Abstract thinking refers to the situation in which people can grasp the key points in a number of intricate and tangled phenomena.
To solve the problem.
In terms of procedures, this abstract thinking is equivalent to a comprehensive understanding of all modules, rather than just process reasoning.
With comprehensive cognition and flexible calling, the functions of the program will be upgraded and greatly improved.
If programmers only know how to write programs according to the process, they will not only be clumsy but also think deeply.
Methods are affected. The so-called "Ingenuity" and "sluggish" are the results of this kind of mechanical training.
Therefore, I do not agree to use the process to plan the process, but it is not excluded when interpreting or explaining a process.
Convenience.
Work Progress
The most important thing is not to increase the production speed, but to cultivate a kind of professionalism and
Work judgment capability.
The mastery of the work progress depends on the schedule, and the preparation of the schedule requires a considerable understanding of all the work. So,
The progress is equivalent to fully and systematically thinking about the details of the work, which greatly helps the programmer's ability to work.
Help.
Of course, progress can effectively supervise the work. Every time the progress is completed on schedule, it is an achievement for programmers.
Sense. It often takes a long time to create large programs. If there is no progress for reference, people will often be confused.
Lost in the ocean, do not know where the lost feeling.
People with strong abilities can often correctly determine the time required for work. On the contrary, they do not know how long the work will take, or
The predefined progress is too far different from the facts, indicating that the programmer's ability is limited or insufficient.
However, it is not the correct idea that the writing program must fully conform to the progress. As discussed above, writing programs is an art.
Creative artistic work cannot be controlled by progress.
There is no specific way to prepare the progress. You only need to write down the work item, predict the completion time, and actual completion time.
Production is one thing, and execution is another. Only conscientious and responsible execution can have practical value.
The execution method does not involve checking the progress every day or on a regular basis. If the progress is found to be inconsistent, analyze the cause immediately,
And make correction and adjustment. As for the analysis results, it is best to record them as a reference for the next improvement.
In this way, the habit is formed. Naturally, the ability of Automatic Analysis and judgment will improve planning.
And design concepts.