Modular programming

Modular programming

Modular programming is a software design technique that increases the extent to which software is composed of separate, interchangeable components called modules by breaking down program functions into modules, each of which accomplishes one function and contains everything necessary to accomplish this.[1] Conceptually, modules represent a separation of concerns, and improve maintainability by enforcing logical boundaries between components. Modules are typically incorporated into the program through interfaces.[2] A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are detectable by other modules. The implementation contains the working code that corresponds to the elements declared in the interface.

Contents

Language support

Languages that formally support the module concept include Ada, BlitzMax, COBOL, Component Pascal, D, Erlang, F, Fortran, Haskell, IBM/360 Assembler, IBM RPG, Java (packages are considered modules in the JLS), MATLAB, ML, Modula-2, Modula-3, Morpho, Oberon, OCaml, Pascal, Perl, PL/1, Python, and Ruby. The IBM System i also uses Modules in CL, COBOL, and RPG when programming in the Integrated Language Environment (ILE). Modular programming can be performed even where the programming language lacks explicit syntactic features to support named modules.

Software tools can create modular code units from groups of components. Libraries of components built from separately compiled modules can be combined into a whole by using a linker.

Key aspects

With modular programming, concerns are separated such that no (or few) modules depend upon other modules of the system[dubious ]. To have as few dependencies as possible is the goal[dubious ].

When creating a modular system, instead of creating a monolithic application (where the smallest component is the whole), several smaller modules are built (and usually compiled) separately so that, when composed together, they construct the executable application program. A just in time compiler may perform some of this construction "on-the-fly" at run time.

This makes modular designed systems, if built correctly, far more reusable than a traditional monolithic design, since all (or many) of these modules may then be reused (without change) in other projects. This also facilitates the "breaking down" of projects (through "divide and conquer") into several smaller projects. Theoretically, a modularized software project will be more easily assembled by large teams, since no team members are creating the whole system, or even need to know about the system as a whole. They can focus just on the assigned smaller task (this, it is claimed, counters the key assumption of The Mythical Man Month – making it actually possible to add more developers to a late software project – without making it later still).

Implementation

Message passing has, more recently, gained ground over the earlier, more conventional, "Call" interfaces, becoming the more dominant linkage between separate modules as an attempt to solve the "versioning problem" (sometimes experienced when using interfaces for communication between the modules).

History

Traditional programming languages have been used to support modular programming - since at least the 1960s. Modular programming is a loosely defined concept with no official definition. It is, in essence, simply a programming technique[dubious ]. Exactly where modularized programming ends, and Dynamically Linked Libraries or Object-oriented programming starts in this context is subjective. It might be defined as the natural predecessor of OOP, or an evolutionary step beyond it - depending upon viewpoint.

See also

References

  1. ^ Jürgen Haas. "Modular programming". http://www.about.com/: About.com. "Modular programming is a programming style that breaks down program functions into modules, each of which accomplishes one function and contains all the source code and variables needed to accomplish that function. Modular programming is a solution to the problem of very large programs that are difficult to debug and maintain. By segmenting the program into modules that perform clearly defined functions, you can determine the source of program errors more easily. Object-orientated programming languages, such as SmallTalk and HyperTalk, incorporate modular programming principles." 
  2. ^ Seif Haridi; Nils Franzén. "7. Modules and Interfaces". http://www.mozart-oz.org/documentation/index.html: Mozart Documentation. "Modules, also known as packages, are collection of procedures and other values1 that are constructed together to provide certain related functionality. A module typically has a number of private procedures that are not visible outside the module and a number of interface procedures that provide the external services of the module." 

Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • modular programming — modulinis programavimas statusas T sritis informatika apibrėžtis Programavimo metodas, kai programa daroma iš ↑modulių. Programuoti naudojamos ↑modulinės programavimo kalbos arba kalbos, turinčios modulio sąvoką ir konstrukciją. atitikmenys: angl …   Enciklopedinis kompiuterijos žodynas

  • modular programming language — modulinė programavimo kalba statusas T sritis informatika apibrėžtis Programavimo kalba, kuria parašytos programos pagrindiniai elementai yra ↑moduliai (1). Klasikinis modulinio programavimo kalbų pavyzdys yra Modulos šeimos programavimo kalbos:… …   Enciklopedinis kompiuterijos žodynas

  • Modular design — Modular design, or modularity in design is an approach that subdivides a system into smaller parts (modules) that can be independently created and then used in different systems to drive multiple functionalities. A modular system can be… …   Wikipedia

  • Programming paradigm — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concu …   Wikipedia

  • Programming in the large and programming in the small — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computin …   Wikipedia

  • Programming language — lists Alphabetical Categorical Chronological Generational A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that… …   Wikipedia

  • Modular Gateway Interface —   Developer(s) PagePlanet Software Stable release 3 / 2009 Operating system …   Wikipedia

  • Object-oriented programming — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computing …   Wikipedia

  • List of programming languages by category — Programming language lists Alphabetical Categorical Chronological Generational This is a list of programming languages grouped by category. Some languages are listed in multiple categories. Contents …   Wikipedia

  • Modular connector — This article is about modular connectors. For the registered jack (RJ) wiring standard, see registered jack. Left to right, modular connectors: 8P8C plug, 6P6C plug, 6P4C plug, 4P4C plug, 6P6C jack …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”