1

I'm here for some advice about how to manage the situation where I have a legacy application running locally on an onpremise server with it's own database and I'm about to add an online shop app to it. I have created a new domain model for the context and added an anti corruption layer (ACL) to convert the data. This ACL will reside in a windows service that communicates via queues with the main online shop app to keep the data in sync and register the successful transactions into the legacy db.

so the whole can be schematized like that:

LegacyApp <- ACL <- WinService <-queue-> CloudApp

  1. Could it be right to consider the windows service and the cloud app as parts of the same bounded context, or should each be represented by it's own bounded context ?
  2. If so, having the domain model shared, the communication over the queue should in your opinion be based on DTO's or directly serializing the aggregates?

Thanks

Doc Brown
219k35 gold badges405 silver badges619 bronze badges
asked Feb 5, 2023 at 17:33
2
  • 1
    I hate ambiguous abbreviations. ACL in the Domain Driven Design context means Anti-Corruption Layer. Commented Feb 5, 2023 at 21:24
  • My fault... I should have specified better. Yes I mean an anti corruption layer Commented Feb 6, 2023 at 10:05

1 Answer 1

2

When the Windows service is developed together with the online shop app by the same team, maybe with a similar programming ecosystem, it is probably more sensible to see them as one application system and model them as parts of the same bounded context.

The situation would be different if there are two independend teams, which see those two components as decoupled applications. Maybe the Windows service is so complex it requires another team for this job. Maybe the online shop app is a 3rd part component which was already created by someone else and now is just tailored fot this specific scenario. That would be a reason to use two bounded contexts.

The answer to your second question is quite similar: when you know for sure both parts are developed by one team using the same programming ecosystem, with a similar serialization mechanism available at both ends, serializing and deserializing directly makes sense and can save you some effort. Otherwise, using a more technology agonostic mechanism like DTOs would probably make sense.

answered Feb 5, 2023 at 20:08
1
  • Thanks, exactly what I thought. As both projects are developed by the same team I think we'll go with the single boundend context, directly serializing the domain entities. Commented Feb 6, 2023 at 10:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.