Dealing with Multiple, Disparate Clients
What will you do if your application must support multiple, disparate clients? This may include an RIA, a graphical thick client, REST-based services, and messaging too. You probably also consider various test drivers as being different client types. Discussed in more detail a bit later, you may design your Application Services to accept Data Transformer, where each client specifies the Data Transformer type. The Application Service would double-dispatch on the Data Transformer parameter, which would produce the required data format. Here’s how the user interface side might look for a REST-based client:
... CalendarWeekData calendarWeekData = calendarAppService .calendarWeek(date, ...
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.