openmhealth / schemas

A repository of Open mHealth schemas.
Apache License 2.0
71 stars 45 forks source link

Create a Kotlin SDK #20

Closed emersonf closed 1 year ago

emersonf commented 1 year ago

Problem

The Java SDK is outdated, and many IEEE schemas have been added that would need to be modelled. There isn't currently a Java code generator that handles our use of schema composition, e.g. allOf.

Solution

Instead of continuing to hand-create verbose Java code that may not be getting used, we opted to create a simpler and more modern Kotlin SDK by hand, or at least a representative part of it. Using Kotlin improves the signal-to-noise ratio of the SDK, makes it easier to use, read and update. It should also be a more natural fit for Android apps that handle digital health data.

The tests for the new SDK are now based on the same test data used to validate the schemas.

The Java SDK is now frozen. We also started a poll to see if there's interest in a pre-packaged SDK.