| Auszug |
|---|
|
Nuclos good code: refactoring, interface, DefaultValueProviderWithIds, readability, avoid duplication. |
Language: Deutsch · English
How to do it right:
Refactoring of the negative example – a shared interface instead of code duplication.
| Status |
|---|
| colour | Green |
|---|
| title | Updated: Jul 2026 |
|---|
|
| Status |
|---|
| colour | Grey |
|---|
| title | applies to Nuclos 4.2026.x |
|---|
|
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:
| Codeblock |
|---|
|
Beispiel für schlechte Programmierung |
Related pages
Example of bad programming:
Before.
Open →