Questions tagged [onion-architecture]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
32 views

Define input and output interfaces for each application layer

I want to create a multi-layered backend architecture with a REST layer and GraphQL layer later on. So let's say you would start with the basic layers controller, service, repository would it make ...
4
votes
3answers
87 views

Where to convert primitive types in meaningful types in Clean Architecture / Onion Architecture

The book "Implementing Domain Driven Design" (page 361) suggests to use special types to distinguish several kinds of IDs, e. g. using BookId(1) instead of just 1 of type Int or Long. In my Clean ...
4
votes
1answer
39 views

Error handling in Nest service layer

I would like to create a REST API with NestJs. But I want to add GraphQL as another top level layer later on. So for the start I have the basic layers controller, service and TypeORM repository. Let's ...
3
votes
1answer
201 views

Avoiding Repository pattern - implementing Onion Architecture with DbContext only

I am trying to follow the Onion Architecture to design my application where I have the following layers - Domain Layer: is the inner-most layer and defines repository interfaces Infrastructure ...
0
votes
0answers
63 views

Instantiating adapters in onion architecture

GitHub and NuGet Do you use connection strings to instantiate your adapter services or just always configure it through IoC? I think that connection strings could provide a way more flexibility, ...
3
votes
0answers
278 views

Onion Architecture: Should Service Layer contain DB Context?

In Onion Architecture, we have repository layer which conducts Crud Operations (simple insert, delete, update). (Applying Entity Framework with database) Onion Architecture Additionally , we have ...
2
votes
1answer
281 views

FP Free Monad vs OOP Dependency Injection

I've written my first moderately large project in functional style (in F#) and can see the advantages. The main challenge was to achieve the "Onion" architecture i.e. large and "smart" pure core / ...
1
vote
1answer
185 views

Data entities in Onion Architecture

I'm trying to build a project using onion architecture (just a "Northwind"ish type app to get more up to speed with .NET Core). I also want to get a better grasp on Onion Architecture principals. I ...
2
votes
2answers
2k views

What are application and domain services in onion architecture?

Onion architecture has a core which is composed by domain model, domain services and application services: I'm in doubt about those two service layers, domain services and application services. I've ...
2
votes
1answer
2k views

C# .Net Core API design - interfaces vs DTOs

I'm designing a relatively simple web application using .net core. I've mostly done desktop development in my career so far, so I'm a bit new to the nuances between desktop and web development. In ...
1
vote
1answer
165 views

Domain Use Case

In my understanding of Uncle's Bob Clean Architecture, a Use Case (Interactor) is responsible for orchestrating the Entities. At the same time, it represents Application-specific rules. The business ...
0
votes
1answer
186 views

Onion Architecture - Multiple Apps

Onion Architecture talks about separating the UI, Service, and Data Layers. All the samples usually given for this involve a single deployment model of the application. For example in .net most of the ...
0
votes
1answer
245 views

Am I breaking some Onion Architecture rule?

Based on the project structure below i will have some questions Domain Layer 1) MyApp.Domain.Entities (DLL) Product.cs PagedResult.cs Referentes No References 2) MyApp.Domain.Interfaces (DLL) ...
2
votes
1answer
544 views

Use case interactions in clean architecture

I'm experimenting with Clean Architecture for my turn-based strategy game project. I have use cases that form hierarchies and need to be coordinated with each other. I would like some advice on how to ...
0
votes
1answer
768 views

Onion architecture applied to an .NET application

I am trying to figure out how to translate the onion architecture into an ASP.NET Core WebAPI solution, this is what I ended up with: Let's say I have an application that takes a file path / uri into ...
1
vote
2answers
74 views

Structural problem related to Dependecy Injection and Asynchronous Operations

I'm implementing the onion architecture with webapi, service layer, repository, unit of work and the domain classes. I use also DI, using simple injector. But my issue, is how can I implement a ...
1
vote
1answer
287 views

Onion Architecture, Project Architecting and Authentication

I am learning ASP.NET MVC & Web API and trying to implement Onion Architecture with Repository Pattern for one of my Test projects as part of my learning. I have developed single MVC Projects ...
3
votes
1answer
1k views

Reusing business logic layer in multiple applications

I have seen some people asking about sharing business logic with more than one application, and answers generally discuss putting it in a class library. I'm fine with that, but usually the examples ...
0
votes
0answers
264 views

Clarification on the Onion architecture's Domain Service and Application Service

I am studying Onion Architeture but i got some doubts: All the samples (github) I found over internet are too simple, or are implemented under DDD (which I have not studied at the moment) so I can ...
7
votes
2answers
3k views

What data should a repository return

I have a simple project where the controller calls the service, and the service calls the repository in order to get the needed data. Assuming that we have these domain models: // this model has a ...
3
votes
2answers
587 views

Application service - part of Bounded Context?

I am having a hard time understanding where the Application Services fit in with DDD and Onion architecture. Up until a few days ago I thought of them as part of domain model, but I began to question ...
3
votes
3answers
3k views

Onion architecture: layer placement of business logic

Where should the business logic for a project that utilizes Onion Architecture be placed? In my case, it's a C#-based project, utilizing Web API and possibly a MVC UI for the presentation. But ...
2
votes
1answer
367 views

