Onion Architecture: Core vs Domain

I’m studying Theion Architecture now, I have analyzed several examples of VS-solutions and still can’t understand the difference between Coreand Domainin Onion Architecture.

  • In this, the Core solution (project) is located inside the domain (solutions folder).
  • There is no Core, only Domain
  • The Jeffrey Palermo CodeCampServer application has a domain inside the kernel. So basically it looks like it's Coremade from Domainand Services.
  • In this project, xDriven Core is divided into Core.ApplicationandCore.Domain

I am completely confused. Can you explain to me what the actual difference is between Coreand Domainin such an architecture?

For example, I have this class. A simple board game such as tick-to-spider. This is definitely the ubiquitous language, so should I create it in a folder Entitiesinside the domain? And the domain itself in Core?

public class Game
{
    public GameState State { get; set; }
    public Board Board { get; set; }
    public IEnumerable<Player> Players { get; set; }

    public bool Move(int playerId, int field)
    {
        //Check if Player move will finish game. If yes, return true
        return false;
    }
}
+4
source share
2 answers

In my opinion, as long as you follow the recommendations from Onion Architecture, the actual name of the projects is not so important. It’s more about structuring your project so that it’s easy to work with and about it.

It is important to have an independent object model in the center. And you create your application around this model.

I am completely confused. Can you explain to me what the actual difference between Core and Domain is in such an architecture?

Core -, . Post about Onion Architecture Application Core Domain Model, Domain Services Application Services. , Core. , Application Services.

, , , . , . , - , , , , Domain Entities .. , , () , , Onion Architecture

+6

Arkadiusz K, , Core , DDD- (/). , , .

- , . , , .

+1

Source: https://habr.com/ru/post/1609226/


All Articles