Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorLuca Mezzalira

What's the answer to today's increasingly complex web applications? Micro-frontends. Inspired by the microservices model, this approach lets you break interfaces into separate features managed by different teams of developers. With this practical guide, Luca Mezzalira shows software architects, tech leads, and software developers how to build and deliver artifacts atomically rather than use a big bang deployment. You'll learn how micro-frontends enable your team to choose any library or framework. This gives your organization technical flexibility and allows you to hire and retain a broad spectrum of talent. Micro-frontends also support distributed or colocated teams more efficiently. Pick up this book and learn how to get started with this technological breakthrough right away. Explore available frontend development architectures Learn how microservice principles apply to frontend development Understand the four pillars for creating a successful micro-frontend architecture Examine the benefits and pitfalls of existing micro-frontend architectures Learn principles and best practices for creating successful automation strategies Discover patterns for integrating micro-frontend architectures using microservices or a monolith API layer

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical guide for software architects, tech leads, and senior developers who want to break monolithic frontends into independently deployable, team-owned micro-frontends—covering architecture patterns, team coordination, and integration strategies without over-engineering. 【Book Arc】 - **Opening (~0%–9%)**: Introduces micro-frontends as the frontend answer to microservices, emphasizing that architecture must fit context rather than be copied blindly. Covers the four pillars (independence, ownership, resilience, observability) and warns against distributed monoliths and over-centralized shared components. - **Early (~9%–25%)**: Dives into design systems and web components as the technical foundation, then explores horizontal-split architectures—where multiple teams own different parts of the same view—with guidance on state ownership, event-based communication, and reducing cross-team dependencies. - **Early (~25%–34%)**: Compares integration architectures: iframe-based composition (with practical tips for webstorage and event emitters), server-side composition like ESI (noting poor developer experience), and isomorphic applications with BFF patterns. Each gets scored on scalability, coordination, and DX. - **Middle (~34%–47%)**: Surveys alternative frontend architectures (static pages, Jamstack, SPAs) to position micro-frontends, then presents real-world case studies—OpenTable's Open Components registry and DAZN's client-side orchestrator—showing how large organizations scale teams globally. - **Middle (~47%–end)**: Focuses on Module Federation as a modern integration technique, explaining unidirectional sharing, webpack plug-ins (ContainerPlugin, ContainerReferencePlugin), and how to dynamically load remotes based on user context or routes. 【Key Takeaways】 - **Context beats best practices** (Opening): Never copy an architecture without understanding your team structure, communication flows, and constraints—aim for the "least worst" architecture, not the ideal one. - **Independence is the core pillar** (Opening): A micro-frontend should own its business subdomain with minimal external dependencies; more than three or four external dependencies signals a distributed monolith, which is worse than a monolith. - **Web components are the design system investment** (Early): They work with any UI framework, so if you switch frameworks later, your design system survives. Only avoid them if you must support old browsers. - **Duplicate before abstracting** (Early): Shared components are often reused less than expected; start by duplicating and only centralize after several iterations—wrong abstractions cost more than duplicated code. - **One team owns the final view** (Early): When multiple teams contribute to a page, assign one team responsibility for the final user experience to avoid misunderstandings and coordination chaos. - **Use events, not shared state** (Early): Micro-frontends in the same view should own their state and communicate via event emitters, CustomEvents, or reactive streams—never via global state like Redux, which breaks independence. - **Module Federation works best unidirectionally** (Middle): Share from host to remotes only; bidirectional sharing complicates debugging and risks domain leaks. Use webpack plug-ins like MinChunkSizePlugin to optimize chunk loading. - **Observability is non-negotiable** (Middle): With runtime composition, failures (404s, network errors) are inevitable—use tools like Sentry or LogRocket to detect and fix issues quickly rather than trying to prevent them all. 【Reading Tips】 - **Skim the architecture comparison tables** (Early ~25%–34%): The scoring tables for each integration pattern (iframe, ESI, isomorphic) are dense but useful as reference—read the summaries first, then dive into specifics only if relevant to your stack. - **Deep-read the horizontal-split chapter** (Early ~16%–25%): This is where the practical team-coordination advice lives—event communication, reducing micro-frontends per view, and documentation via RFCs. These are the hardest lessons to learn on the job. - **Treat case studies as inspiration, not templates** (Middle ~44%–47%): OpenTable and DAZN show what's possible, but their solutions are tailored to their scale and domain—extract principles, not code patterns. - **Skip the frontend architecture survey if you're experienced** (Middle ~34%–44%): The chapters on static pages, Jamstack, and SPAs are introductory; if you already know these, jump to the micro-frontend-specific content. - **Focus on Module Federation's "why" not just "how"** (Middle ~47%–end): The webpack plug-in details are implementation-specific, but the unidirectional sharing principle and dynamic loading via APIs are transferable to any integration approach. 【Coverage Limits】 The excerpts cover architecture patterns, team coordination, and integration techniques well, but do not include detailed code walkthroughs for setting up a full micro-frontend project from scratch, nor do they cover testing strategies, CI/CD pipelines, or security considerations in depth.
Page 10
een teams. When we ignore these aspects, we risk creating a great technical proposition that’s completely unsuitable for our company. It’s the same when we r...
View in text
Excerpt 2
r in a live meeting or via asynchronous communication, such as emails or instant messaging clients. We must also reduce the number of teams working on the sa...
View in text
Excerpt 3
to create truly decoupled user interfaces, this has proved challenging for developers, who have awaited proper framework and tool support. Fortunately, that...
View in text
Excerpt 4
ts or the whole bundle with a host and vice versa. However, bidirectional sharing can complicate your architecture very quickly. The best approach is sharing...
View in text
Excerpt 5
ering our teams when we are working with micro-frontends is essential because we cannot always rely on all the micro-frontends having the same build pipeline...
View in text
Excerpt 6
many others. All of these controls create confidence in the delivery of high-quality content. This strategy also provides developers with a useful and consta...
View in text
Excerpt 7
re is a considerable drop of new users between landing page and sign-up flows, and we can expect the product team would like to make multiple changes for red...
View in text
Excerpt 8
roject. They’re created when we underestimate a subdomain’s complexity in terms of the business logic and permutations that a micro- frontend needs
View in text
Tags
AI categories
Web TechnologyBackendProgramming Language
ISBN: 1492082996
Publisher: O'Reilly Media
Publish Year: 2021
Language: English
Pages: 538
File Format: PDF
File Size: 6.7 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…