SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
blog.oio.de news.trivadis.com/blog@Trivadis
MicroFrontends für Microservices
Marius Hilleke – marius.hilleke@trivadis.com
Thomas Bröll - thomas.broell@trivadis.com
Micro-Frontends –
MicroServices im Browser
Was sind MicroFrontends?
Definitionsversuche
– The idea behind Micro Frontends is to think about a website or web app as a composition of
features which are owned by independent teams. Each team has a distinct area of
business or mission it cares about and specialises in. A team is cross functional and develops its
features end-to-end, from database to user interface. – [1]
– In this approach, a web application is broken up by its pages and features, with each feature being
owned end-to-end by a single team. Multiple techniques exist to bring the application features—some
old and some new—together as a cohesive user experience, but the goal remains to allow each feature
to be developed, tested and deployed independently from others. – [2]
[1] Michael Geers: https://micro-frontends.org/
[2] ThoughtWorks: https://www.thoughtworks.com/radar/techniques/micro-frontends
Unabhängigkeit End-To-Endfeature-basierte Modularisierung
MicroFrontends – MicroServices im Browser
• MicroServices Paradigma
• Ein Feature End-to-End
• Eigene Teams
• Vorteile mitnehmen
• Wiederverwendbarkeit von Komponente
• Integration „fremder“ fachlicher Features
• Nachteile umgehen
• Nur für wiederverwendbare Komponenten
• Nur an sinnvollen Grenzen aufteilen
Angular?
• „Angular is ideal for building complete applications,
and our tooling, documentation and infrastructure
are primarily aimed at this case.“
• Rob Wormald, Angular Team
Angular?
• „[…] but is quite challenging to use in scenarios that
don‘t fit that specific Single Page application model.“
• Rob Wormald, Angular Team
UI
Micro-Service 1
Ohne MicroFrontends...
Nutzer
Micro-Service 2 Micro-Service 3 Micro-Service 4
Welche Möglichkeiten zur technischen Umsetzung von
MicroFrontends gibt es?
[1] https://martinfowler.com/articles/micro-frontends.html
Server-seitige
Komposition via
Templates
Integration zum
Build-Zeitpunkt
via iframes
via JavaScript
via Web Components
Laufzeit-
integration
Kombinationen
der Ansätze
Server-side template composition
https://app/item-details
HTML mit Item-Details Fragment
details.html
dashboard.html
cart.html
u
index.html
u
Build-time integration
run build
Run-time integration via iframes
WebComponents
u
<head>
<script …>
</head>
<body>
<my-e1></my-e1>
<my-e2></my-e2>
</body>
bundle1.js
bundle2.js
bundle3.js
Web-Components
Web components are a set of web platform APIs that allow you to create
new custom, reusable, encapsulated HTML tags to use in web pages and
web apps. Custom components and widgets build on the Web Component
standards, will work across modern browsers, and can be used with any
JavaScript library or framework that works with HTML.
Web components are based on existing web standards. Features to support
web components are currently being added to the HTML and DOM specs,
letting web developers easily extend HTML with new elements with
encapsulated styling and custom behavior. – [1]
[1] webcomponents.org: https://www.webcomponents.org/introduction
Definition
Custom Elements
Custom Elements
WebComponents (Custom Elements)
Quelle: caniuse.com
10/2018
5/2020
Shadow DOM
Shadow DOM
Shadow DOM
Elemente im DOM
Elemente im DOM (Demo)
Custom Events
Noch einiges mehr ….
• Templates
• Slots
• Binding, verbessertes Rendering mit
• https://lit-html.polymer-project.org/
• Open Web-Components Recommendations + Template https://open-wc.org/
• Browser Support für alte Browser
• WebComponents-Polyfill von webcomponents.org (Teil des Polymer Projekts)
• Babel
• Polyfills für viele einzelne Funktionen
• Typescript - Setup
• Webpack/Babel
• Starter z.B. https://open-wc.org/
Angular Elements
Angular?
• „[…] but is quite challenging to use in scenarios that
don‘t fit that specific Single Page application model.“
Rob Wormald, Angular Team
Wie kann ein MicroFrontend mit AngularElements umgesetzt werden?
[1] https://www.webcomponents.org/introduction
Demo
Anwendungsfälle
Echte Anwendungsfälle
• Langfristige Sicherheit
• Standards
• Wenige externe Abhängigkeiten
• Passive Webseite mit aktiven Inhalten als Web-Components
• Direkt
• Server-seitige Integration
• Anwendungen
• Integration weniger Komponenten anderer Services
• Sonderfall: Dashboard
• Anwendung aus Komponenten
• Seiten, Navigation und Router
• Komponenten- und CSS-Framework
Links
• Code bei Github https://github.com/tvdtb/demo/tree/master/webcomponents-angularelements/
• Michael Geers: https://micro-frontends.org/
• ThoughtWorks: https://www.thoughtworks.com/radar/techniques/micro-frontends
• Fowler: https://martinfowler.com/articles/micro-frontends.html
• Custom Element: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements
• Template Literals: https://www.ecma-international.org/ecma-262/6.0/#sec-template-literals
• Shadow DOM: https://dom.spec.whatwg.org/#dom-element-attachshadow
• CustomEvent: https://dom.spec.whatwg.org/#interface-customevent
• Angular Elements: https://angular.io/guide/elements
• Open-WC: https://open-wc.org/
MicroFrontends für Microservices

