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.

Jeffrey Palermo proposed the Onion Arcitecture. It is similar to Alistair Cockburn's Hexagonal Architecture or Ports and Adapters.

The fundamental motivation of the approach is to avoid layer-to-layer dependencies usually associated with the N-tier architecture approach. This is achieved by placing all infrastructure, including databases, outside the problem domain.

According to Jeffrey Palermo:

The overall philosophy of the Onion Architecture is to keep your business logic and model in the middle (Core) of your application and push your dependencies as far outward as possible.

The problem domain is then completely independent of the required infrastructure (testing, databases, security, etc.). For example, this means that testing database accesses can be done thoroughly without a real database.

291 questions
-1
votes
1 answer

How to save data in related tables in many-to-many in .NET Core when the entities are protected and properties are private set in onion architecture?

I have the following entities: LawFAQ entity: namespace HW_R2.Domain.LawFAQAgg { public class LawFAQ { public int Id { get; private set; } public string Question { get; private set; } public string…
neda
  • 1
  • 1
-1
votes
2 answers

Onion architecture: Services should be in core or infrastructure ? Why?

I write a web application in ASP.NET Core. I have three layers: core, infrastructure and web. In the core, I have domain models. In Infrastructure, I have Service and interfaces to them. Should Service be in the core, if not why and if they should…
-1
votes
2 answers

Should I unit test a simple update app service?

Should I be unit testing an app service as simple as the one shown below? public void Update(UserAccountViewModel viewModel) { var instance = Mapper.Map(viewModel); …
Marc
  • 924
  • 1
  • 8
  • 18
-3
votes
1 answer

pure Domain Driven Design in PHP project

In "PHP World" there is a weird feeling about infrastructure layer in any DDD application (example) what I could found. I see many examples, when developers using Doctrine2 in infrastructure layer, use Domain entities (from Domain layer) as…
user1016265
  • 2,307
  • 3
  • 32
  • 49
-3
votes
2 answers

Understanding Onion Architeture

I am trying to grasp the important concepts of Onion Architecture and had a question I was asking myself after reading an article. Look at the Domain in the architecture showed in this image:…
Alex808
  • 109
  • 9
1 2 3
19
20