Object Creation: Builder vs. Constructor vs. Setter

When we create new objects, we are basically confronted with the need to provide at least one construction pattern. Of course depending on the language we have more or less three ways to go that are commonly available. Traditionally in OO it was mandatory to write setters and getters. In C++ or Java they really …

Share Button

MapStruct

In the Java sphere we often develop the same data class several times. Each layer has its own variant and they are named almost the same, with some prefix or suffix or just the package name to distinguish. The set of attributes is the same (or almost the same), they have setters and getters. Or …

Share Button