Micro Frontends — From the 00s to 20s
So, why use this approach?
There are various aspects why it would be better to use this pattern in certain situations. On large-scale projects we know all the dead times of an infinite build, or the cost of a deployment , or the inefficiency of some components that sink the whole project or, again, not being able to find a bug that causes a blocking error in the lifecycle of the entire application.
Based on the basic principles of the pattern, such as:
- Error isolation
- Agile / Lean method
It is easy to see how many everyday situations are resolved. Each team that deals with an application will have full responsibility and independence of its functionality. You can even use a Continuos Delivery service!
How can I implement the Micro Frontends pattern?
Micro Frontends must first be studied for each use case, this is as fundamental as it is if you wanted to build a microservices architecture . There are various ways to develop this architecture and it depends on the project needs. Each portion of the application could be included: directly from the edge , i.e. who serves everything (like a CDN) : Edge Server Side Include processing the request on the server side, then returning everything already composed: Server Side Include composing everything on the client side, starting from a configurator: Client Side Include If you have a CDN, or a managed cloud server, with the chance of using the Edge Server Includes this could really be an advantage, low maintenance cost, and with a crazy fast speed. In the real world, unfortunately, there are not many services that provide this kind of service, not even AWS. The choice of the implementation method need to be take only after careful analysis.
The advantages of the Micro Frontend architecture are both architectural and resource side, since each dev could change team, change stack , remaining on the same project while still maintaining an efficient entry cost on a new feature. A tip: if you want to start implementing this pattern you will need to be very open-minded. In the next article I will analyze some case studies and some implementation. Stay tuned.