Jump to content

Module (programming): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Radagast83 (talk | contribs)
completed merger
Line 1: Line 1:
{{Mergeinto|Modularity (programming)|date=December 2006}}
#REDIRECT [[Modularity (programming)]]
{{unreferenced||date=June 2006}}
In [[computer science]], a '''module''' is a software entity that groups a set of (typically [[cohesion (computer science)|cohesive]]) [[subprogram]]s and [[data structure]]s. Modules are units that can be [[compiler|compiled]] separately, which makes them reusable and allows multiple programmers to work on different modules simultaneously. Modules also promote [[modularity (programming)|modularity]] and encapsulation (i.e. [[information hiding]]), both of which can make complex programs easier to understand.

Modules provide a separation between [[interface (computer science)|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 programming language|Ada]], [[D programming language|D]], [[F programming language|F]], [[Fortran]], [[Pascal programming language|Pascal]] (some derivatives), [[ML programming language|ML]], [[Modula-2]], [[Python (programming language)|Python]] and [[Ruby programming language|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 [[class (computer science)|class]]es and modules are:

*Classes can be instantiated to create [[object (computer science)|object]]s,
*Classes can [[inheritance (object-oriented programming)|inherit]] behavior and data from another class,
*[[Polymorphism (computer science)|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.

ALSO KNOWN AS "THE INFORMATIONAL GRID"

==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==
* [[Library (computing)]]
** [[Subroutine|Subroutine/Subprogram]]
** [[Shared Library]]
** [[Static Library]]
** [[C standard library]]
* [[Dynamic-link library|Dynamic-link library (.DLL)]]
** [[Dynamic Library|Dynamic Library (.SO / .OSX)]]
* [[Object File]]
* [[Loader (computing)]]
* [[Linker]]
* [[Code reuse]]
* [[Plugin]]
* [[Position-independent code]]
* [[Dependency walker]], a utility which displays exported and imported functions of DLL and EXE files.

==External links==
{{Wikibooks|Ada Programming|Packages|Modules}}
*[http://modules.sourceforge.net/ Environment Modules]

[[Category:Computer programming]]

[[de:Modul (Software)]]
[[fr:Module (programmation)]]
[[ja:モジュール]]
[[zh:模組 (程式設計)]]

Revision as of 03:30, 24 July 2007