Front end “micro services” with Angular 2

后端 未结 2 2056
太阳男子
太阳男子 2021-02-05 20:58

I\'m looking for a solution for a bit of an odd situation. Let\'s take a quick look at the angular2-seed project so I can better explain: https://github.com/mgechev/angular2-see

2条回答
  •  自闭症患者
    2021-02-05 21:24

    Orchestration:

    Have each team build a component library (NPM) and pull those into a single Angular 2 application. That way, the teams can develop using microservices principles, but you can deploy a SPA monolith which reduces complexity.

    Large component libraries should have multiple bundles and modules so you can be selective about what you pull in.

    Communication between microservices:

    If necessary, the component libraries can communicate over a back-end message bus.

    If direct client-side integration is required between the component libraries, then you need a 3rd component library that about and home depends on, which contains a light-weight injectable message/event service. You can implement that service using RxJS Subjects.

提交回复
热议问题