Don't Repeat Yourself


In software engineering, the Do not Repeat Yourself principle, often abbreviated to DRY and also known as the Single Point of Truth, is a design and development principle which should avoid any form of logical repetition and redundancy in the implementation of a software system. The principle was initially enunciated by Andy Hunt and Dave Thomas in their book The Pragmatic Programmer:

DRY is often quoted in relation to the coding smell of the code duplication, that is, in the strict sense that the software should not contain equal sequence of instructions. But this is a broader concept that applies to every part of a software system, including database schemes, build directives, configuration files, and even documentation.

The complete DRY application logically implies that modifying a single item in a system does not necessarily have to change other parts of a system to replicate the content of the modification in other places.

DRY application is particularly complex (and significant) in multi-tier architectures, where the same information is handled at different levels (eg user interface, application logic, database) through different technologies. This makes it particularly difficult to avoid duplication of information at different levels. The possible approaches to DRY application in these contexts typically involve the use of automated tools to generate different artifacts (for example code in different languages ​​and database schemes) starting with a single starting representation, for example a template of data expressed in UML (Model-driven architecture). Notemodify wikitesto Bibliografiamodifica wikitesto Voices correlateemodify wikitesto

wiki