I'm new to DDD (Domain Driven Design). In a traditional project I would generally make a persistence, business, and user interface layer. Now with aspnetboilerplate there is a core, application services, entityframework, and ui layer. My understanding is that the domain (core) layer is where my main business logic should be. What I'm trying to do is create a blackjack game using this architecture so that I can create a mobile and web app for it in the future. What I'm having a hard time figuring out where my methods dealing with dealer, cards, scoring etc, should be. My gut tells me it should be in the domain layer but I know that the application services layer is the intermediary between domain and presentation. The application services layer deals with Data Transfer Objects and what not. So What I'm trying to get at here is if my methods for how the game works should be in the domain layer or in the application services layer?
3 Answers
The domain (core) layer is the correct place for your business logic. The application layer should be used for validation of the data transfer objects (DTOs) before passing data to the domain layer.

- 4,115
- 1
- 29
- 49
I am also had the same problems when I started using this framework. If you are trying to create a mobile and a web app, I recommend that you use the Application Layer(Service Layer) from Abp. Almost validations and exceptions are handled for you by the framework if you derive your DTOs from Abp's DTOs. The nice thing about the service layer form Abp is that it generates the Js Proxies to call these methods.
In the future, if you are trying to create a mobile App, you can just use the application layer from Abp template with Asp.NET Web Api. They will almost be a one to one map from your service layer to your Web Api.

- 45
- 1
- 3
- 9
To have a clear ideas about DDD please read the following article Onion Architecture
It helped me a lot also stick to the documentation and have a look at
It uses aspnet boilerplate

- 112
- 4