micro frontends
play

MICRO-FRONTENDS @lucamezzalira Luca Mezzalira VP of Architecture - PowerPoint PPT Presentation

I DONT UNDERSTAND MICRO-FRONTENDS @lucamezzalira Luca Mezzalira VP of Architecture at DAZN Google Developer Expert London JavaScript Community Manager Architecture evolution DB Application Server Single-Page Application


  1. I DON’T UNDERSTAND MICRO-FRONTENDS @lucamezzalira

  2. 🧑

  3. Luca Mezzalira VP of Architecture at DAZN Google Developer Expert London JavaScript Community Manager

  4. Architecture evolution DB Application Server Single-Page Application

  5. Architecture evolution DB DB DB Microservice Microservice Microservice API Gateway Single-Page Application

  6. Architecture evolution DB DB DB Microservice Microservice Microservice API Gateway MFE Single-Page Application MFE MFE MFE

  7. Who is using micro-frontends

  8. MICRO-FRONTENDS DEFINITION

  9. “ Micro-frontends are the technical representation of a business subdomain, they allow independent implementations with the same or different technology choices. Finally they should avoid sharing logic with ” other subdomains and they are own by a single team

  10. What is a micro-frontend? Landing page Sign in Landing page Sign in Sing up Sign up Catalog Help Catalog Help

  11. MICRO-FRONTENDS PRINCIPLES

  12. Model around Decentralisation business domain Culture of Deploy automation independently Hide implementation Isolate failure details

  13. Model around business domain Supporting Core Subdomain Generic Subdomain Subdomain

  14. Model around business domain Generic Landing page Sign in Generic Sign up Catalog Core Schedule Search

  15. Model around business domain Landing page MFE Landing page Sign in Auth MFE Sign up Catalog Discovery MFE Schedule Search

  16. Model around business domain Leeds London Supporting Core Subdomain Subdomain Katowice Amsterdam Supporting Generic Subdomain Subdomain

  17. Decentralisation Team Mars Tech Leads Team Moon Architecture Team Venus

  18. Decentralisation 1. Autonomous teams 2. Using the right tool for the right job 3. Components library 4. Standardization where needed 5. Code duplication vs shared code

  19. Culture of automation 1 1 1 1 1 1 1 1 1

  20. Independent deployment Landing Page 1.1.0 Catalog 2.0.0 Catalog 1.9.2 My Account 2.4.1

  21. Hide implementation details PayPal Component CONTRACT Subscription Micro-Frontend

  22. MICRO-FRONTENDS DECISIONS FRAMEWORK

  23. Key micro-frontends decisions 1. Define 2. Compose 3. Route 4. Communicate

  24. Define a micro-frontends header landing page image sign in related sign up articles article description catalog footer

  25. Horizontal VS Vertical split 1. Up front investment 1. Traditional development 2. Teams structure 2. Embracing JavaScript 3. Great for SEO ecosystem 4. Testing challenges 3. Dynamic Rendering for 5. Scalability challenges SEO 6. Dependency management

  26. Compose micro-frontends ORIGIN CDN CLIENT

  27. Route micro-frontends ORIGIN R CDN R R CLIENT R

  28. Micro-frontends communication mysite.com/section?id=123 header header image image related related articles articles article article description description footer footer

  29. Isolate failure header image related Catalog Error articles article description footer

  30. THERE IS NO RIGHT OR WRONG BUT ONLY THE RIGHT APPROACH BASED ON THE CONTEXT

  31. MICRO-FRONTENDS @DAZN

  32. Micro-Frontend @ DAZN HTML App.js Vendor.js CSS

  33. DAZN implementation 1. Application startup 2. I/O operations 3. Micro-Frontends lifecycle BOOTSTRAP 4. Communication between Micro-Frontends

  34. DAZN implementation 1. A Micro-Frontend represents a business domain 2. A Micro-Frontend is autonomous 3. One Micro-Frontend loaded per time 4. No sharing between micro-frontends (*) 5. Technology agnostic (*) with some exceptions

  35. How bootstrap works CSS 1. Call Startup service App.js 2. Understand user status 3. Load and Mount a Vendor.js Micro-Frontend HTML

  36. DAZN routing Cloudfront Lambda@Edge Bootstrap Micro-Frontend

  37. Components 1. Development time integration 2. APIs first 3. Own by a single team

  38. MICRO-FRONTENDS BEST PRACTICES

  39. APIs first design principles 1. APIs are the first user interface of your application 2. APIs come first, then the implementation 3. APIs are self-descriptive

  40. Design System and Governance DESIGN TOKENS COMPONENTS LIBRARY AUTOMATION Contract Button Fonts Testing Visual Colors List Regression Performance Accordion Icons Budget NPM Private Checkbox Registry

  41. Duplication over abstraction

  42. Duplication over abstraction Lib A Project Saturn Core Library Lib B Project Moon Lib C

  43. WRONG ABSTRACTION IS MORE EXPENSIVE THAN CODE DUPLICATION

  44. Dependencies Management header React 16.1 image related React 15.1 articles article description Angular 9 footer

  45. Performance 1. What is true for SPA is also true for Micro-Frontends 2. Pick the right approach to fulfill your needs 3. A user may download less code than a SPA

  46. Business Evolution Auth MFE Sign in MFE Subscribe MFE

  47. SEO Server Side Rendering Dynamic Rendering

  48. MICRO-FRONTENDS AUTOMATION

  49. Version of Control Monorepo Polyrepo Improve code quality Embrace conventional ● ● Always working with the development methods ● latest libraries versions Focus on part of the code ● Continuous scaling Multiple branching ● ● investment strategies available Faster onboarding Freedom to define CI/CD ● ● Trunk based development ●

  50. Continuous Integration 1. Investment upfront 2. Fast feedback 3. Parallel and Sequential tasks execution 4. Fitness functions for testing architectural concerns

  51. Fitness Function is a function that provides an objective integrity assessment of some architectural characteristics Building Evolutionary Architectures - O’Reilly

  52. Continuous Integration Clone Git repo Run tests Static Analysis Analyse Build and Module Permutations Optimize swapping Bundle Artifacts saved size check

  53. Micro-Frontends Deployment Catalog Sign In Help

  54. Components Deployment Button header List image related articles article Accordion description footer Checkbox

  55. Strangler Pattern and Canary Releases Single Page App Catalog MFE Cloudfront Lambda@edge Auth MFE Help MFE Lambda@Edge in DAZN: bit.ly/2SZ0Y24

  56. LET’S WRAP UP

  57. Micro-frontends summary Compose Orchestrate Communicate Performance Duplication over Abstraction Teams impact Dependencies Management Observability Design System Automation

  58. Useful links Resources Webinar bit.ly/386DNbx bit.ly/2v79e70

  59. buildingmicrofrontends.com 30 days FREE ACCESS bit.ly/32glJJF

  60. THANK YOU t: @lucamezzalira 🤤🤤 w: lucamezzalira.com e: mezzalab@gmail.com 🤤

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend