Search code examples
angularweb-servicesweb-applicationsfrontendmicroservices

UI with microservices


I have fornt end Web application written in JSF with Richfaces. Its a kind of dashboard application. We are trying to move this in Angular 2 with Spring Boot rest api. I want to write microservices where each functionality would be independent. There are total 10 functionality so i will write 10 different rest services and each one would have its own build process. But i am confused with fornt end part. Should i create separate artifacts or separate build for each UI as well ? Or should i bundle in each respective rest api? how should i take care of front end part in microservices?


Solution

  • The UI shouldn't be bundled with the REST services in a true Microservices based architecture. Because if the UI is bundled with APIs, for every defect fix in the UI, all the APIs need to be rebuilt and deployed. The UI needs to be hosted separately. If the team feels comfortable with Spring Boot, the Angular UI can be bundled in a separate Spring Boot application that doesn't have any API.

    Update on 21-Mar-2018 I understand that bundling the Angular GUI with Angular Universal in a pm2 server is a better approach.