Base solution for your next web application
Open Closed

Why Web of layers depends on the Core User, Role entities. #581


User avatar
0
heifengwll created

Hi I am learning. When I download ABP + module zero, I don't understand why Web of layers depends on the Core User, Role entities. Isn't it should build data transfer objects to register, log in? Dependent on application layer. May I ask why you want to do? Thanks


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    They are just used in AccountController for login, register etc. Current AccountController code is a mixed with web logic. We can stripe web logic and move login/register logic to an application service. If you say "why", I don't have a very good reason. Maybe this habit comes from standard MVC startup template :) Maybe I did not think that we can use the same register/login code from any other UI (like a mobile app). Anyway, we should think to move some of this code to app layer. Thanks for pointing this.

  • User Avatar
    0
    heifengwll created

    <cite>hikalkan: </cite> They are just used in AccountController for login, register etc. Current AccountController code is a mixed with web logic. We can stripe web logic and move login/register logic to an application service. If you say "why", I don't have a very good reason. Maybe this habit comes from standard MVC startup template :) Maybe I did not think that we can use the same register/login code from any other UI (like a mobile app). Anyway, we should think to move some of this code to app layer. Thanks for pointing this.

    Thank you for your answer. I have some ideas.This project named Boilerplate, I think this should be a standard specification, provides accurate realization of the project. But because the AccountController dependency undermines the idea of DDD, would be confusing for beginners. Anyway, I tend to firm use the DTO, I suggest it is best to ABP + module add a zero project, as you recommended the use of DDD, but here would damage the ddd. Thanks again for answer.