ComputersProgramming

Modular Programming

Modular programming works on the principle of "divide and conquer". It is necessary to understand.

Modular programming implies the organization of the program as a set of independent small units, which are commonly referred to as modules whose behavior and structure are completely subject to well-defined principles. It is worth dividing the application of the concept of "module" when, in view of the syntactic unit of the programming language , and when talking about the unit of fragmentation of a large program into several blocks, which can be implemented both in the form of procedures and as functions. The use of modular programming makes it possible to simplify the testing of the program and the timely detection of errors. You can strictly separate the hardware-dependent tasks from other subtasks, which will improve the mobility of the programs being created. Time-critical modules can be reworked separately, which makes the process much easier and makes the efficiency much higher. In addition, modular programming is much easier to understand, since modules can be effectively used as building blocks in other programs.

The very term "module" began to be used in programming in connection with the introduction of the modular principle when writing programs. In the seventies, a module was called some function or procedure that was written according to certain rules. Since at that time there were no universally recognized requirements, the module was called any procedure, whose size was up to fifty lines. Parnassus formed the first concrete requirements for the module: "To form one module, there should be enough minimal knowledge about the content of the other." It turns out, it was Parnassus who first formed the concept of information hiding in programming. Its definition leads us to the fact that any separate procedure of the lowest and the highest level of the hierarchy can be called a module. Reliably hiding the information could not be provided by using the structures existing at that time, since they were subject to the strong action of global variables, and their behavior in complex programs is very difficult to predict. It was necessary to create a construction that was isolated from these variables. It was her that was called the module, and on its basis modular programming was born.

Initially, it was assumed that the implementation of complex software packages can be implemented by using the module along with functions and procedures as a design that combines and hides the details of the implementation of a specific subtask. But Turbo Pascal did not fully implement the modular programming principle. In this language, there is no support for internal modules, the import is not implemented flexibly, since it does not allow importing objects from some other modules. The combined effect of this circumstance with the fact that with the proliferation of personal computers the number of programmers has significantly expanded, which has reduced the average level of theoretical readiness, led to the fact that when developing applications, modules were used as tools for creating problem libraries of functions and procedures. Only qualified programmers applied the full power of this language design for structuring operations of all objects.

If you look at the Pascal modules from the point of view of the programmer, then their number should be determined by decomposing the task into a number of subtasks independent of each other. In the extreme case, the module can be used to enter into it only one procedure if it is required that the local action that it performs is completely independent of the influence of other parts of the program when changes are made to the project code.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.birmiss.com. Theme powered by WordPress.