Mais conteúdo relacionado

Mais procurados

Perforce CMS
Perforce CMSPerforce CMS
Perforce CMS
Perforce
 

Mais procurados (14)

Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Decoupling Content Management
Decoupling Content ManagementDecoupling Content Management
Decoupling Content Management
 
Decoupling Content Management with Create.js
Decoupling Content Management with Create.jsDecoupling Content Management with Create.js
Decoupling Content Management with Create.js
 
Symfony2 for Midgard Developers
Symfony2 for Midgard DevelopersSymfony2 for Midgard Developers
Symfony2 for Midgard Developers
 
Introduction to the Yahoo! Mojito Node.js MVC
Introduction to the Yahoo! Mojito Node.js MVCIntroduction to the Yahoo! Mojito Node.js MVC
Introduction to the Yahoo! Mojito Node.js MVC
 
Jquery
JqueryJquery
Jquery
 
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
 
What\'s New in Kentico CMS 5.5 R2
What\'s New in Kentico CMS 5.5 R2What\'s New in Kentico CMS 5.5 R2
What\'s New in Kentico CMS 5.5 R2
 
CMS And The Evolution of Contemporary Web Design
CMS And The Evolution of Contemporary Web DesignCMS And The Evolution of Contemporary Web Design
CMS And The Evolution of Contemporary Web Design
 
EUDAT B2ACCESS - Presentation
EUDAT B2ACCESS  - PresentationEUDAT B2ACCESS  - Presentation
EUDAT B2ACCESS - Presentation
 
Perforce CMS
Perforce CMSPerforce CMS
Perforce CMS
 
Comet
CometComet
Comet
 
Liferay
LiferayLiferay
Liferay
 
Schemaorg cmsplugins
Schemaorg cmspluginsSchemaorg cmsplugins
Schemaorg cmsplugins
 

Semelhante a MicroFrontends für Microservices

Mlb drupal bizday_presentation
Mlb drupal bizday_presentationMlb drupal bizday_presentation
Mlb drupal bizday_presentation
erlee72
 
ProjectsSummary
ProjectsSummaryProjectsSummary
ProjectsSummary
Ya Wang
 
Social networking app to trade user belongings
Social networking app to trade user belongingsSocial networking app to trade user belongings
Social networking app to trade user belongings
Mike Taylor
 
Social networking app to trade user belongings
Social networking app to trade user belongingsSocial networking app to trade user belongings
Social networking app to trade user belongings
Mike Taylor
 

Semelhante a MicroFrontends für Microservices (20)

Micro-Frontends JSVidCon
Micro-Frontends JSVidConMicro-Frontends JSVidCon
Micro-Frontends JSVidCon
 
Architecting an ASP.NET MVC Solution
Architecting an ASP.NET MVC SolutionArchitecting an ASP.NET MVC Solution
Architecting an ASP.NET MVC Solution
 
IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer Javascript
 
Building reusable components as micro frontends with glimmer js and webcompo...
Building reusable components as micro frontends  with glimmer js and webcompo...Building reusable components as micro frontends  with glimmer js and webcompo...
Building reusable components as micro frontends with glimmer js and webcompo...
 
App Development Evolution: What has changed?
App Development Evolution: What has changed? App Development Evolution: What has changed?
App Development Evolution: What has changed?
 
The App Evolution
The App Evolution The App Evolution
The App Evolution
 
George Jordanov CV
George Jordanov CVGeorge Jordanov CV
George Jordanov CV
 
LvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design SystemLvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design System
 
Mlb drupal bizday_presentation
Mlb drupal bizday_presentationMlb drupal bizday_presentation
Mlb drupal bizday_presentation
 
