Closed pmonks closed 6 years ago
I agree and was always in the TODO bucket. Will be in the next release.
@ftbb oh nice! I already started work on a fix - should I stop? I haven't gotten very far yet, so if you'd prefer to do this yourself I won't have wasted much time / effort.
With the older
init
methods now deprecated (1, 2, 3), indications are that theSymphonyClientConfig
andSymphonyClientConfigID
classes are, or will become, the only supported way to initialise Symphony Java Client.These classes appear to have been introduced to confront the (legitimate!) problem of proliferating constructors with lengthy parameter sets (aka the "telescoping constructor anti-pattern"), however the current solution is at odds with longstanding Java best practice in this area; i.e. application of the Builder pattern. This makes SJC harder to instantiate in many downstream environments (notably those where dependency injection is in use).
It would be preferable if SJC adopted Java best practice here and introduced the Builder pattern, ideally the Step Builder variant.