Ports are not abstracting adaptors
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
調査の方向性
issue でリンクされている 6 行目の ports/Repository.js から始め、その契約が DynamoDB スキーマとどのように結合しているかを追跡してください。issue の input/output 契約に関する議論を使って、ドメインロジックとアダプターの境界を評価してください。完了の条件は、アダプターのスキーマ変更に対応するドメインの変更が不要になることです。
索引モデルが issue の本文から書いたものです。
説明
I used internally this sample for training with my team, and they got confused by the responsibility of ports. They struggled to understand the abstraction and to translate it to typescript. This issue is an attempt to make things more clear for developers new to hexagonal architecture.
I believe ports should enforce a contract between Domain logic and Adaptors, and protect changes to happen on domain logic when the implementation details present in Adaptors change.
Here the port is not only enforcing the contract but tied to the adaptor on itself.
for example, the Repository port is tied to the implementation of a DynamoDB table with a defined schema.
If we happen to change the database schema (changing key names, moving to a single table design, etc..), the port is not protecting the Domain logic from the implementation detail in the Adaptor. Moving to a single table design will imply changing Adaptor/ports and domain logic.
If we were in a typed language, the port would be represented by an Interface, that defines the contract (Input/Output), and the adaptor would implement this interface (the contract).
- 主要言語
- JavaScript
- スター
- 159
- フォーク
- 27
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
Add: EUROTV NEWSオープンchannels:add check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
curriculum documentation quality
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
githubnext/gh-aw-workshop#4638 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
openclaw/openclaw-enterprise#2571 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fabriziosalmi/certmate#1247 ·
メンテナーはふだん 1 日以内に返信
-
[guide] docs/metrics/index.md names retired 'Import reference architectures' workflow as the metrics refresh path対応中かも @hivecommons-hive が今日担当しました。 オープンagent/guide documentation hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
cncf/endusers#1537 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信