Sviluppo Web Frontend Architettura Software

Building Microfrontends: Introduction, Messaging and Isolation

Microfrontend architecture with iFrame, postMessage, Web Components and Shadow DOM: independent deployment for multiple teams.

Course description

Frontend that scales — without everything blowing up

With microfrontend architecture, each team can develop, test and release its own portion of the interface in a completely independent way. In this course we build real microfrontends using two concrete approaches: iFrame with postMessage and native Web Components.

What We Build Together

  • Setting up a microfrontend project with iFrame and configuring the environment
  • Secure communication between applications with postMessage and message events
  • Centralized HOST for routing messages between iFrames: dispatcher pattern
  • Advanced isolation: error handling and dispatcher optimizations
  • Native Web Components: Custom Elements, Shadow DOM and HTML Template
  • Creating the Web Component class and registering it with customElements.define()
  • Passing data via Properties, Attributes and custom events from the ShadowRoot

Who This Is For

Experienced frontend developers who work (or want to work) on large-scale applications with multiple teams. A solid knowledge of JavaScript and the DOM is required.

Why Microfrontends

Frontend monoliths grow until they become impossible to maintain. Microfrontends are the answer: each team owns its own piece of UI, develops it with the tech stack of their choice and deploys it independently. This course shows you how to do it with tools the browser supports natively.

Lessons list

I'll show you how to start a microfrontend project with iFrames from scratch: we'll analyse the core idea, set up the environment, and create the minimal structure to begin working with this architecture.

Guarda lezione

Let's tackle communication between microfrontend applications using iFrames: I'll show you how to use 'postMessage' to exchange data securely and in a controlled way between independent micro-apps.

Guarda lezione

Let's build a centralised HOST that routes messages between the various iFrames: I'll analyse the dispatcher architecture and how it improves isolation in microfrontend communication.

Guarda lezione

Let's complete the HOST dispatcher by adding error handling and advanced optimisations, making inter-iFrame communication more robust and ready for real production scenarios.

Guarda lezione

Let's introduce Web Components, the browser's native technology for encapsulated components: I'll explain Custom Elements, Shadow DOM and HTML Template clearly, with a comparison of different approaches.

Guarda lezione

Let's build our first complete Web Component: I'll define the class extending HTMLElement, register it with 'customElements.define()', and use it directly in HTML.

Guarda lezione

Let's go deeper into Web Component communication: how to pass data via Properties and Attributes, and how to emit Custom Events from the Shadow DOM towards the outer application.

Guarda lezione

Let's explore what Web Components are and how the Shadow DOM works: I'll walk through the three core concepts with practical examples to understand when and why to use them in microfrontend architectures.

Guarda lezione

I'll show you step by step how to create a Web Component class from scratch, register the custom tag, and insert it into the DOM to get a truly reusable component.

Guarda lezione

Let's see how to make Web Components talk with the rest of the app: we'll pass data via Properties and Attributes and emit custom events from the ShadowRoot with practical examples.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 10
  • Duration 1h 47m
  • Difficulty advanced
  • Language it
  • Certificate No

Recently viewed