App Development Evolution: What has changed?
App Development Evolution: What has changed? App Development Evolution: What has changed?
App Development Evolution: What has changed?
 
ProjectsSummary
ProjectsSummaryProjectsSummary
ProjectsSummary
 
Choosing A Web Cms And Intro To Modx
Choosing A Web Cms And Intro To ModxChoosing A Web Cms And Intro To Modx
Choosing A Web Cms And Intro To Modx
 
Development of Multiplatform CMS System with Zend Framework
Development of Multiplatform CMS System with Zend FrameworkDevelopment of Multiplatform CMS System with Zend Framework
Development of Multiplatform CMS System with Zend Framework
 
MicroForntends.pdf
MicroForntends.pdfMicroForntends.pdf
MicroForntends.pdf
 
Web Components
Web ComponentsWeb Components
Web Components
 
web intership ritesh.pptx
web intership ritesh.pptxweb intership ritesh.pptx
web intership ritesh.pptx
 
Social networking app to trade user belongings
Social networking app to trade user belongingsSocial networking app to trade user belongings
Social networking app to trade user belongings
 
Social networking app to trade user belongings
Social networking app to trade user belongingsSocial networking app to trade user belongings
Social networking app to trade user belongings
 
Dot Net Nuke
Dot Net NukeDot Net Nuke
Dot Net Nuke
 
Ghost BLOG CMS Documentation via www.cemates.me
Ghost BLOG CMS Documentation via www.cemates.meGhost BLOG CMS Documentation via www.cemates.me
Ghost BLOG CMS Documentation via www.cemates.me
 

Mais de Comsysto Reply GmbH

Mais de Comsysto Reply GmbH (20)

Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
ljug-meetup-2023-03-hexagonal-architecture.pdf
ljug-meetup-2023-03-hexagonal-architecture.pdfljug-meetup-2023-03-hexagonal-architecture.pdf
ljug-meetup-2023-03-hexagonal-architecture.pdf
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
Invited-Talk_PredAnalytics_München (2).pdf
Invited-Talk_PredAnalytics_München (2).pdfInvited-Talk_PredAnalytics_München (2).pdf
Invited-Talk_PredAnalytics_München (2).pdf
 
Alles offen = gut(ai)
Alles offen = gut(ai)Alles offen = gut(ai)
Alles offen = gut(ai)
 
Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...
Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...
Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...
 
Smart City Munich Kickoff Meetup
Smart City Munich Kickoff Meetup Smart City Munich Kickoff Meetup
Smart City Munich Kickoff Meetup
 
Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...
Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...
Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...
 
"Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo...
"Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo..."Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo...
"Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo...
 
Data lake vs Data Warehouse: Hybrid Architectures
Data lake vs Data Warehouse: Hybrid ArchitecturesData lake vs Data Warehouse: Hybrid Architectures
Data lake vs Data Warehouse: Hybrid Architectures
 
Java 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawJava 9 Modularity and Project Jigsaw
Java 9 Modularity and Project Jigsaw
 
Distributed Computing and Caching in the Cloud: Hazelcast and Microsoft
Distributed Computing and Caching in the Cloud: Hazelcast and MicrosoftDistributed Computing and Caching in the Cloud: Hazelcast and Microsoft
Distributed Computing and Caching in the Cloud: Hazelcast and Microsoft
 
Grundlegende Konzepte von Elm, React und AngularDart 2 im Vergleich
Grundlegende Konzepte von Elm, React und AngularDart 2 im VergleichGrundlegende Konzepte von Elm, React und AngularDart 2 im Vergleich
Grundlegende Konzepte von Elm, React und AngularDart 2 im Vergleich
 
Building a fully-automated Fast Data Platform
Building a fully-automated Fast Data PlatformBuilding a fully-automated Fast Data Platform
Building a fully-automated Fast Data Platform
 
Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications
 
Ein Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMN
Ein Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMNEin Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMN
Ein Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMN
 
Geospatial applications created using java script(and nosql)
Geospatial applications created using java script(and nosql)Geospatial applications created using java script(and nosql)
Geospatial applications created using java script(and nosql)
 
Java cro 2016 - From.... to Scrum by Jurica Krizanic
Java cro 2016 - From.... to Scrum by Jurica KrizanicJava cro 2016 - From.... to Scrum by Jurica Krizanic
Java cro 2016 - From.... to Scrum by Jurica Krizanic
 
21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. Flink21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. Flink
 
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 

