Micro frontend architecture advice

后端 未结 8 2303
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 00:57

We have several web applications that we wish to present under one single page application. We are looking for a micro-frontend architecture/framework to use. As we see it,

8条回答
  •  情话喂你
    2020-12-30 01:50

    You might try PuzzleJs. It is designed to be framework solution to micro frontends architecture for both gateway and storefront. It is being used on production of our high traffic e-commerce website. You should really check it out.

    It actually covers almost all of your requirements.

    • Independent Deployments
    • Independent Source Code
    • Independent Technologies

    And about the iframe solution, it might get hard to manage things like CORS and communication with other iframes.


    But micro frontends solution is not still perfect. There are lots of complexities when you really dive deep into it.

    Some assets will try to declare same variable in global scope and sometimes they will have different versions that will cause error. So teams won't be fully independent from each other.

    Logging and monitoring gets extreme hard. Tools like New Relic will help you but it won't be enough. You should implement custom monitoring and error reporting tools.

    Keeping applications dockerized and auto-scale friendly is really important. With this architecture if you have 4 gateways and a storefront it can be tricky.

    Initial cost of implementing micro-frontends architecture is quite high. You should consider your time and developer resource carefully

    Performance is the most important thing. You don't want to download react or other libraries for more than one time because multiple teams are using them. You should implement DllPluginn to remove duplicated codes. And it will make everything harder.

    And there are lots of other problems that I couldn't remember. If you don't have more than 50 developers working on same storefront project, micro front-ends is an overkill decision.

提交回复
热议问题