*** Welcome to piglix ***

Functional design


Functional Design is a paradigm used to simplify the design of hardware and software devices such as computer software and increasingly, 3D models. A functional design assures that each modular part of a device has only one responsibility and performs that responsibility with the minimum of side effects on other parts. Functionally designed modules tend to have low coupling.

The advantage for implementation is that if a software module has a single purpose, it will be simpler, and therefore easier and less expensive, to design and implement.

Systems with functionally designed parts are easier to modify because each part does only what it claims to do.

Since maintenance is more than 3/4 of a successful system's life, this feature is a crucial advantage. It also makes the system easier to understand and document, which simplifies training. The result is that the practical lifetime of a functional system is longer.

In a system of programs, a functional module will be easier to reuse because it is less likely to have side effects that appear in other parts of the system.

The standard way to assure functional design is to review the description of a module. If the description includes conjunctions such as "and" or "or", then the design has more than one responsibility, and is therefore likely to have side effects. The responsibilities need to be divided into several modules in order to achieve a functional design.

Every computer system has parts that cannot be functionally pure because they exist to distribute CPU cycles or other resources to different modules. For example, most systems have an "initialization" section that starts up the modules. Other well-known examples are the interrupt vector table and the main loop.

Some functions inherently have mixed semantics. For example, a function "move the car from the garage" inherently has a side effect of changing the "car position". In some cases, the mixed semantics can extend over a large topological tree or graph of related concepts. In these unusual cases, functional design is not recommended by some authorities. Instead polymorphism, inheritance, or procedural methods may be preferred.


...
Wikipedia

...