I have been debating with my colleagues about the following and we still did not reach consensus.
The architecture is as follows:
medium size monolith application for intranet usage
a small application that features a SPA and a Web API which allows some folks to fill in some tests (Internet)
both applications use the same database and our team handles both
the flow is the following: someone initializes a test in the internal app and it becomes available in the external app, the external app deals with issuing the test and computing the score which becomes available for the internal app.
Now, the request is to allow the internal app user to preview the test. This comes the debate related to where to place the business logic: in the monolith vs. in the Web API.
Arguments for the monolith
Arguments for the Web API
I am interested in what is the recommended way to proceed in such a case.
Question: What are the pros and cons of placing more complex business logic in a Web API?