Quantcast
Channel: patterns & practices: Project Silk
Viewing all articles
Browse latest Browse all 93

New Post: Models in different layers

$
0
0
DCherubini wrote:
Hi,

The documentation describes the handlers in the domain project as " a set of classes that implement the core behavior of the application ," where each handler is in charge of performing only one specific action. The controllers in the application delegate the logic of interacting with the domain layer to those handlers. Based on my understanding, the difference with the services is that they seem to be used only to obtain information from the domain without modifying it.
They have handlers that actually modifying domain, e.g. AddFillupToVehicle, CreateVehicle and DeleteVehicle etc.
But I see that one handler never executes any other handler, so they are really independent from each other.
So it looks like that it will be better to move business logic to Services, e.g. UserServices when one handler should execute another one. For example I see that in UserServices they have method GetOrCreateUser which uses GetUserByClaimedIdentifier or CreateUser methods from UserServices.

That's how I see it. Thoughts?
Thanks!

Viewing all articles
Browse latest Browse all 93

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>