Domain services vs Application services

前端 未结 3 1428
不思量自难忘°
不思量自难忘° 2020-12-24 07:15

What is main difference between domain and application services? (I\'m using NHibernate)

Which layer would be better for business logic? What\'s best practice?

3条回答
  •  天涯浪人
    2020-12-24 08:01

    • Domain Services are services within the domain consisting of multiple classes which need to be reused.

    • Application Services are util classes where techical stuff is done such as compression or sms messaging.

    Please put your logic into domain objects not into services. Much better reuse in complex domains.

提交回复
热议问题