I am creating new business web application and I want to achieve:
- Expose backend entities and business services for the use from different types of applications - e.g. web applications, mobile (Android) and possibly other types (smart devices, etc.)
So - to satisfy both requirements I am inclined to completely separate my application in backend and frontend applications and organize the communication between them using REST API (JSON). Is this sound approach?
Such separation is not obvious design solution, because many web application technologies have integrated view layers where the server side application more or less control the generation of the view and partially handles the responses from the view (e.g. SpringMVC with view layer, PHP Yii with view layer, Java JSF/Facelets completely saves the state of their components on the server). So - there are many technologies around that propose more strong coupling and promise faster development time and more standard path journey. So - I must be cautious when starting to use technologies in manner which is not widely used.
As I understand then completely separated SPA frontend usually arises from the necessity to use third party API. But is such decoupling sound design when both backend and frontend are developed by one company?
My choice of technologies currently is Java/Spring backend and Angular2/Web Components/Polymer for frontend - if I am allowed to say this. But that is irrelevant for this question, because this question is about general design and not about the choice of concrete technologies?