RE: [domaindrivendesign] Re: Can we unite application layer and domain services?
What you have said here is almost consistent with the prior art (of which there is an appreciable amount), but not quite perfectly consistent.
You expose the application to the world through application services. Not only can you build many applications that use the same domain model, you can also build many interfaces to the same application, which is what I would regard your example to demonstrate.
Here are some links to previous discussions of this topic in this group:
Like you, I also have to respectfully disagree with Richard’s assertion, though I very much appreciate his intellect and postings here and work on Naked Objects. The best litmus test for a “true” DDD system that I know of is Eric’s statement on p.75 that DDD requires only a domain layer (in a layered architecture), implementing a domain model. By that test, what layers (if any) exist above and below the domain layer is not material to a system’s qualification as a DDD system. I interpret that in a Naked DDD system, there must be no application construct.
However I have found applications to be incredibly important things. After all, we don’t set out to build domain models in isolation. Rather, we are commissioned to build applications, and applications include more than domain models. As Eric says, “there is no meaning of ‘file formats’ in the domain of banking, and there are no business rules involved” (p.107). That is why application services, forming a Service Layer, defining an Application Boundary, are important. And note that UI Controllers are outside this boundary layer, acting as clients of the application services. The layer containing UI Controllers (in the Jacobsonian sense, see http://c2.com/cgi/wiki?WhatsaControllerAnyway) has historically been called the “Application Layer”, which has become confusing since some of its responsibilities moved to the layer of application services with the advent of three-tier architecture (as I tried to describe on http://c2.com/cgi/wiki?FourLayerArchitectureDiscussion), so it might be better to call it the Controller layer now (as much as it galls me as an old Smalltalker to give in to the Jacobsonion connotation of Controller).
- Application layer is an Evans term, Service layer is a Folwer term.
Domain layer is Evans's term for Fowler's Model layer.
--- In email@example.com, "david_torontonian"
> Application layer and Service Layer are the same; just two different