8 Things You Did Now Know Micro Frontends Can Do

Rate this content
Bookmark

Did you know that micro frontends can be much faster than their monolithic counter parts? How about rollbacks of specific features? In this talk you will hear and see 8 examples of things that will not only teach you a bit about micro frontends, but also in what cases they are most useful.

This talk has been presented at React Summit US 2024, check out the latest edition of this React Conference.

FAQ

The session is focused on introducing microfrontends to individuals who have had little to no contact with them and aims to educate on various aspects of microfrontends.

No, microfrontends can be used in various platforms, including server-side rendered applications, making them versatile and transportable.

Yes, microfrontends can be used for A/B testing and personalization by utilizing a discovery service to deliver different microfrontend versions based on user criteria.

Microfrontends allow partial rollbacks by swapping specific versions of a microfrontend using a discovery service, enabling targeted updates without affecting the entire application.

Microfrontends can enhance performance by allowing smaller, independent updates without affecting the entire application, improving caching and reducing load times.

The presenter is Flo, a solutions architect from SmartPio in Munich, Germany, who specializes in distributed web applications and microfrontends.

Microfrontends are the technical representation of a business subdomain, allowing independent implementations with the same or different technologies, similar to microservices.

Microfrontends can be developed locally and offline using a build tooling and emulator that allows integration of other microfrontends and testing in isolation.

HMFR is a process where updates to microfrontends are automatically inserted into a browser, allowing for streaming updates similar to hot module reload.

Generative AI can be integrated by using a discovery service to create AI-enhanced variants of microfrontends, enabling experimentation with different versions for user feedback and optimization.

Florian Rappl
Florian Rappl
22 min
22 Nov, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Welcome to the session on microfrontends. Microfrontends allow for independent implementations and local development. It is possible to develop and integrate microfrontends locally using an emulator and achieve automatic updates. Fine-tuning modules and user experience can be done using a discovery service. Rules can be created in the discovery service to selectively load microfrontends for specific browsers. AI can be leveraged to generate AI-enhanced variants and compare them with the original implementation. Microfrontends are highly portable and can be used in different applications. Code isolation and enhanced performance are important considerations in microfrontends. The benefits of microfrontends include improvements in file name changes and performance overhead. The Netflix application is a case study for microfrontends. Overall, microfrontends offer various benefits and opportunities for architectural discussions.

1. Introduction to Microfrontends

Short description:

Welcome everyone to the session, 8 Things You Did Not Know Microfrontends Can Do. The session is targeted towards people with little to no contact with microfrontends. The speaker, Flo, is a solutions architect specialized in distributed web applications and microfrontends. He will provide a general definition of microfrontends, explaining their technical representation of a business subdomain and the organizational pattern behind them.

Welcome everyone to the session, 8 Things You Did Not Know Microfrontends Can Do. The session is mostly targeted towards people that have, let's say, had barely or even no contact with microfrontends, so if you consider yourself a microfrontend expert, I would assume that you know already one or the other thing in here, but hopefully I can still teach you, let's say, a variety of things that should be possible.

Before we dive into the topic, a few words about me. Hi, my name is Flo, I'm a solutions architect from a smaller company called SmartPio. We sit right in Munich in Germany and we are mostly dealing with IoT platforms, modular applications, security audits, and whatnot. I myself am specialized in distributed web applications and microfrontends. I'm giving also workshops, doing code reviews, and helping of course teams to scale up the frontend development. So if any of what I just said makes any sense to you and you want to get in touch and potentially want to discuss how we can, let's say, improve your architecture, always just ping me.

The LinkedIn URL is written also on the bottom of all the slides. All right, but we don't have much time and there are eight things to go over, so let's just jump right into topic, and what I want to do is I want to start with general, let's say, definition of microfrontends, because there are a couple of definitions out there and potentially you are a little bit unsure what microfrontends are. So microfrontends are the technical representation of a business subdomain. What you can already, let's say, know from that definition is that there are no restrictions and also no guidelines what you need to do for a technical implementation. All the things that I said here is that it's more or less organizational pattern that arises here that's, of course, geared towards solving a technical issue.

2. Implementation and Local Development

Short description:

Microfrontends allow independent implementations with the same or different technology. They can be thought of as an extension or the next step after microservices, touching both the frontend and backend. The goal is to have autonomous teams, each owning isolated microfrontends. One implementation approach is local and offline development, using build tooling and an emulator to work on microfrontends locally. This allows for automatic updates and integration of other microfrontends.