MicroFrontends für Microservices

  • 1. blog.oio.de news.trivadis.com/blog@Trivadis MicroFrontends für Microservices Marius Hilleke – marius.hilleke@trivadis.com Thomas Bröll - thomas.broell@trivadis.com
  • 3. Was sind MicroFrontends? Definitionsversuche – The idea behind Micro Frontends is to think about a website or web app as a composition of features which are owned by independent teams. Each team has a distinct area of business or mission it cares about and specialises in. A team is cross functional and develops its features end-to-end, from database to user interface. – [1] – In this approach, a web application is broken up by its pages and features, with each feature being owned end-to-end by a single team. Multiple techniques exist to bring the application features—some old and some new—together as a cohesive user experience, but the goal remains to allow each feature to be developed, tested and deployed independently from others. – [2] [1] Michael Geers: https://micro-frontends.org/ [2] ThoughtWorks: https://www.thoughtworks.com/radar/techniques/micro-frontends Unabhängigkeit End-To-Endfeature-basierte Modularisierung
  • 4. MicroFrontends – MicroServices im Browser • MicroServices Paradigma • Ein Feature End-to-End • Eigene Teams • Vorteile mitnehmen • Wiederverwendbarkeit von Komponente • Integration „fremder“ fachlicher Features • Nachteile umgehen • Nur für wiederverwendbare Komponenten • Nur an sinnvollen Grenzen aufteilen
  • 5. Angular? • „Angular is ideal for building complete applications, and our tooling, documentation and infrastructure are primarily aimed at this case.“ • Rob Wormald, Angular Team
  • 6. Angular? • „[…] but is quite challenging to use in scenarios that don‘t fit that specific Single Page application model.“ • Rob Wormald, Angular Team
  • 8. Welche Möglichkeiten zur technischen Umsetzung von MicroFrontends gibt es? [1] https://martinfowler.com/articles/micro-frontends.html Server-seitige Komposition via Templates Integration zum Build-Zeitpunkt via iframes via JavaScript via Web Components Laufzeit- integration Kombinationen der Ansätze
  • 9. Server-side template composition https://app/item-details HTML mit Item-Details Fragment details.html dashboard.html cart.html u index.html u
  • 14. Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Custom components and widgets build on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML. Web components are based on existing web standards. Features to support web components are currently being added to the HTML and DOM specs, letting web developers easily extend HTML with new elements with encapsulated styling and custom behavior. – [1] [1] webcomponents.org: https://www.webcomponents.org/introduction Definition
  • 17. WebComponents (Custom Elements) Quelle: caniuse.com 10/2018 5/2020
  • 22. Elemente im DOM (Demo)
  • 24. Noch einiges mehr …. • Templates • Slots • Binding, verbessertes Rendering mit • https://lit-html.polymer-project.org/ • Open Web-Components Recommendations + Template https://open-wc.org/ • Browser Support für alte Browser • WebComponents-Polyfill von webcomponents.org (Teil des Polymer Projekts) • Babel • Polyfills für viele einzelne Funktionen • Typescript - Setup • Webpack/Babel • Starter z.B. https://open-wc.org/
  • 26. Angular? • „[…] but is quite challenging to use in scenarios that don‘t fit that specific Single Page application model.“ Rob Wormald, Angular Team
  • 27. Wie kann ein MicroFrontend mit AngularElements umgesetzt werden? [1] https://www.webcomponents.org/introduction
  • 28. Demo
  • 30. Echte Anwendungsfälle • Langfristige Sicherheit • Standards • Wenige externe Abhängigkeiten • Passive Webseite mit aktiven Inhalten als Web-Components • Direkt • Server-seitige Integration • Anwendungen • Integration weniger Komponenten anderer Services • Sonderfall: Dashboard • Anwendung aus Komponenten • Seiten, Navigation und Router • Komponenten- und CSS-Framework
  • 31. Links • Code bei Github https://github.com/tvdtb/demo/tree/master/webcomponents-angularelements/ • Michael Geers: https://micro-frontends.org/ • ThoughtWorks: https://www.thoughtworks.com/radar/techniques/micro-frontends • Fowler: https://martinfowler.com/articles/micro-frontends.html • Custom Element: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements • Template Literals: https://www.ecma-international.org/ecma-262/6.0/#sec-template-literals • Shadow DOM: https://dom.spec.whatwg.org/#dom-element-attachshadow • CustomEvent: https://dom.spec.whatwg.org/#interface-customevent • Angular Elements: https://angular.io/guide/elements • Open-WC: https://open-wc.org/