Featured post
dns - Consuming external webservices in domain driven design -
i want consume external third party web services in domain driven design project, not able understand in layer should access external web services. in domain services don't think , because domain services domain objects only. requirements that, have perform list of operation based on input external webservice , have perform task in domain service. confused.
what do, introduce interface required service in terms of domain model in domain project. every time class in domain needs service, pass reference implementation of interface.
then create "connector implementation" implements interface , connects webservice required use. when start application, provide domain classes implementation, instance using dependency injection framework.
this connector has reference domain model , web service definition. domain model has no reference connector implementation or webservice - knows of interface defined in domain project. called inversion of control.
this way, domain classes know nothing web service, interface defined in domain model. domain logic stays separated 'evil' outside world.
- Get link
- X
- Other Apps
Comments
Post a Comment