All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.meta.JvmSdkFeatures Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.meta;

import io.sphere.sdk.models.Base;

/**

Embracing Java 8

The SDK API uses:

  • {@link java.util.concurrent.CompletionStage}
  • {@link java.util.Optional}
  • Java Date API: {@link java.time.ZonedDateTime}, {@link java.time.LocalDate} and {@link java.time.LocalTime}
  • {@link java.util.function.Function}

Good defaults for toString(), equals() and hashCode()

The SDK's implementation classes extend {@link Base} which provides default implementations for the methods by using reflection following the suggestions of Effective Java.

Domain models are immutable

Domain models are no plain old Java objects since the client does not pose control over them, but needs to send update commands to SPHERE.IO. Thus setters, as provided by other cloud services are not applicable in SPHERE.IO.

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.

Domain models are interfaces

Since domain models are interfaces you can use them in design patterns of your choice or to add convenience methods.

Testability

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.

Domain specific languages to create requests

For example, {@link io.sphere.sdk.queries.QueryDsl} assists in formulating valid queries and to find out which attributes can be used in which way for querying and sorting.

*/ public final class JvmSdkFeatures extends Base { private JvmSdkFeatures() { } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy