Micro Frontend

Micro Frontend

Micro Frontend?—

1.??????is a client-side architecture design.

2.?????individual components or pages are hosted in separate domains.

3.?????And integrated into the main?shell app?(host application)

following characteristics:

1.??????Owned by one team

o???It doesn't mean that only a single team will be responsible for fixing all the bugs

o???always reach out to the team, not an individual with any question about the business subdomain

o???Everyone in the team has to transfer personal pieces of knowledge to the rest through documentation and knowledge sharing sessions.

2.?????Independent implementation

o???The team?that owns the?micro app?has the whole freedom in choosing a tech stack.?

3.?????Independent deployment

o???Each of the?micro-apps?has?to be deployed individually as they are hosted in a separate domain

4.?????Decoupling

o???Micro-apps?have to be as decoupled as possible

5.?????Fault tolerance

o???One of the biggest benefits of?micro frontend?architecture is reliability

o???if one of the?micro-app?is broken, the other will still be functioning.

o???Let’s imagine Facebook, if one of the features, like groups, is shot down, users will still be able to chat with friends.

ways of implementing?micro frontend?architecture

1.??????Micro frontend as a component.

a.?????micro-app is more granular.?

b.?????It acts as a widget that is reusable across applications.

c.??????The problem with this approach is it makes the micro app couple more tightly.?????

2.?????Micro frontend as a page.

a.?????With this approach, we dedicate a separate page per each of our?micro-app

b.??????It allows us to avoid tight dependency between parent-child, compared to the previous approach.

c.??????As a result, it is the most common way of implementing micro frontend architecture.

Ways to share the data between micro app

1.?????One of the biggest challenges in architecting?micro frontend?is data sharing.

2.?????The data can have different types like?state,?UI components,?or?utility functions.

3.????Make sure that your micro app is not containing a?data store state.

4.?????it has to be separated into a shareable data layer.

5.????There are also some other ways of communication between micro apps

a.?????we can utilize our browser storage capabilities: It may be either?localStorage,?sessionStorage,?cockies?for storing session data or user metadata, or some more complex data structures in?indexedDB.

b.????In addition to that, you may also establish the data transfer between the micro-apps simply through the router?query params.

?Module Federation?plugin, provided by webpack. It supports local and remote modules to build independently and asynchronously.

We combine all these sources together to create a workable prototype, which we can iterate over. The quickest way is to use NX cli, which will generate all the boilerplates for us.

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

Balaji M.的更多文章

  • NgRx

    NgRx

    · Is framework for building reactive apps in angular. · Global state management.

  • #MongoDB vs #MySQL

    #MongoDB vs #MySQL

    Who Uses These Databases? MySQL: MySQL has been maturing since 1995 and has grown a large following. Some organizations…

  • This is how #angular-cli/webpack delivers your CSS styles to the client

    This is how #angular-cli/webpack delivers your CSS styles to the client

    #AngularJS simplifies the front-end development experience.#AngularJS is a structural framework for dynamic web apps.

  • #Codeigniter vs #Laravel

    #Codeigniter vs #Laravel

    #Laravel is an open-source #PHP web application framework based on #MVC architecture. The framework was created and…

  • Onsen UI for #Vue 2

    Onsen UI for #Vue 2

    #Vue.js is an open-source JavaScript framework for building user interfaces.

  • #JavaScript through #TypeScript

    #JavaScript through #TypeScript

    #JavaScript code which has the .js file extension is of paramount importance if you wish to learn #TypeScript, luckily…

  • #CodeIgniter CDNSun Integration

    #CodeIgniter CDNSun Integration

    1)Content Distribution Network or CDN has become an important aspect of website design. 2)CDN is invaluable in ensuring…

  • Single Page Apps with #jQuery Routing

    Single Page Apps with #jQuery Routing

    Single page apps are becoming the hot cake in the web industry, Everyone wants to build SPA or Single page apps.we will…

  • AngularJS Development Power

    AngularJS Development Power

    1.MVC: - MVC or Model-View-Controller architecture.

  • A developing affection: Assessing the rise and fall of programming languages

    A developing affection: Assessing the rise and fall of programming languages

    These days we take applications for granted to run our businesses and organise and entertain us in our personal lives…

社区洞察

其他会员也浏览了