The simple explanation of Microfrontend

The simple explanation of Microfrontend

Modern web apps are more complicated, and some of them are managed by multiple teams. When you want to put one of the features into production before releasing the entire program. So, if we just have one repository, how are we going to manage that???

As a result, a monolithic design is difficult to maintain and has other disadvantages. So, in this short article, I will explain what a micro frontend is, why it is useful, and where it is headed.?

What exactly is a micro frontend??

Micro Frontends are small apps that are separated into subdomains. There are two types of Architecture (Client Side and Server Side Architecture). Micro frontend is a client-side architecture design whereas individual web components are simple single-page applications.??

Advantages -??

  • Easy and independent implementation - Implementation is easy and independent while working with micro/small components. It is simple to manage and maintain, and we can assign specific components to specific teams because the small components are simple to understand and change if necessary.? It is feasible for a developer to understand smaller component code.?
  • ?Easy to deploy - We can easily and independently deploy tiny components once we have them. The creation of several pipelines and managing the URLs of each #microfrontend is the only problem we confront.?
  • Efficiency - Micro Frontend's best feature is its efficiency. Let us say one of the mini-applications is not working, but the others are. These mini-applications aren't interconnected in any way. It's crucial in larger applications. Whereas single page contains #multiplefeatures. For example, if the Gmail calendar feature isn't working or has been down for a while, users can still use the other features, such as sending emails, etc.??
  • ?Reusability - The simple component code can be used in a variety of situations. Once the component has been deployed via the component URL, it can be used by many teams.?

How can we build the Micro Frontend using web components??

  • The application must be divided into domains or features.?
  • Create a separate repository for each feature and populate it with the appropriate components.?
  • Deploy the feature repository to a cloud-based service like CloudFront.?
  • Create a unique selector for each component and, if necessary, add event input or output properties.?
  • Create a primary container app and include the deployed build URLs in the index.html file.?
  • Create a component in the container and add the deploy web component's selector to it.?
  • Deploy the container app.

Code for reference

Container

Web Component


Ashutosh Tripathi

Staff Engineer at Nagarro

1 年

Is it only me who is seeing the github links with only readme.md and gitignore files? I was looking for some code snippets to support the above theory :(

回复
Vigneswaran Parthiban

Sr Engr Cslt-SoftwareDevt - Software Devt at Verizon

1 年

Could you please help me to share a document which I consider react as host application and angular as a child one

回复
Vigneswaran Parthiban

Sr Engr Cslt-SoftwareDevt - Software Devt at Verizon

1 年

Hi Harshal Could you please explain how we can use angular mfe in react. I have already created react MFE , Now I want to add one of my angular applications through webpack in my react MFE.

回复
Prashanth Kumar Rai

UI fullstack, Angular, freelancer

3 年

Why use angular elements for micro frontend? And you have to stay in angular 8 and below version ever.

要查看或添加评论,请登录

Harshal S.的更多文章

  • Unit Testing In Angular

    Unit Testing In Angular

    What & Why Unit Testing? Unit testing your #Angular application helps you check that your application is working as you…

  • Micro Frontend With Angular & React Using Module Federation

    Micro Frontend With Angular & React Using Module Federation

    I have already explained how micro frontend work please check out this link if you are aware of it (Micro Frontend)…

    9 条评论
  • Create Your First NPM package using Angular

    Create Your First NPM package using Angular

    NPM:- ( Node Package Manager). NPM is the package manager for the Node JavaScript platform.

    2 条评论
  • Micro Frontend with Module Federation

    Micro Frontend with Module Federation

    I have already explained how micro frontend work please check out this link if you are aware of it (Micro Frontend) Now…

    10 条评论
  • Storybook With Angular

    Storybook With Angular

    Have you heard about the Storybook? Let me explain what is Storybook. A storybook is a tool for UI development.

  • Send emails using Node.js, Nodemailer, and Angular and verify user account

    Send emails using Node.js, Nodemailer, and Angular and verify user account

    This code sends a simple HTML email using the free SMTP testing service and after getting the verification mail user…

    3 条评论

社区洞察

其他会员也浏览了