public final class JvmSdkFeatures extends Base
The SDK API uses:
CompletionStage
Optional
ZonedDateTime
, LocalDate
and LocalTime
Function
The SDK's implementation classes extend Base
which provides default implementations for the methods by using
reflection following the suggestions of
Effective Java.
Domain models are no plain old Java objects since the client does not pose control over them, but needs to send update commands to the Composable Commerce HTTP API. Thus setters, as provided by other cloud services are not applicable in the API.
The approach to synchronize the model in the background blocks the caller thread and makes it hard to impossible to tune error handling, timeouts and recover strategies. Our approach makes it explicit, that an operation can be performed in the background, that the operation takes time and that the operation might fail.
Since domain models are interfaces you can use them in design patterns of your choice or to add convenience methods.
Since the clients and the models are interfaces they can be replaced with test doubles. In addition the SDK provides builders and JSON converters to create models for unit tests.
For example, QueryDsl
assists in formulating valid queries and to find out which attributes can be used in which way for querying and sorting.