Nuclos good code: refactoring, interface, DefaultValueProviderWithIds, readability, avoid duplication. |
Language: Deutsch · English
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 |