300 questions
Best practices
0 votes
1 replies
65 views
Hexagonal vs Clean vs Onion Architecture — Which Is Truly the Most Solid?
In your experience, which software architecture can be considered the most solid and future-proof for modern systems? Many developers highlight Hexagonal Architecture for its modularity and decoupling,...
Best practices
0 votes
2 replies
58 views
Hexagonal Architecture: How to orchestrate complex business workflows?
Problem Statement I'm implementing a complex business workflow using Hexagonal Architecture (Ports and Adapters), but I'm struggling with how to properly orchestrate. Business Workflow Requirements ...
0 votes
1 answer
53 views
How to make a transactional Services when developing a backend with Onion or similar architectures?
I'm developing a backend where controllers call services, and each service is responsible for handling an entity(table) in SQL. Now, what if I want to use a transaction, basically roll back previous ...
0 votes
0 answers
28 views
How to share images between admin and frontend projects in ASP.NET MVC using a shared folder?
I am working on an e-commerce application where I have two separate ASP.NET MVC projects: AdminPanel: used by admins to manage items Website: public-facing site for users to view items Both projects ...
0 votes
0 answers
96 views
How to pass current user information to infrastructure layer in DDD and Onion Architecture?
I am implementing DDD and Onion Architecture in a solution is based on .NET Framework and I will be using Autofac for dependency injection. The entities tracked with Entity Framework all need audit ...
0 votes
1 answer
75 views
What is the correct way to mapped data received from API to domain entity within DDD conception?
I'm diving into the topic of pure architecture and DDD. I can't understand how to properly map data received from API and into the domain entity. create just a DataMapper class with static methods: ...
0 votes
1 answer
72 views
Bloated dependencies in Application layer
In case of Clean/Onion Architecture what would be the best solution for services in Application layer with bloated dependencies? For example if I have service with dependencies that I don't use in ...
0 votes
1 answer
212 views
What belongs in the applicationService package to properly test the onion architecture with ArchUnit?
I am currently in the process of implementing a simple hexagonal architecture. I have followed the DDD principle and placed the DomainModels alongside the DomainServices in a domain-package. In ...
-1 votes
1 answer
523 views
Where should I place email notifications - in Infrastructure Layer or Application layer? [closed]
I am learning the onion architecture and currently in the process of developing backend service, which follows this architecture. One of functionalities I want to include in my application is to send ...
0 votes
1 answer
229 views
Can a layer method call another method on the same layer in an onion architecture? [closed]
Don't seem to find a good explanation for this. Is it a bad practice to have e.g. a method on one layer call another method on the same layer?
0 votes
1 answer
1k views
How to work with many to many relationships in ASP.NET Core MVC web app
I am creating a restaurant app, I have the entity Dish and the entity Ingredients, both of which should be related so that I can know what ingredients I have in each dish, my idea was to make a joined ...
-2 votes
1 answer
151 views
How to correctly establish the type argument to CancellationToken in Net Core?
I'm developing a clean Architecture's services on Net Core. However when I refactor the methods, it return me the error cs0411. more specifically in the 'GetSubjectById' method when the Cancellation ...
1 vote
2 answers
820 views
Why does this ArchUnit test fail?
I have a demo project which tries to respect strictly clean/onion/hexagonal architecture. Here is how I configure ArchUnit test : @AnalyzeClasses(packages ="fr.tristan.demoassurance", ...
2 votes
2 answers
320 views
What problem of Layer Architecture really solve Onion Architecture?
I have read several articles about onion architecture and they all point to the fact that the problem of layer architecture is that changes in the database would impact the services layer, but, why ...
0 votes
0 answers
234 views
Decoupling Identity from Data layer in Onion Architecture in Dotnet Core
I have an IdentityDbContext in my data layer but I can't use and packages form Microsoft.AspNetCore. I need to decouple it form the data layer so I can reuse the database context without Identity in a ...