Decoupled Service Output
A couple of times earlier I discussed the use of Data Transformers as a way to accommodate disparate client types with the specific data type they require. That approach uses Transformers to produce the data in a specific type that implements an abstract interface that all related types share. Again, from the client’s perspective it might look like this:
TenantData tenantData = tenantIdentityService.provisionTenant( ..., myTenantDataTransformer); TenantPresentationModel tenantPresentationModel = new TenantPresentationModel(tenantData.value());
The Application Services are designed as an API, with input and output. The reason for passing in a Data Transformer is to produce ...
Get Implementing Domain-Driven Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.