The connection and function of controller, service layer, dao layer and logics layer in web framework.

has not quite understood the concepts of controller, service layer, dao layer and logic layer, and how to use them and why to use them in this way

Feb.28,2021

tell me the distribution of individuals currently in use

Controller: accepts Web requests, distributes and invokes different logic or services to complete a task, returns data
service: does some service Api interface related code
dao: deals with database (adds, deletes and modifies tables)
logic: 's own business logic

PC
  1:,controller,controler,
  2:,Controllercontollersql,,,,Controller,,,,dao
  3:,,,,PC->->,logic(logicdao),RegisterLogic,,, new RegisterLogic()->register();
  4:,,,,,,,service
  
Menu