Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Micro Frontends | E-Commerce Total Makeover Teil 3 | bevh

Michael Geers
December 08, 2020

Micro Frontends | E-Commerce Total Makeover Teil 3 | bevh

Vortrag im Rahmen der Vortragsreihe des Bundesverband E-Commerce und Versandhandel (bevh).
https://www.bevh.org/veranstaltungen/details/e-commerce-total-makover-20202021-thema-3-micro-frontends.html

Michael Geers

December 08, 2020
Tweet

More Decks by Michael Geers

Other Decks in Technology

Transcript

  1. Michael Geers Frontend Entwickler naltatis auf Twitter & GitHub Buch

    Micro Frontends in Action Webseite micro-frontends.org Bremer Software Manufaktur mit Fokus auf E-Commerce
  2. Wie viele Personen entwickeln am E-Commerce System? A) 1 -

    10 Personen B) 11 - 20 Personen C) 21 - 50 Personen D) 51 - 100 Personen E) mehr als 100 Personen 7 Product Owner, UX/Designer, Software Entwickler, Tester, … Michael Geers @naltatis
  3. Wie viel Erfahrung hast du bereits mit Vertikalisierung und Micro

    Frontends? A) Micro What ?!? B) Schonmal von gehört. Könnte interessant sein. C) Beschäftige mich aktiv mit dem Thema. D) Erfolgreich im praktischen Einsatz. 8 Michael Geers @naltatis
  4. Trend 2: Frontend Werkzeuge ändern sich schnell 11 Grafik: Micro

    Frontends in Action Michael Geers @naltatis
  5. Trend 3: SPAs sind modern 12 Tools wie Angular, Vue

    der React fördern den Bau von Monolithen 
 in Form von Single Page Apps Monolith by Design
  6. Agenda 1. Was sind Micro Frontends? 2. Warum macht man

    das? 3. Wie funktioniert das technisch? 4. Worauf sollte man achten? 13 Michael Geers @naltatis
  7. Eine Definition Our preferred (and proven) approach is to split

    the browser- based code into micro frontends. In this approach, the web application is broken down into its features, and each feature is owned, frontend to backend, by a different team. This ensures that every feature is developed, tested and deployed independently from other features. … 16 Quelle: ThoughtWorks Technology Radar Michael Geers @naltatis
  8. Eine Definition Our preferred (and proven) approach is to split

    the browser- based code into micro frontends. In this approach, the web application is broken down into its features, and each feature is owned, frontend to backend, by a different team. This ensures that every feature is developed, tested and deployed independently from other features. … 17 Quelle: ThoughtWorks Technology Radar Michael Geers @naltatis
  9. 2 33 $ 66 $ 99 $ buy 2 1

    66 $ 1 1 list home detail basket payment confirm $ $ %% Team Inspire Team Decide Team Checkout Customer Journey Ein Team verantwortet mehrere Seiten Tea m Kaufen Tea m Entscheiden Tea m Entdecken Grafik: Micro Frontends in Action Michael Geers @naltatis 20
  10. Eine Definition Our preferred (and proven) approach is to split

    the browser- based code into micro frontends. In this approach, the web application is broken down into its features, and each feature is owned, frontend to backend, by a different team. This ensures that every feature is developed, tested and deployed independently from other features. … 24 Quelle: ThoughtWorks Technology Radar Michael Geers @naltatis
  11. 25 Unabhängige Teams Cross Functional Teams Frontend Backend Operations Self-Contained

    Systems keine Abhängigkeiten 
 zu andern Teams Grafik: Micro Frontends in Action Michael Geers @naltatis Ende-zu-Ende Verantwortung von UI bis Datenbank
  12. Eine Definition Our preferred (and proven) approach is to split

    the browser- based code into micro frontends. In this approach, the web application is broken down into its features, and each feature is owned, frontend to backend, by a different team. This ensures that every feature is developed, tested and deployed independently from other features. … 28 Quelle: ThoughtWorks Technology Radar Michael Geers @naltatis
  13. 35 Team Suchen Kategorieseite Team Kaufen Mini-Warenkorb Team Auswählen Merkliste

    Team Begleiten Kundenbegrüßung Feedback Support-Chat Team Entdecken Kaufanreizbanner 
 Inspirationsteaser Michael Geers @naltatis
  14. 36 Team Suchen Navigation Team Kaufen Mini-Warenkorb Team Auswählen Merkliste

    Artikeldetailseite Team Begleiten Kundenbegrüßung Feedback Support-Chat Team Entdecken Kaufanreizbanner Michael Geers @naltatis
  15. 37 Team Kaufen neuer Warenkorb-Eintrag Team Auswählen Add-to-Cart Layer Team

    Entdecken Produktempfehlungen Michael Geers @naltatis
  16. Frontend Payment Service Content Service Operations Platform Business Attributes Service

    Specialist Teams Team Inspire Team Decide Team Checkout Cross Functional Teams grouped around a use case or customer need grouped around a skill or technology Grafik: Micro Frontends in Action Michael Geers @naltatis 44
  17. Frontend Payment Service Content Service Operations Platform Business Attributes Service

    Specialist Teams Team Inspire Team Decide Team Checkout Cross Functional Teams grouped around a use case or customer need grouped around a skill or technology Entwicklung eines Features Meeting s viel Wartezeit ⏳ 45 Michael Geers @naltatis
  18. Wan n sin d Micr o Frontend s kein e

    gut e Ide e ? Native Apps?! Integration ist einfacher im Web AppStore Review vs. Continuous Delivery kleine Projekte Hauptvorteil ist Skalierung Schnitte bringen Overhead Unbekannte Domäne Schnitte sind schwer zu ändern ‎ maybe Monolith-first
  19. 2 33 $ 66 $ 99 $ buy 2 1

    66 $ 1 1 list home detail basket payment confirm $ $ %% Team Inspire Team Decide Team Checkout Customer Journey Seitenübergänge mit Links Grafik: Micro Frontends in Action Michael Geers @naltatis 57
  20. Server Team Entscheiden frontend-proxy (Nginx, …) Server Team Kaufen /red-tractor

    <html> <!--#include virtual=“/kaufen/basket“ --> <h1>Tractor</h1> <!--#include virtual=“/kaufen/buy“ --> </html> /red-tractor Komposition auf dem Server 
 mit SSI oder ESI
  21. Server Team Entscheiden frontend-proxy (Nginx, …) Server Team Kaufen /red-tractor

    <html> <!--#include virtual=“/kaufen/basket“ --> <h1>Tractor</h1> <!--#include virtual=“/kaufen/buy“ --> </html> /kaufen/basket /kaufen/buy /red-tractor Komposition auf dem Server 
 mit SSI oder ESI
  22. <button> buy for 66 € </button> <em>0 items</em> <html> <em>0

    items</em> <h1>Tractor</h1> <button>buy for 66 €</button> </html> Server Team Entscheiden frontend-proxy (Nginx, …) Server Team Kaufen /red-tractor <html> <!--#include virtual=“/kaufen/basket“ --> <h1>Tractor</h1> <!--#include virtual=“/kaufen/buy“ --> </html> /kaufen/basket /kaufen/buy /red-tractor Komposition auf dem Server 
 mit SSI oder ESI
  23. class KaufenBasket extends HTMLElement { constructor() {...} 
 connectedCallback() {...}

    
 attributeChangedCallback(attr, oldVal, newVal) {...} 
 disconnectedCallback() {...} 
 } window.customElements.define('kaufen-basket', KaufenBasket); Die Custom Elements API 61 Michael Geers @naltatis
  24. Seite zu Seite: URL-Parameter 
 
 Seite zu Fragment: Attribute

    Fragment zu Seite: Events (Bubbling) Fragment zu Fragment: Events (Broadcast) UI Kommunikation im Browser props down, events up Standard Browser APIs
  25. <entdecken-reco sku="t_red"> 
 </entdecken-reco> <kaufen-basket> 
 </kaufen-basket> <kaufen-buy sku="t_red"> 


    </kaufen-buy> t_green t_green Kommunikation Beispiel: Seite zu Fragment Seite aktualisiert sku-Attribut der Fragmente
  26. 2 33 $ 66 $ 99 $ buy 2 1

    66 $ 1 1 list home detail basket payment confirm $ $ %% Team Inspire Team Decide Team Checkout Customer Journey Seitenübergänge mit Links Grafik: Micro Frontends in Action Michael Geers @naltatis 67
  27. Seitenübergänge zwischen SPAs hard soft soft SPA SPA Shared Application

    Shell (Meta Framework) soft soft soft SPA SPA Verlinkte Single Page Apps Unified Single Page App Grafik: Micro Frontends in Action Michael Geers @naltatis 68
  28. Libraries & Meta Frameworks https://github.com/CanopyTax/single-spa https://github.com/zalando/tailor https://github.com/opencomponents/oc Podium https://podium-lib.io meta-spa-router

    https://github.com/manfredsteyer/meta-router https://github.com/onerzafer/microfe-client Piral https://piral.io Ara https://github.com/ara-framework puzzle.js https://github.com/puzzle-js https://github.com/SAP/luigi Luigi
  29. 71 Michael Geers @naltatis Gemeinsame Infrastruktur? Testen & Qualität Erfahrungs-

    austausch Lokales Entwicklung & Debugging Ausliefern statischer Assets Legacy & Migration Konsistentes Design Performance Wildwuchs verhindern
  30. gemeinsame Pattern Library design design dev dev dev ux 73

    Michael Geers @naltatis Konsistentes Design
  31. 1 66 $ Runtime Integration aka Bootstrap Model Versioned Package

    Pattern Library Product Team Product Team Product Team CSS & JS production 1 66 $ Pattern Library Product Team Product Team Product Team v2.0 v2.1 v2.1 v2.1 v2.0 JS CSS Template HTML JS CSS HTML Auslieferung als versioniertes Paket Teams updaten in eigener Geschwindigkeit Self-Contained > 100% Konsistenz 74 Michael Geers @naltatis Konsistentes Design
  32. Pattern Library Team A Team B Team C CSS Pure

    CSS Pattern Library Team A Team B Team C Framework-specific Components Pattern Library Team A Team B Team C Framework-agnostic Components Vue.js Web Components Pattern Library Team A Team B Team C Multiple Framework Components Vue.js Angular Pattern Library Team A Team B Team C CSS & JSX Common Templating Language (e.g. JSX) hyperapp … JSX compatible hyperapp Komponentenformat der Pattern Library beschränkt Tech-Stack-Wahl der Feature-Teams. 75 Michael Geers @naltatis Konsistentes Design
  33. Performance Kultur erst messen dann optimieren Welches Team ist verantwortlich?

    gemeinsame Metriken definieren 78 Michael Geers @naltatis Performance
  34. Testen in Isolation Fragmente sind self-contained funktionieren auch ohne Seite

    Mock Fragment Seiten funktionieren auch ohne Fragmente anderer Teams fast alle Tests 81 Michael Geers @naltatis Qualität und Testen
  35. 85 Michael Geers @naltatis Gemeinsame Infrastruktur? Testen & & Debugging

    Ausliefern statischer Assets Legacy & Migration Konsistentes Design Performance Wildwuchs
  36. Mein Buch Erschienen bei Manning Publications Early Access Juli 2019

    / Release September 2020 35% Rabatt mit Code mtpfrontends20 auf alle Bücher bei manning.com M A N N I N G Michael Geers 87 Michael Geers @naltatis
  37. Mehr zum Thema micro-frontends.org Artikel von Cam Jackson Artikel von

    Gustaf Nilsson Kotte 
 Blogposts vom Florian Rappl Blogposts von Luca Mezzalira Ausführliche Linksammlung
  38. Danke fürs Zuhören Michael Geers neuland Büro für Informatik 


    [email protected] 
 Twitter: @naltatis Team Autonomie for the Win!
  39. Mosaik Koushik Chowdavarapu 
 https://unsplash.com/photos/aWBPk_GBaCk Monolith Jeff Hendricks 
 https://unsplash.com/photos/yIKdc86jNBs

    Containers Frank Mckenna 
 https://unsplash.com/photos/tjX_sniNzgQ Buildings Juhasz Imre 
 https://www.pexels.com/photo/apartment-architecture-buildings- business-425047/ Zahnräder Miguel Á. Padriñán 
 https://www.pexels.com/de-de/foto/industrie-technologie-fabrik- kreis-3785930/ Utah Desert Monolith Patrick A. Mackie 
 https://commons.wikimedia.org/wiki/File:Utah_Desert_Monolith.jpg Scissors Matt Artz 
 https://unsplash.com/photos/SmocKx2oDZc People Icons freak 
 https://www.flaticon.com/family/special/lineal-color Action Bicycling Roman Pohorecki 
 https://www.pexels.com/photo/action-bicycling-bike-biking-287398/ The Tool Guy Tirachard Kumtanom 
 https://unsplash.com/photos/UuW4psOb388 Wooden Counter David Siglin 
 https://www.pexels.com/photo/blur-blurry-bokeh-close-up-347139/ Woodshop Igor Ovsyannykov 
 https://unsplash.com/photos/iXV0i4Wo4yc Traf f i c Lights Harshal Desai 
 https://unsplash.com/photos/0hCIrw8dVfE Flinke Flasche (ich) Rotary Telephone Mike Meyers 
 https://unsplash.com/photos/-haAxbjiHds Toolbox Julie Molliver 
 https://unsplash.com/photos/Z3vFp7szCAY Red Blueprint Ivan Samkov 
 https://www.pexels.com/de-de/foto/kreativ-gebaude-bau- schreibtisch-4491830/ Schuhbänder (ich) Tractors Manufactum 
 https://www.manufactum.com/tin-toys-c193667/ Bildquellen mit Micro Frontends gebaut