Skip to main content

Questions tagged [onion-architecture]

The *Onion Architecture* is a software architecture proposed by Jeffrey Palermo. It is similar to the *Hexagonal Architecture* (Ports and Adapters) proposed by Alistair Cockburn.

5 votes
4 answers
950 views

I'm reading and playing a bit with Onion on a mock side project and things got a little desperate with all the objects and the mappings. Consider this Diagram of a request and the various ...
laegirl's user avatar
  • 189
3 votes
2 answers
267 views

Below is an example scenario that can be used to illustrate your answer. Let's say there is a CoffeeMachine aggregate with a set of methods similar to the following: Methods used by admins. ...
EMN's user avatar
  • 805
1 vote
3 answers
1k views

Repository interfaces are often defined in the Domain layer. This makes sense for command handlers, which call repository methods and return nothing. But what about query handlers that call repository ...
MrChudz's user avatar
  • 157
1 vote
2 answers
277 views

A polymorphic association table is a database design pattern that allows a single table to associate with multiple other tables, where the related tables can be of different types. Scenario: Multiple ...
EMN's user avatar
  • 805
2 votes
2 answers
560 views

I'm working with a layered architecture and I'm unsure where to place the pagination logic. This answer suggests that it's not a domain concern, which I think makes sense. In most cases, pagination ...
Hadi Satrio's user avatar
2 votes
1 answer
173 views

Should our api-response-to-domain-entity transform functions be in the API/Infrastructure layer, or the Domain layer? We have a react-native mobile application written in TypeScript. We have separated ...
Nick's user avatar
  • 29
1 vote
1 answer
578 views

We have a .net core app with the following folder / onion structure: WidgetApp -> Core -> Application -> JobAutoStarter -> JobAutoStarter.cs WidgetApp -> Core -> Domain -> ...
dot's user avatar
  • 591
1 vote
2 answers
884 views

Hobby coder here, so please be gentle! My coding is taking me into the necessary realms of architecture due to increasingly complex apps. I'm wondering how to structure my solutions which will involve ...
stigzler's user avatar
  • 129
1 vote
1 answer
220 views

How can I do conditional mapping in Domain Driven Design? Let's say my application is structured like this: - Core - Domain - Application - Presentation - DTOs - API I have an aggregate root ...
J.Kirk.'s user avatar
  • 121
2 votes
3 answers
562 views

I have a form. It contains things like grids. Users do things with these grids and what they do with them is sent to a SQL server. Clearly, the server is a volatile dependency and should be dependency ...
J. Mini's user avatar
  • 1,025
1 vote
1 answer
236 views

We have an application that fetches user data from an Azure tenant via MS Graph. We need to distinguish between guests and regular members. Guests come back with Usernames that look like this: ...
dot's user avatar
  • 591
2 votes
3 answers
857 views

Why does the infrastructure layer depend on the application layer, and the application layer depend on the domain layer in the onion architecture ? In its definition, the dependency flow inwards. But ...
EEAH's user avatar
  • 174
2 votes
1 answer
2k views

Umbrella Question In an onion architecture, where do all the components needed to consume an external API fit in? The following is the architecture I have so far, based off an example found here: ...
dot's user avatar
  • 591
1 vote
2 answers
434 views

I’m using a hexagonal/clean/ports-and-adapter architecture. For the sake of simplicity, I’ll only talk about domain and infrastructure here, where the infrastructure has dependencies on the domain but ...
Mirco's user avatar
  • 671
2 votes
2 answers
796 views

I am trying to understand layered architectures and apply some DDD fundamentals to improve my architecture. I am finding that determining "what" an application service actually is, what its ...
Patrick Christie's user avatar

15 30 50 per page
1
2 3 4 5 6