Purpose of the service layer

后端 未结 3 918
有刺的猬
有刺的猬 2021-01-31 05:20

Am I correct in thinking that the purpose of a service layer includes the following?

  • thinning out of domain models (i.e. movement of certain functions like in cach
3条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 06:25

    Service Layer as the name suggests provides services that are not directly responsibility of any other domain object.

    Service Layer also helps in decoupling of responsibilities. Service Layer forms the middle part between Database/persistence layer and the Client/UI/Web layer.

    Properly designing the Service Layer allows it to be used from any client be it a Web Client or a Web Service (SOA) or Mobile device.

提交回复
热议问题