Modularity (programming)

From Wikipedia, the free encyclopedia

(Redirected from Module (computing))
Jump to: navigation, search

Modularity is a concept that has applications in the contexts of computer science, particularly programming, as well as cognitive science in investigating the structure of mind. A module can be defined variously, but generally must be a component of a larger system, and operate within that system independently from the operations of the other components.

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.

Contents

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) 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.

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.)

Wikibooks
Wikibooks Ada Programming has a page on the topic of


Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.