scalardl icon indicating copy to clipboard operation
scalardl copied to clipboard

Update simple bank account app

Open KodaiD opened this issue 1 year ago • 1 comments
trafficstars

Description

This sample application had multiple issues: it was using old versions of ScalarDL Client SDK, Spring Boot, and Gradle. Additionally, despite having a gradlew file, the gradle-wrapper.jar was missing. These issues made it difficult for users to use the application easily. Therefore, I tried to resolve these problems and made accompanying changes to the directory structure, code modifications, and documentation updates.

Related issues and/or PRs

N/A

Changes made

The main changes are followings.

  1. Upgrading the ScalarDL Java Client SDK version
  2. Upgrading the Spring Boot version
  3. Separating contract code from application code

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [x] I have updated the documentation to reflect the changes.
  • [x] Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • [x] Tests (unit, integration, etc.) have been added for the changes.
  • [x] My changes generate no new warnings.
  • [x] Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

KodaiD avatar Jun 27 '24 09:06 KodaiD

Regarding the separation of contract code and application code: The Spring Boot version upgrade required Java version 17 or higher. However, the contracts needs to be Java 8-compatible binaries. I considered that users might want to use newer versions of Java rather than Java 8. To address this issue, I decided to separate the contract code (Java 8-compatible) from the application code (Java 21-compatible). (I have previously confirmed this design decision with @jnmt and @kota2and3kan.)

Furthermore, I prepared separate client.properties files for both directories (contract/ and app/), allowing the administrator registering the contracts and the application executing the contracts to use different client.properties files.

KodaiD avatar Jun 27 '24 09:06 KodaiD