-
Notifications
You must be signed in to change notification settings - Fork 67
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
💡 Discussion: Vertical Slice Architecture #413
Comments
Hello, @robertgr991 👋! First of all, thank you very much for opening this issue and contributing to this project. The truth is that I agree with you. I had been wanting to implement Vertical Slice Architecture in this project for some time, but due to lack of time, I never took the step. I believe that, together with DDD principles and a Hexagonal/Clean Architecture, you can create projects that scale very well and, most importantly, that are maintainable over time. Regarding the structure you propose, what do you think if we adapt it this way? 🤔 .
├── apps
│ ├── console
│ ├── graphql
│ ├── grpc
│ └── rest
├── modules
│ ├── module1
│ │ ├── application
│ │ ├── domain
│ │ └── infrastructure
│ └── module2
│ ├── application
│ ├── domain
│ └── infrastructure
└── shared
├── application
├── domain
└── infrastructure This type of division, paying attention to the Screaming Architecture, could indicate the following:
I would like to hear your opinion about this proposal. In this way we can reach a structure that is as appropriate as possible and that can fit a large majority of developers who have the same concerns as us. Thanks again 😉 |
Hello! Thank you for the detailed response! This step is an important one and it's better that you didn't proceed with it in a hurry. I agree with your proposal, here are my thoughts:
As a side note, this changes will steer the template a little bit away from it's initial objective of proposing a template for a REST API. |
Hello again, @robertgr991 !
This is my humble opinion. As I said in the previous comment, I am open to any other proposal. Thank you again. |
I think we should continue with the use case of implementing one Bounded Context as this is also easier to adopt. The means of communicating between Bounded Context can be different depending of the context and it's more difficult to create a boilerplate for it. Your arguments for keeping the Presentation logic decoupled from each module are good and I agree, in this case, as presentation layer is the least coupled with the other layers and the flexibility of removing/moving a specific system with relative ease, speaks for itself. This will also set the rule that it's not the responsibility of the module to present itself, so to speak. Keeping the As I recall, DDD doesn't have specific terminology for the Presentation Layer and different architectures use different terms, but, to be fair, I think I think, so far, this clarifies the direction in which the architecture should point to, unless others join the discussion. PS: What do you think about Architectural Decision Records? Should a boilerplate have an opinion on this matter? |
Hello again, @robertgr991 . Thank you very much for your reasoning and for giving your opinion regarding these issues. My opinion is the same as yours. As a summary, here are the basics we have established after adopting the use of
As a result, the target structure is as follows: .
├── modules
│ ├── module1
│ │ ├── application
│ │ ├── domain
│ │ └── infrastructure
│ └── module2
│ ├── application
│ ├── domain
│ └── infrastructure
├── presentation
│ ├── console
│ ├── graphql
│ ├── grpc
│ └── rest
└── shared
├── application
├── domain
└── infrastructure On the other hand, linking to the question that you asked in your previous comment, I would like to comment on the following:
PS: Sorry for opening so many topics, but this way we can discuss interesting questions and give our opinion to improve this template. Thank you very much for your time 🙏. |
Hello!
It's good to discuss these various topics as it sparks different ideas and also acts as a learning/recalling exercise. Footnotes |
Hello again!
PS: As new topics arise, for example, applying Thanks again! |
I should have worded it better. I was trying to say that in In the end, this is more of a personal preference, as both |
Hello again, I've been giving this matter some thought. My opinion regarding where the Integration Events should be captured is as follows:
Now, another topic occurs to me that is quite curious. And it is how you would implement
I would like to know your opinion on this 😊 |
Feature Request Checklist
main
branch of the repository.Overview
This is more of a discussion than a feature request.
What do you think about organizing the features using the architecture that is commonly known as "Vertical Slice architecture"?
The current structure is:
The proposed structure would organize every logic of a feature in a feature folder:
I think this will improve cohesion and reduce coupling by setting clear features boundaries. Each boundary can specify exactly what should be shared with other parts of the system. Having each logic of a feature in a feature root folder will also help when traversing the code and learning about what the feature has implemented.
References
Additional Info
No response
The text was updated successfully, but these errors were encountered: