Ports are not abstracting adaptors
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
- Type d'issue
- Refactorisation
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- javascript, node.js
- Domaine
- backend, backend-api-design
Piste de recherche
Commencez par ports/Repository.js à la ligne 6, référencé dans l’issue, et retracez comment son contrat est couplé au schéma DynamoDB. Utilisez la discussion de l’issue sur le contrat d’entrée/sortie pour évaluer la frontière entre la logique métier et les adaptateurs ; le travail est terminé lorsque les changements de schéma des adaptateurs ne nécessitent plus de changements correspondants dans le domaine.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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).
- Langage dominant
- JavaScript
- Étoiles
- 159
- Forks
- 27
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
Add: EUROTV NEWSOuvertechannels:add check:passed
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
curriculum documentation quality
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
githubnext/gh-aw-workshop#4638 ·
Les mainteneurs répondent en général sous 1 jour
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
openclaw/openclaw-enterprise#2571 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour