You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing to request advice and thoughts on the design of the Angular MFE.
We had a monolith angular application at first. This application was made out of a single app and libraries for all the feature/domain modules. These libraries had circular dependencies and were shared/tightly coupled across various modules. Independent release cycles for each domain were not met by this, and the build time was far too long.
We undertook a project to convert the monolith application to MFEs using module federation with NX[ 40 remote MFE applications]. During the course of the conversion, to resolve the circular dependencies we isolated them to be part of libraries.
These libraries comprise Models, Services and Store. Please find the below folder structure. Because of these legacy code limitations, we are not able to leverage the complete benefits of MFE.
To attain the objective of MFE, we have 2 approaches.
Mono Repo a. The objective of this approach would be to refactor the Store modules in such a way that there are no dependencies of the store on any libraries or apps. If there is any dependency, the respective app should rely on an API call. b. Have minimal libs dependency on models and services. c. There is less duplication of code but does not solve the complete business need as we have few libraries which will hinder us to go fully independent.
Mono and Multi Repo a. Copy models, services and store dependencies to the respective domain/feature apps and refactor the store as mentioned above. b. This will solve the issue of independence which will help in deployment but this would incur tech debt as we will have code duplication/redundancy which can only be solved by the BFF design pattern.
Request suggestions and help to choose the right approach to go ahead with.
Also, any opinion on Mono (or) Multi repository patterns for MFE, in general, would be of great help.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm writing to request advice and thoughts on the design of the Angular MFE.
We had a monolith angular application at first. This application was made out of a single app and libraries for all the feature/domain modules. These libraries had circular dependencies and were shared/tightly coupled across various modules. Independent release cycles for each domain were not met by this, and the build time was far too long.
We undertook a project to convert the monolith application to MFEs using module federation with NX[ 40 remote MFE applications]. During the course of the conversion, to resolve the circular dependencies we isolated them to be part of libraries.
These libraries comprise Models, Services and Store. Please find the below folder structure. Because of these legacy code limitations, we are not able to leverage the complete benefits of MFE.
To attain the objective of MFE, we have 2 approaches.
Mono Repo a. The objective of this approach would be to refactor the Store modules in such a way that there are no dependencies of the store on any libraries or apps. If there is any dependency, the respective app should rely on an API call. b. Have minimal libs dependency on models and services. c. There is less duplication of code but does not solve the complete business need as we have few libraries which will hinder us to go fully independent.
Mono and Multi Repo a. Copy models, services and store dependencies to the respective domain/feature apps and refactor the store as mentioned above. b. This will solve the issue of independence which will help in deployment but this would incur tech debt as we will have code duplication/redundancy which can only be solved by the BFF design pattern.
Request suggestions and help to choose the right approach to go ahead with.
Also, any opinion on Mono (or) Multi repository patterns for MFE, in general, would be of great help.
Beta Was this translation helpful? Give feedback.
All reactions