Now, if you want to dive a little bit more into it, of course, then you would need to continue reading because they allow independent implementations with the same or different technology, meaning you can, of course, use, I don't know, React to write your components, but you could also use something else. So a little bit of the promises that you know already from microservices. In general, microfrontends can be thought of as just an extension or, let's say, the next step after microservices and they, of course, also touch the frontend. They don't need to be exclusive to the frontend. They can, of course, have some backend part in there and the best, let's say, scalable solutions out there, they really are full stack, meaning that there is, of course, some UI fragment that gets delivered, but there are also backend fragments that are delivered here from these teams. Now, what they should do in order to achieve that is they should minimize the code shared like you already do with your backend. And, of course, you don't want, let's say, to have interleaving areas with other subdomains, meaning other teams that are also creating microfrontends. At the end, the goal is to have autonomous teams here. So one team can also have multiple microfrontends, but the real important part is that there is no microfrontend that's shared among different teams. So also the microfrontends represent really an isolated unit that you talk about. Now, as I said, there are multiple things that you can do actually implement them. This will not be a talk where I go over all of these things. I just then use, of course, sample implementations to show you now the eight things that you can do instead. So let's start right away with local and offline development. Quite often when you get in the area of microfrontends, people say, well, then we need to have an aggregation environment, and only in that environment, can you not say, let your microfrontends run? So you always will have, let's say, this kind of weird feeling that you just not develop something. We don't even know how it then looks when it gets integrated and really used by end users. And that's not really good. So what you can do instead, and what, of course, we always encourage people to do is, we have a build tooling that, of course, triggers the start of your development session locally against your microfrontend, but then also takes into consideration some other sources. And very often these sources can be installed already upfront, for instance, in form of NPM packages, but they can also reside somewhere online. And then when you start your development session, just be grabbed or not, right? If you already have some locally, the cache one could be used, but this allows you to automatically update it. So now you run a studio microfrontend, but it now runs in the context of this, what we usually refer to as emulator. The name was chosen because it's the same idea that you have, for instance, when you develop, for instance, an Android app, you also don't do it on your phone right away. You don't do the integration, but you work against this emulator. And this, of course, can give you some bad tips. Now, looking at this scenario here, we have one microfrontend, it's just a standard Node or NPM project. So here based, of course, on React, and you see, we have a lot of development dependencies already installed, but the code base is rather small. If you look in the depth dependencies, you also have this strange one, which is our emulator. Now, if you just start this, then of course our microfrontend will run, but it looks rather empty, but it's already in something where we see not flicks. So that's the demo behind. So we have this Netflix shell, but it's rather empty because we are developing isolation, right? But what it can do via browser extension, for instance, is bring in other microfrontends.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Understanding React’s Fiber Architecture
React Advanced 2022React Advanced 2022
29 min
Understanding React’s Fiber Architecture
Top Content
This Talk explores React's internal jargon, specifically fiber, which is an internal unit of work for rendering and committing. Fibers facilitate efficient updates to elements and play a crucial role in the reconciliation process. The work loop, complete work, and commit phase are essential steps in the rendering process. Understanding React's internals can help with optimizing code and pull request reviews. React 18 introduces the work loop sync and async functions for concurrent features and prioritization. Fiber brings benefits like async rendering and the ability to discard work-in-progress trees, improving user experience.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
The Eternal Sunshine of the Zero Build Pipeline
React Finland 2021React Finland 2021
36 min
The Eternal Sunshine of the Zero Build Pipeline
For many years, we have migrated all our devtools to Node.js for the sake of simplicity: a common language (JS/TS), a large ecosystem (NPM), and a powerful engine. In the meantime, we moved a lot of computation tasks to the client-side thanks to PWA and JavaScript Hegemony.
So we made Webapps for years, developing with awesome reactive frameworks and bundling a lot of dependencies. We progressively moved from our simplicity to complex apps toolchains. We've become the new Java-like ecosystem. It sucks.
It's 2021, we've got a lot of new technologies to sustain our Users eXperience. It's time to have a break and rethink our tools rather than going faster and faster in the same direction. It's time to redesign the Developer eXperience. It's time for a bundle-free dev environment. It's time to embrace a new frontend building philosophy, still with our lovely JavaScript.
Introducing Snowpack, Vite, Astro, and other Bare Modules tools concepts!
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
React Summit 2022React Summit 2022
17 min
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
Top Content
Today's Talk discusses building flexible, resilient, and future-proof React components using composition and configuration approaches. The composition approach allows for flexibility without excessive conditional logic by using multiple components and passing props. The context API can be used for variant styling, allowing for appropriate styling and class specification. Adding variants and icons is made easy by consuming the variant context. The composition and configuration approaches can be combined for the best of both worlds.
Remix Architecture Patterns
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Remix Architecture Patterns
Top Content
This Talk introduces the Remix architecture patterns for web applications, with over 50% of participants using Remix professionally. The migration from single page applications to Remix involves step-by-step refactoring and offers flexibility in deployment options. Scalability can be achieved by distributing the database layer and implementing application caching. The backend for frontend pattern simplifies data fetching, and Remix provides real-time capabilities for collaborative features through WebSocket servers and Server-SendEvents.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.