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-seed/tree/master/src/client/app.
In that project, we have 3 isolated modules - about, home, shared. What I am looking for is a way to isolate development of these, so we're ultimately able to release each piece independently. For example, say Team A is working on the about section, and Team B is working on home. Work is complete for each, and we're ready to release, however we realize the about section is missing a critical piece of functionality, however we still want to release the change to the home section. What we're looking for is a way to achieve this.
Here are some solutions already explored, but I'm not really happy with:
It's perfectly feasible to use microservices on the back end with a single Angular application on the front end. But if you want to divide it up and it makes sense to do so, you should first look at using multiple modules. You are already using modules (these are added to the imports of your app.
2: Frontend integration: The frontend is a component of each microservice. Each must be connected separately to provide users with a uniform UI/UX. Build-time integration is based on providing the frontends using packages, which a container app then loads as a dependency.
Micro Frontend — is a client-side architecture design when individual components or pages are hosted in separate domains and integrated into the main shell app (host application). Each of the micro-app owned the whole business subdomain and has the following characteristics: Owned by one team.
Micro frontends are a new pattern where web application UIs (front ends) are composed from semi-independent fragments that can be built by different teams using different technologies. Micro-frontend architectures resemble back-end architectures where back ends are composed from semi-independent microservices.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With