SOA (ish) architecture, where to put common code?

we have a soa-ish architecture that looks like this:

frontend            ->domain A ->db 
frontend->business A->domain B ->db
frontend            ->domain C ->db
frontend            ->domain A ->db 
frontend->business B->domain B ->db
frontend            ->domain C ->db

other app A
other app B

we also have other applications that are not part of this soa stack.

From time to time we have the following discussion / problem:

"I have code in domain A, which is also useful in domain B, but not in business services, where I have to put stuff with its tests."

let's say that the code is very abstract and domain agnostic, something very general, which can also be used by "other" applications outside of soa.

so the question is:

a) puts it in the "generic-domain-stuff" module, which the entire domain inherits through maven dependencies. It will probably grow and grow until it becomes a mess ...

b) "generic-stuff", "" . , , maven....

c) , , a) b). screems DRY ( )

10- , / :)

+4
1

(b) . /​​ , . (), , maven ( ). " ". . , . maven - , " ".

+2

Source: https://habr.com/ru/post/1544179/


All Articles