Can one app have several “subdomains” in DDD?

General Context I started reading about layer based architectures like DDD, Onion, Clean Architecture etc. I am considering switching, but am currently unclear about how strict the "first level ...
3
votes
0answers
120 views

Should I pass presenter to use case when implement clean archeiture using scala

This question came to me when I was trying implement Clean Architecture using Scala, and come across this post. In the accepted answer, @candiedorange emphasis on the separation of responsibility, ...
2
votes
1answer
946 views

Is there really such a thing as the onion architecture?

Note: BLL = Business Logic Layer (can also mean your domain) I'm trying to understand the onion architecture. It seems to me that it's actually the same thing as the layered architecture, only with ...
2
votes
2answers
214 views

Does a framework like the Spring Framework fall under the Data Centric Architecture?

With all the talk of Microservices with Domain Driven Design, I have been looking at two architectures, the Database-Centric Architecture and the Domain-Centric Architecture (Not to be confused with ...
2
votes
1answer
188 views

How to realize “Tell, don't ask” in an Onion-Architecture for data analysis

I am currently thinking about how I would implement a software I did write some years ago with a Clean-/Hexagonal-/Onion-Architecture. This shall not be a "Grand Redesign from Heaven", since I'm not ...
1
vote
0answers
432 views

Putting UnitofWork handler in the Request Model for DDD with Clean architecture?

I'm rearchitecting a system in Python, using SQLAlchemy for the data mapping layer, and the Zope Component Architecture for dependency injection and interface declaration. I am in the process of ...
4
votes
1answer
1k views

Where should I place configuration classes in Onion Architecture

We are redesigning one of our API projects from an n-layered architecture into onion architecture. In the previous design, we had configuration classes in a common library project being referenced ...
7
votes
2answers
11k views

How to structure an Onion project

Here is an example implementation using Onion architecture: https://www.codeproject.com/Articles/1028481/Understanding-Onion-Architecture The webpage suggests a solution structure of: Domain - ...
1
vote
2answers
381 views

Domain Interface references NHibernate?

Please see the question here, which I asked yesterday: Domain Driven Design in an Onion Architecture As stated I understand that DDD is an approach that targets the domain layer only and Onion is an ...
1
vote
3answers
2k views

Domain Driven Design in an Onion Architecture

I recently asked this question: Should the domain layer be dependent on NHibernate? I have read a lot of questions today, where answerers state that the Domain Layer should only contain Business ...
0
votes
1answer
118 views

Should Active Directory access respect my software architecture?

I have a solution with an onion architecture using an asp.net MVC project. I also access Active Directory, and was wondering if one needs to loosely couple Active Directory access? Say I have : ...
48
votes
6answers
27k views

Clean Architecture: Use case containing the presenter or returning data?

The Clean Architecture suggests to let a use case interactor call the actual implementation of the presenter (which is injected, following the DIP) to handle the response/display. However, I see ...
2
votes
2answers
8k views

How to structure a Domain Driven Design in an Onion Architecture?

I am studying Domain Driven Design and was introduced to the concept of Onion Architecture, which uses the terms of Core, Domain, API, and Infrastructure. I am from Java background and am familiar ...
0
votes
1answer
314 views

What should I consider when moving a project using Entity Framework 6 from SQL Server to MySQL or PostgreSQL? [closed]

First, I need to confess this question come mostly from the still expensive licensing model used by Microsoft for SQL Server Standard. Also because Web edition is now only available through Web ...
3
votes
2answers
1k views

Architecture: How to pass models between controllers, services and repositories

I'm trying to build an architecture where I have a Domain project with all my domain models, an Infrastructure project with my Services and Infrastructure.Entity with my Repositories and entities. ...
11
votes
1answer
7k views

Onion architecture vs 3 layered architecture

I see only benefits to the onion architecture over the 3 layered architecture where the BL had responsibility to call methods on DAL (or an interface of DAL) to do CRUD. The onion has better ...
3
votes
2answers
830 views

Onion architecture design question

I recently started working on a new project where the team was considering use onion architecture, which I was not very familiar with, so I started reading about it. The application is a simple 3D ...
8
votes
2answers
2k views

Where should you validate the state of “other” aggregates?

Scenario: A customer places an order, then, after receiving the product, provides feedback on the order process. Assume the following aggregate roots: Customer Order Feedback Here are the business ...
4
votes
2answers
2k views

why exposing service instead of repository in onion architecture

I'm digging on how to structure projects and so I stumble into Onion Architecture. As to how I understand it, its more on a domain-centered-focus architecture instead of a database-driven type. I'm ...
2
votes
1answer
696 views

Onion architecture and independence

Trying to understand onion architecture. As I understand it, there is different opinions about the names of the layers. In this post I refer to the layers as: infrastructure -> api -> domain -&...
2
votes
3answers
700 views

How to best encapsulate features in software design?

I like domain driven design, and onion design. However I would really like my features to be encapsulated. If i check out some legacy code and I need to investigate some specific feature the best ...
10
votes
4answers
2k views

Lookup Tables: Are they a leak in the domain model?

You are building a system that keeps track of Companies. Those companies have Contacts. Those contacts are often specialists that only answer certain types of questions, such as Billing/Payment, Sales,...