This question already has an answer here:
In my current project, I have a screen which pulls data from several webservices, pulls data from database via backend API and checks that all resources have the same data or not.
The other webservices are partial mirrors of the data in the db and the screen shows a table with the state of the data(if everything is the same across the servers)
However, I am not very satisfied with this.
- Smaller code.
- Easier to implement
- More fragile,vulnerable to simple changes in the webservices
- Business logic and presention tangled together
- Uglier code
- Client code knows to much about the data structure
Java backend pros:
- More readable
- More decoupled
- Much more complex, a lot of classes(dtos for example)
- Java don't go nicely with json
- Harder to implement
- Harder to implement some features because of abstractions
What is the right approach? Client or server?