Nuclos good code: refactoring, interface, DefaultValueProviderWithIds, readability, avoid duplication.

globe with meridians Language: Deutsch · English

open book How to do it right:

Refactoring of the negative example – a shared interface instead of code duplication.

The refactored counterpart to the negative example: a sensible interface (here DefaultValueProviderWithIds) implemented by both providers removes code duplication and confusing nesting – the code becomes readable and logical:

Beispiel für schlechte Programmierung

Related pages

gear Example of bad programming:


Before.

Open →