1

I am currently building the first of many different backend API's. They will to some extent share some common concepts (person information, court information, etc); although between them there are a lot of differences as well. For example, one will be for certain fines, others for speeding tickets, others more related to contracts.

I also built the first version of a tool to take care of the administration of these. The administration happens on the database used by the project, not on some kind of API offered by the project API.

I have made a common library for DTO's, Entities, and Entity Repository classes shared by the backend API and administrative tool, but this definitely doesn't feel like the correct way of working. It seems to me it would be better to make the administrative tool manage the application through an offered API instead. It seems to me that using something like REST is quite brittle though, and my code simply feels more "firm" right now. I simply assume that stuff would get more brittle if I add more backend API's to the equation, however.

It also occured to me that I could perhaps make more shared libraries, and that those could be linked on a Domain level. So that would means my administrative tool would have all the different libraries imported into it, and the backend API's all the ones they need Domain knowledge of. The speeding ticket and fines ones would have "People" and "Fines" as libraries, the contracts one would have things like "People", "Housing", "Employment", etc.

What are the major flaws in these designs and how would I best handle this? Microservices are all "hot" right now, but I believe my backend API's won't really communicate with each other, just share similar concepts.

Note that even though we don't currently have the concept of users (all of the actions that will happen are bound to a "single time use"), this might change later on.

Currently I am building the applications in Spring (Spring Data, REST API for frontends made in AngularJS) and although I'm not currently using Spring Integration, it seems to me like it could help with integrating the administrative tools with the backend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.