public class MyFatDomainService
{
public void CreateMyThing(CreateMyThingCommand createMyThingCommand)
{
/*Stuff*/
}
public void UpdateMyThingForFoo(FooCommand fooHappened)
{
/*Other Stuff*/
}
public void UpdateMyThingForBar(BarCommand barHappened)
{
/*Other Stuff*/
}
/*Loads more of these*/
}
The service signature looks more than a repository, we have these CRUD methods with the "create" and "update" prefix.
Is this a domain service? I don't think so...
My suggestions is to step back and ask yourself whether you need all this "best practice"/layered architecture/DDD stuff when providing API methods like create, update and delete? Are you building the next excel like business tool creating and updating cells and rows while doing a couple of validations on the input object?
And in case you really identify a domain service give the methods some semantic names :)
Domain services are Windows Communication Foundation (WCF) services that encapsulate the business logic of a WCF RIA Services application. A domain service exposes a set of related operations in the form of a service layer. When you define a domain service, you specify the data operations that are permitted through the domain service.
ReplyDeleteRegister web Domain is a good and very cheap web hosting company in India. They provide affordable and reliable hosting services in India.indian web hosting companies
ReplyDeleteThanks for such a nice and updated information.Very long time i am searching this type of the information keep sharing more post,keep up your good work..Web hosting forum
ReplyDelete