Let's say the "whole picture" of a business entity is like
{
id: "117ed0fd-2546-4775-8ab6-d7671694d410",
foo: 5,
bar: "something",
baz: [1.0, -4.3]
}
but for whatever reason we've decided that there should be a foo service
, bar service
and baz service
that own respective pieces of data in a way like
{
id: "117ed0fd-2546-4775-8ab6-d7671694d410",
foo: 5
}
{
id: "117ed0fd-2546-4775-8ab6-d7671694d410",
bar: "something"
}
{
id: "117ed0fd-2546-4775-8ab6-d7671694d410",
baz: [1.0, -4.304]
}
However, let's say what I notice about the system is that
- The data always need combined and some business logic applied to do anything meaningful. There are separate services whose entire job is to package the data from from the aforementioned services.
- The aforementioned services need to "understand" each other's data in order to do meaningful work with their own data. For example, the bar service can't just know that "foos are something with an identifier and other properties that I don't need to understand."
Would you say this is design smell?
Aucun commentaire:
Enregistrer un commentaire