Ports are not abstracting adaptors
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
- Ambito
- backend, backend-api-design
Direzione di ricerca
Inizia da ports/Repository.js alla riga 6, collegato nell’issue, e traccia come il suo contratto è accoppiato allo schema DynamoDB. Usa la discussione dell’issue sul contratto di input/output per valutare il confine tra la logica di dominio e gli adattatori; il lavoro è completato quando le modifiche allo schema degli adattatori non richiedono più modifiche corrispondenti al dominio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- JavaScript
- Stelle
- 159
- Fork
- 27
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
[quality] Nothing keeps docs/skills/manifest.md in sync with docs/skills/*.mdForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
agent:blocked agent:ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
turbot/guardrails-fn#46 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
needs verification
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 6 giorni