DrEcho ADRs

Architecture Decision Record List

Decision record template by Michael Nygard

Accepted

ADR #0

Context

What is the issue that we're seeing that is motivating this decision or change?

Decision

What is the change that we're proposing and/or doing?

Use MVVM for client architecture

Accepted

ADR #1

Context

Deciding between simple MVC and more complex MVVM for frontend architecture.

Decision

Choosing MVVM for its improved maintainability and adherence to SRP.

Use AtlantaFx for styling

Accepted

ADR #2

Context

Deciding between MaterialFx and AtlantaFx (GH Primer implementation) for styling.

Decision

Choosing AtlantaFx, because it works fine, looks good, and doesn't add dependency like MaterialFx.

Demo implementing for MVP version

Accepted

ADR #3

Context

Need for demo implementation for: - presentation MVP - testing

Decision

- Implement standalone service layer with in-memory fake repositories. - Implement functionality to switch initializing with random business demo data.

Use Lombok (constraints!)

Accepted -> In use -> Update (Reason: migrate to newer JDK, use records in repo layers)

ADR #4

Context

- Weak entity code handling. - Difficulty in maintaining current classes during functionality implementation.

Decision

- Lombok can only be used in the client view layer. - Services and repositories will utilize Java Records.

Clean architecture

Accepted -> In use

ADR #5

Context

- The app is growing. - Prevents tight coupling between layers for easier maintenance and testing. - Helps clean up layers.

Decision

Use ArchUnit to enforce clean architecture.

Bundle naming convention

Accepted -> In use

ADR #6

Context

Need to standardize bundle key conventions.

Decision

Use pattern like this: <module>.<feature>.<action> Example: `ui.patient.record.save-patient-button=someValue`

ResourceBundle as singleton

Accepted -> In use

ADR #7

Context

Dependency injection of bundle instances is inconvenient. The client always has one bundle pack for the current instance.

Decision

Utilize a static class to manage ResourceBundle instances. Wrap the ResourceBundle class functionality. This decision allows for easier access and management of ResourceBundle instances within the application.

Standardizing the Use of Mappers Between Layers

Accepted -> In use

ADR #8

Context

Need to standardize business object mapping.

Decision

Use three types of mappers: Client Side, Backend side for ServiceLayer <-> Domain, and Domain <-> PersistenceLayer.

Client Exception Handling

Accepted -> In progress

ADR #9

Context

Need some guidelines for UI exception handling.

Decision

Standardize UI error handling for client exceptions to ensure consistency and improve the predictability of exception handling across the application.