C
C#2y ago
linqisnice

❔ What architecture is recommended for a new (to be enterprise) project?

I've decided to opt for a monolith. What I see most commonly around here is vertical slice, clean and n-tier with regards to specific architectures. Which one do you recommend me if I were to build a site similar to booking.com? The reason I'm asking is, at first I thought clean was a no-brainer, but it seems to be highly opinionated and many claim it over-complicates things and that the popular templates out there (ardalis and taylor(?)) are riddled with redundant abstractions.
12 Replies
Anton
Anton2y ago
yes, clean architecture is horizontal slicing and concern separation, so like database access is a separate project from usage, and all the models go into the models folder, all the controllers go into the controllers folder, etc, which makes finding code responsible for the same feature difficult. but separating everything into clearly defined layers is its whole idea. you can also separate by feature, or vertical architecture it's good if there are many features to the app I guess
linqisnice
linqisniceOP2y ago
aren't n-tier / three layer and clean very similar? i always see core, web and infrastructure. sometimes domain too but its often baked into core (bll). What is the difference?
Omnissiah
Omnissiah2y ago
domain == infrastructure i would go for feature isolation but only if you are sure it will develop and it's not a sample, and if you got time to do it
David_F
David_F2y ago
The main point of hexagonal architecture with ports and adapters (what Ardalis package does) is that domain is not infrastructure and it's totally separated https://netflixtechblog.com/ready-for-changes-with-hexagonal-architecture-b315ec967749
Medium
Ready for changes with Hexagonal Architecture
A story on how we leveraged Hexagonal Architecture principles to be prepared for changes in the Netflix Studio ecosystem.
David_F
David_F2y ago
When your project scales beyond yourself and you have other people working with you then these abstractions you mentioned are not redundant. They improve code maintenance, testability, consistency etc.
linqisnice
linqisniceOP2y ago
@David_F I see. What about repo pattern over ef? Redundancy?
Omnissiah
Omnissiah2y ago
if (this.finalVersion == true) { } i'll look into it
Saber
Saber2y ago
Look at vertical slices
sunnyp410
sunnyp4102y ago
Clean Architecture with DDD/CQRS principles.
linqisnice
linqisniceOP2y ago
My worry weth vertical slice is, as the project grows and has a lot of business logic, won't it turn into a big mess?
sunnyp410
sunnyp4102y ago
If the project grows, you may want to think about splitting logic into another service or having some sort of common lib that takes in common functionality.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server