I'm curious why you've put REST API to the frontend. Sure, the frontend is the consumer, but does this involve designing the REST API? I thought this was the task of the backend.
If the REST API was designed after the requirements of the frontend, but the data model stays the same, the controllers/views need to fill the resulting gap and become fat. API optimization for a specific consumer also hinders reusability of the REST API by other consumers. Aren't skinny controllers/views what we should strive for?
I'm curious why you've put REST API to the frontend. Sure, the frontend is the consumer, but does this involve designing the REST API? I thought this was the task of the backend.
If the REST API was designed after the requirements of the frontend, but the data model stays the same, the controllers/views need to fill the resulting gap and become fat. API optimization for a specific consumer also hinders reusability of the REST API by other consumers. Aren't skinny controllers/views what we should strive for?
So I explained to someone else that at IBM the FE devs were responsible for REST APIs. This can also be a BE responsibility. Depends where you are!
And what do you think works better? Any general advice or does it depend on the project?