Micro Frontends, Microservice Architecture Technique on Frontend
Posted By : Deepak Rawat | 22-Dec-2018
As we all know microservices are an architectural approach for scalable systems, it is mostly used for the backend but now as the frontend applications are becoming bigger and complex this approach is now can also be used for frontend applications, with the help of which different teams will be building one application with different JavaScript frameworks.
The idea of the micro frontend is to build a powerful and feature-rich browser application, i.e. a single page application which sits on the microservice architecture.
Monolith Frontend Architecture
Monolith frontend architectural approach is very simple, where one frontend team will create and maintain the frontend application which communicates with backend REST API services. The main problem with this approach is that as the application grows it is very difficult to scale it. The monolithic architectural approach doesn’t work perfectly for bigger web applications. Sometimes breaking the application in smaller modules with different frameworks becomes the requirement which is not possible with the monolithic approach.
Solution – Micro Frontends
The main idea with the Micro Frontend is to create
There are many companies which are using this kind of approach Spotify, Upwork, Klarna, etc are using micro frontend architectural approach for their web applications.
Implementing Micro-frontends
There are many ways to implement micro frontends:
- To combine multiple frameworks to a single page, Single-SPA
meta framework can be used. - Using web components as an integration layer between different
micro apps . - To integrate different
micro apps we can use Varnish Cache. - To communicate between different micro frontend modules we can create a shared event bus eg.
chrisdavies /eev .
If you have an application which grows with the time then you can think of micro fronted
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Deepak Rawat
Deepak is a Web and Mobile application Sr. Lead Frontend developer and good working experience with JQuery , AngularJS , Javascript and PhoneGap. His hobbies are listening to music and photography.