-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref #7
- Loading branch information
Showing
1 changed file
with
21 additions
and
5 deletions.
There are no files selected for viewing
26 changes: 21 additions & 5 deletions
26
...app-architecture/client-side-rendering/server-side-function/application-core.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
# サーバーサイド機能解説 - アプリケーションコア層 | ||
|
||
アプリケーションコア層で実装する機能の詳細を示します。 | ||
アプリケーションコアではドメインモデルと業務処理を実装します。 | ||
|
||
- 機能や実現方法の概要、重要なカスタマイズポイントを示す。 | ||
- 手順までは落とさない。開発に必須な作業やカスタマイズは開発手順書でフォローする。 | ||
## ドメインモデル | ||
|
||
## Bean Validation | ||
ドメインモデルの構成要素であるエンティティと値オブジェクトは、それぞれが持つ属性が最大の関心ごとになります。 | ||
Lombok と Bean Validation を使うことで、Immutable などの特性に関わる実装や属性の制約の実装を最小化して、 | ||
関心ごとの中心である属性の見通しをよくします。 | ||
属性の制約について、Lombok と Bean Validation を使うことでより複雑になってしまう場合、 | ||
コンストラクタや Setter 内で個別に入力チェックを実装します。 | ||
いずれにしても、ドメインモデルの属性の制約については漏れなく実装します。 | ||
|
||
- Bean Validation についての解説。 | ||
- Bean Validationを用いて、ドメインモデルが持つ制約を実装する。 | ||
### Lombok | ||
|
||
エンティティと値オブジェクトについては、Lombok のアノテーションを使って Immutable などの制約や getter/setter などの機能を実現します。 | ||
|
||
### Bean Validation | ||
|
||
エンティティと値オブジェクトについては、Bean Validation または Lombok を用い、宣言的にプロパティの制約を実現します。 | ||
|
||
## 業務処理 | ||
|
||
ドメインモデル以外で業務処理を実現するために実装する、ドメインサービス、アプリケーションサービス、リポジトリ ( インターフェース ) については、 | ||
アーキテクチャ概要に記載した役割に従います。 | ||
いずれの実装も依存関係逆転の法則に従いインフラストラクチャ層に依存しないこと、役割定義に従い外部リソースに直接アクセスしないことに注意してください。 |