Thursday, June 18, 2009

Modular decomposability

                     A software construction method satisfies Modular Decomposability if it helps in the task of decomposing a software problem into a small number of less complex subproblems, connected by a simple structure, and independent enough to allow further work to proceed separately on each of them.The process will often be self repeating since each subproblem may still be complex enough to require further decomposition.A corollary of the decomposability requirement is division of labor.Once you have decomposed a system into subsystems you should be able to distribute work on these subsystems among different people or groups.

               The most obvious example of a method meant to satisfy the decomposability criterion is top down design. This method directs designers to start with a most abstract description of the system’s function, and then to refine this view through successive steps,decomposing each subsystem at each step into a small number of simpler subsystems until all the remaining elements are of a sufficiently low level of abstraction to allow direct implementation.


                        A typical counter example is any method encouraging you to include in each software system that you produce a global initialization module. Many modules in a system will need some kind of initialization actions such as the opening of certain files or the initialization of certain variables, which the module must execute before it performs its first directly useful tasks. It may seem a good idea to concentrate all such actions, for all modules of the system, in a module that initializes everything for everybody.Such a module will exhibit good “temporal cohesion” in that all its actions are executed at the same stage of the system’s execution. But to obtain this temporal cohesion the method would endanger the autonomy of modules.

                 You will have to grant the initialization module authorization to access many separate data structures, belonging to the various modules of the system and requiring specific initialization actions. This means that the author of the initialization module will constantly have to peek into the internal data structures of the other modules, and interact with their authors. This is incompatible with the decomposability criterion.In the object oriented method every module will be responsible for the initialization of its own data structures.

No comments:

Post a Comment