All Topics  
Modularity (programming)

 

   Email Print
   Bookmark   Link






 

Modularity (programming)



 
 
Modular programming is a software design technique that increases the extent to which software is composed from separate parts, called modules. Conceptually, modules represent a separation of concerns
Separation of concerns

In computer science, separation of concerns is the process of breaking a computer program into distinct features that overlap in functionality as little as possible....
, and improve maintainability
Maintainability

In software engineering, the ease with which a software product can be modified in order to:* correct defects* meet new requirements* make future maintenance easier, or...
 by enforcing logical boundaries between components. Modules are typically incorporated into the program through interfaces
Interface (computer science)

Interface generally refers to an Abstraction_%28computer_science%29 that an entity provides of itself to the outside. This separates the methods of external communication from internal operation, and allows it to be internally modified without affecting the way outside entities interact with it, as well as provide Polymorphism in object-orien...
. A module interface expresses the elements that are provided and required by the module.






Discussion
Ask a question about 'Modularity (programming)'
Start a new discussion about 'Modularity (programming)'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Modular programming is a software design technique that increases the extent to which software is composed from separate parts, called modules. Conceptually, modules represent a separation of concerns
Separation of concerns

In computer science, separation of concerns is the process of breaking a computer program into distinct features that overlap in functionality as little as possible....
, and improve maintainability
Maintainability

In software engineering, the ease with which a software product can be modified in order to:* correct defects* meet new requirements* make future maintenance easier, or...
 by enforcing logical boundaries between components. Modules are typically incorporated into the program through interfaces
Interface (computer science)

Interface generally refers to an Abstraction_%28computer_science%29 that an entity provides of itself to the outside. This separates the methods of external communication from internal operation, and allows it to be internally modified without affecting the way outside entities interact with it, as well as provide Polymorphism in object-orien...
. 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
Implementation

Implementation is the realization of an application, or execution of a plan, idea, model, design, specification, Standardization, algorithm, or policy....
 contains the working code that corresponds to the elements declared in the interface.

Languages that formally support the module concept include Ada, D, F
F programming language

F is a compiled language, structured programming, array programming languages especially well suited to education and scientific computing. It is a subset of Fortran 95 developed by Walter Brainerd, Richard Hendrickson, and David Epstein....
, Fortran
Fortran

Fortran is a general-purpose programming language, procedural programming language, imperative programming language programming language that is especially suited to numerical analysis and scientific computing....
, Haskell
Haskell (programming language)

Haskell is a standardized, purely functional programming language with non-strict programming language, named after logician Haskell Curry. The goals of the language are described as:...
, Pascal (some derivatives), ML
ML programming language

ML is a general-purpose functional programming language developed by Robin Milner and others in the late 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM....
, Modula-2
Modula-2

Modula-2 is a computer programming language invented by Niklaus Wirth at ETH, around 1978, as a successor to his intermediate language Modula. Modula-2 was implemented in 1980 for the Lilith computer, which was commercialized in 1982 by startup company DISER as MC1 and MC2....
, Erlang, Perl, Python
Python (programming language)

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
 and Ruby. The IBM System i
IBM System i

The IBM System i is IBM's previous generation of systems designed for IBM i users, and was subsequently replaced by the IBM Power Systems in April 2008....
 (aka AS/400 and iSeries) also uses Modules in RPG, COBOL
COBOL

COBOL is one of the oldest programming languages still in active use. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments....
 and CL
AS/400 Control Language

The AS/400 Control Language is a scripting language for the IBM IBM System i midrange Platform bearing a resemblance to the IBM Job Control Language and consisting of an ever expanding set of command AS/400 object used to invoke traditional AS/400 programs and/or get help on what those programs do....
, when programming in the ILE environment.

Modular programming can often be performed even where the language lacks explicit syntax or semantics to support modules. The use of libraries hooked together by a linker
Linker

In computer science, a linker or link editor is a computer program that takes one ormore object file generated by a compiler and combines them into a single executable program....
 are a common mechanism for separating parts of the software into distinct modules.

Module Interconnection Languages

Module interconnection languages (MILs) provide formal grammar
Formal grammar

In formal language theory, grammars, also called formal grammars or generative grammars, are a formalism used to describe formal languages – i.e....
 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
Programming in the large

Introduction In software development, programming in the large and programming in the small describe two different approaches to writing software....
. 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 Object-Oriented Software Construction, Second Edition chapter 3 - Modularity

See also

  • Architecture description language
    Architecture description language

    Different communities use the term architecture description language. Two important communities are:* The software engineering community* The enterprise modelling and engineering community...
  • Cohesion
    Cohesion (computer science)

    In computer programming, cohesion is a measure of how strongly-related and focused the various responsibilities of a software module are. Cohesion is an level of measurement#Ordinal measurement type of measurement and is usually expressed as "high cohesion" or "low cohesion" when being discussed....
  • Constructionist design methodology
    Constructionist design methodology

    The Constructionist Design Methodology was developed by artificial intelligence researcher Kristinn R. Th?risson and his students at Columbia University and Reykjavik University for use in the development of cognitive robotics, communicative humanoids and broad AI systems....
    , a methodology for creating modular, broad Artificial Intelligence systems
  • Component-based software engineering
    Component-based software engineering

    Component-based software engineering is a branch of the software engineering discipline, with emphasis on decomposition of the engineered systems into Functional programming or logical components with well-defined Interface used for communication across the components....
  • Coupling
    Coupling (computer science)

    In computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules.Coupling is usually contrasted with cohesion ....
  • David Parnas
    David Parnas

    David Lorge Parnas is a Canadian early pioneer of software engineering, who developed the concept of information hiding in modular programming, which is an important element of object-oriented programming today....
  • Information hiding
    Information hiding

    Information hiding in computer science is the principle of hiding of design decisions in a computer program that are most likely to change, thus protecting other parts of the program from change if the design decision is changed....
     (encapsulation)
  • Library (computing)
  • List of System Quality Attributes
  • Snippet (programming)
    Snippet (programming)

    Snippet is a programming term for a small region of re-usable source code,machine code or text. Ordinarily, these are formally-defined operative units to incorporate into larger Module s....
  • Structured programming
    Structured programming

    Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. It is most famous for removing or reducing reliance on the GOTO Statement ....