Module (programming): Difference between revisions

Content deleted Content added
Rsms (talk | contribs)
mNo edit summary
Undid revision 455477144 by 99.90.197.87 (talk) Same reason as last time, try reading it
 
(33 intermediate revisions by 26 users not shown)
Line 1:
#REDIRECT [[Modular programming]]
In [[computing]], a '''module''' is a software entity that groups a set of (typically [[Cohesion|cohesive]]) [[subprogram]]s and [[data structure]]s. Modules promote encapsulation (i.e. [[information hiding]]) through a separation between the [[interface]] and the [[implementation]].
 
The 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.
 
Modules are units that can be compiled separately. This makes them reusable and allows multiple actors to work on different modules simultaneously.
 
Differences between [[Class (computer science)|classes]] and modules are the following:
 
*Classes can be instantiated to create [[Object (computer science)|objects]],
*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.
 
Similarities between [[Class (computer science)|classes]] and modules are the following:
 
*Both can be used to hide abstraction from public view.
*Both can form a hierarchy of modules/classes.
 
Languages that explicitly support the module concept include [[Ada programming language|Ada]], [[D programming language|D]], [[F programming language|F]], [[Fortran|Fortran]], [[Haskell programming language|Haskell]], [[ML programming language|ML]], [[Modula-2]], [[Python programming language|Python]] and [[Ruby programming language|Ruby]].
 
==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.
 
==External links==
{{Wikibookschapter
| book = Ada Programming
| chapter = Packages
| name = Modules
}}
*[http://modules.sourceforge.net/ Environment Modules]
 
 
[[Category:Code library]]
 
[[de:Modul (Software)]]
[[fr:Module (programmation)]]
[[zh:軟體模塊]]