As the definition "a module consists a single block of code that can be invoked in the way that a procedure, function, or method is invoked", the definition seems very vague and broad. So could anyone explain it in other clear words and show some actual example how to break a requirement into module. Thanks
|
|
Module might be an overloaded term, so much that Wikipedia describes it under the term Modular Programming when discussing its use relative to software. They discuss it in terms of structured programming which was based on a top-down design approach. Key characteristics of modularity related to the use of low coupling and high cohesion. My usage has been that in a language like C or even C++, a module is related to defining a separately compiled unit from a source file (.c or .cpp) and typically one associated header file (.h). Other languages use module as a description, and the language Modula-2 put structuring around modules front and center in its name and its approach. Historically, module has some other implications as were described in the D.L. Parnas paper "On the Criteria to be Used in Decomposing Software into Modules". He is primarily concerned with discussing benefits of replacing functional decomposition with data oriented decomposition which was a big step toward our present state of the art which is object oriented decomposition. Object oriented languages are organized around classes, so maybe the term module is less important and less precise in that context. |
|||||
|
|
A module,
For example, dapper.net encapsulates database access. It has an API to access its functionality. It is a single file that can plugged in a source tree to be built. The concept of module comes from modular programming paradigm which advocates that software should be composed of separate, interchangeable components called modules by breaking down program functions into modules, each of which accomplishes one function and contains everything necessary to accomplish this. |
|||||
|
|
There isn't a formal definition of a module, and what a module is (or isn't) in the context of your project largely depends on the nature and design of the project. Generally speaking a module is a standalone piece of code that provides specific and tightly coupled functionality, modules define and enforce logical boundaries in your code. |
|||
|
|