ARTICLE AD BOX
My context
I have a large Java Spring-Boot project that have fitted in an hexagonal architecture. It is focused on cities and local authorities problematic, and study various subjects: cities, enterprises, accounting, taxes, employment, equipment.
The project is split in
1 domain project containing only POJO business objects
21 Inbounds modules : Rest, Web, Port
25 Outbounds modules : Spark, Postgis, Port
19 Application modules : Service, main Application, Port
At the end, my application is created from 73 maven dependencies.
Surely it's me who haven't done things well in some places, but there's a module inflation...
Willing to move to a Clean Architecture, I'm considering this:
For a given Java module of my project:
cities | |--- domain : model, repository (interfaces), usecases, services* | |--- infrastructure: |-------- Spark repository, spark dto, adapter |-------- Postgis repository, postgis entities, adapter | |--- presentation |-------- rest controller, dto |-------- web ui, controller, dtoand then the enterprises, accounting, taxes, employment, equipment.
(all these notions cannot be gathered under the same module. They are too vast, and they are focusing on very different things)
Is this the proper way of setting things?
About services*
In domain, I think I would implement some @Service classes, provided their methods are only made of interfaces calls and if/while logic.
So that, I would have some use cases about to work with theses services and repository interfaces.
The hexagonal project can be seen here, but my subject is general.
