Modularity (programming)
Wikipedia, the free encyclopedia - Cite This SourceIn computer science, modularity is the property of computer programs that measures the extent to which they have been composed out of separate parts called modules. A modular approach to programming is gaining popularity in fields of artificial intelligence systems integration, where a large-scale general A.I. system is composed of modules that each serve a specific purpose and communicate with each other to produce the system's overall behavior.
Programs that have many direct interrelationships between any two random parts of the program code are less modular (more tightly coupled) than programs where those relationships occur mainly at well-defined interfaces between modules.
Modular programming techniques are those which increase modularity. (See also: modular programming, structured programming, procedural programming, object-oriented programming and aspect-oriented programming, distributed computing.)
Modules provide a separation between interface and implementation. A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are visible to other modules. The implementation contains the working code that corresponds to the elements declared in the interface. Languages that explicitly support the module concept include Ada, D, F, Fortran, Pascal (some derivatives), ML, Modula-2, Python and Ruby. The IBM System i (aka AS/400 and iSeries) also uses Modules in RPG, COBOL and CL when programming in the ILE environment.
Modules and classes
The differences between classes and modules are:
- Classes can be instantiated to create objects,
- Classes can inherit behavior and data from another class,
- Polymorphism allows relationships between class instances to change at run-time, while relations between modules are static.
The similarities between classes and modules are:
- Both can be used to hide implementation details from public view.
- Both can form a hierarchy of modules/classes.
Module Interconnection Languages (MILs)
Module Interconnection Languages (MILs) provide formal grammar constructs for deciding the various module interconnection specifications required to assemble a complete software system. MILs enable the separation between programming-in-the-small and programming-in-the-large. Coding a module represents programming in the small, while assembling a system with the help of a MIL represents programming in the large. An example of MIL is MIL-75.See also
- Modular programming
- Cohesion
- Coupling
- Encapsulation
- Library (computing)
- David Parnas
- Ilities
- Constructionist design methodology, a methodology for creating modular, broad Artificial Intelligence systems
External links
Wikipedia, the free encyclopedia © 2001-2006 Wikipedia contributors (Disclaimer)
This article is licensed under the GNU Free Documentation License.
Last updated on Friday February 29, 2008 at 07:21:17 PST (GMT -0800)
View this article at Wikipedia.org - Edit this article at Wikipedia.org - Donate to the Wikimedia Foundation