I am a backend developer and was having this argument yesterday with a frontend dev in my team about whether or not should I let him fetch the displayable text message about the result of an operation from the backend.
My argument was that since it is a presentation layer decision, it should remain with the UI. They should switch on the response codes agreed upon between the backend and frontend and show the text messages accordingly. That way, the backend can also stay unaware of the interaction between the UI and the user.
Actually, since my company is extremely backend heavy, the practise here is to keep the UI extremely lightweight.
But I want to take suggestions from the community here to understand whether it is a good practice to retrieve the display messages from the backend or not.
In my small career as an Android fullstack developer (before this company), I always believed that the interaction between UI and backend should strictly about the data and not the presentation.