Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shared classes among bounded context #261

Open
bertuz opened this issue Jun 2, 2021 · 1 comment
Open

shared classes among bounded context #261

bertuz opened this issue Jun 2, 2021 · 1 comment

Comments

@bertuz
Copy link
Contributor

bertuz commented Jun 2, 2021

ojo que en clases como ésta:

https://github.com/CodelyTV/php-ddd-example/blob/master/src/Backoffice/Courses/Application/Create/CreateBackofficeCourseOnCourseCreated.php

para que funcionen importando un evento de dominio que es de otro bounded context. Eso está permitido? Me chirría mucho.

namespace CodelyTv\Backoffice\Courses\Application\Create;

...

use CodelyTv\Mooc\Courses\Domain\CourseCreatedDomainEvent;
@oscmarb
Copy link

oscmarb commented Jun 11, 2021

La idea del monorepo es que la comunicación entre contextos se haga a través de DTOs (comandos, queries y eventos). En el caso de querer extraer un bounded context a otro proyecto sería necesario duplicar esos DTOs y cambiar las referencias. La alternativa es ir duplicando los comandos, queries y eventos, lo cual introduce bastante sobrecarga.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants