Slide 1

Slide 1 text

@duffleit micro frontends a strive for fully verticalized systems _

Slide 2

Slide 2 text

@duffleit David Leitner § Technical Expert at Senacor Technologies § Lecturer for post diploma courses at UAS Technikum Vienna § I do a couple of things around the tech- community I‘m writing code

Slide 3

Slide 3 text

@duffleit A definition of micro frontends The idea of micro frontends is to extend the concepts of micro services to the frontend world.

Slide 4

Slide 4 text

@duffleit Sam Newman: § small and focused on one thing § … to be autonomous § That‘s it WHY we do them? Microservices ! CVDD HDD/EDD

Slide 5

Slide 5 text

@duffleit why autonomous? Independent deployments Small interface surface Technology agnostic Based on standards Autonomous operations Parallel Development

Slide 6

Slide 6 text

@duffleit „Microservices are stated as a contrast system to monoliths.“ Where they came from

Slide 7

Slide 7 text

@duffleit the application the database Ball of Mud Brian Foote Joseph Yoder

Slide 8

Slide 8 text

@duffleit database layer the database business layer frontend layer

Slide 9

Slide 9 text

@duffleit database layer the database business layer frontend layer

Slide 10

Slide 10 text

@duffleit payment the database products user shipping

Slide 11

Slide 11 text

@duffleit DB DB DB DB DB DB DB DB DB

Slide 12

Slide 12 text

@duffleit DB DB DB DB DB DB DB DB DB Independent deployments Autonomous operations Technology agnostic Based on standards Parallel Development Small interface surface

Slide 13

Slide 13 text

@duffleit

Slide 14

Slide 14 text

@duffleit But wait, … our microservices have actual human users. - Stefan Tilkov

Slide 15

Slide 15 text

@duffleit

Slide 16

Slide 16 text

@duffleit the frontend

Slide 17

Slide 17 text

@duffleit The frontend is … not an implementation detail, it is a critical part of a microservice architecture.

Slide 18

Slide 18 text

@duffleit frontend platform backend platform Independent deployments Autonomous operations Technology agnostic Based on standards Parallel Development Small interface surface a frontend monolith was born a micro frontend TO THE RESCUE ! Independent deployments ! Autonomous operations ! Technology agnostic ! Based on standards ! Parallel Development ! Small interface surface

Slide 19

Slide 19 text

@duffleit A micro frontend? …which one do you want to have?

Slide 20

Slide 20 text

@duffleit ! Hyperlink Integration

Slide 21

Slide 21 text

@duffleit Flavour #1: Hyperlink Integration frontend platform backend platform Catalogue Ordering Payment Shipping hyperlink hyperlink hyperlink

Slide 22

Slide 22 text

@duffleit Flavour #1: Breaking service boundaries frontend platform backend platform Products Ordering Payment Shipping Dash board

Slide 23

Slide 23 text

@duffleit Flavour #1: Backend for Frontend frontend platform backend platform Products Ordering Payment Shipping Dash board BFF BFF BFF BFF BFF samnewman.io/patterns/architectural/bff/

Slide 24

Slide 24 text

@duffleit Flavour #1: Hyperlink Integration Independent deployments Autonomous operations Technology agnostic Parallel Development

Slide 25

Slide 25 text

@duffleit What customers expect: 1 Company == 1 Website I don‘t want to maintain this UI/UX anymore. 1 Company === 1 Website

Slide 26

Slide 26 text

@duffleit Flavour #1: Reusage Problem frontend platform backend platform Catalogue Ordering Payment Shipping hyperlink hyperlink hyperlink Menu Menu Menu

Slide 27

Slide 27 text

@duffleit Flavour #1: Hyperlink Integration Independent deployments Autonomous operations Technology agnostic Parallel Development A consistent UI/UX Smooth user interaction Fast loading

Slide 28

Slide 28 text

@duffleit ! Build Time Integration

Slide 29

Slide 29 text

@duffleit Flavour #2: Build Time Integration

Slide 30

Slide 30 text

@duffleit Flavour #2: Build Time Integration BUNDLED FRONTED UI-Shared-Stuff (e.g. SPA-Framework, Components, Routing) Mono Repo

Slide 31

Slide 31 text

@duffleit MonoRepo ☑ Simplifies dependency management. ☑ Allows extensive code sharing and reuse. package.json Shared resources (assets, components…) repository

Slide 32

Slide 32 text

@duffleit Flavour #2: Build Time Integration Independent deployments Autonomous operations Technology agnostic Parallel Development A consistent UI/UX Smooth user interaction Fast loading BUNDLED FRONTED UI-Shared-Stuff (e.g. SPA-Framework, Components)

Slide 33

Slide 33 text

@duffleit ! Transclusion

Slide 34

Slide 34 text

@duffleit Flavour #3: Transclusion BUNDLED FRONTED UI-Shared-Stuff (e.g. SPA-Framework, Components) The bundling is done by the webserver.

Slide 35

Slide 35 text

@duffleit Flavour #3: Server Side Includes or Edge Side Includes

Slide 36

Slide 36 text

@duffleit Flavour #3: Transclusion Independent deployments Autonomous operations Technology agnostic Parallel Development A consistent UI/UX Smooth user interaction Fast loading BUNDLED FRONTED UI-Shared-Stuff (e.g. SPA-Framework, Components)

Slide 37

Slide 37 text

@duffleit ! App Shell Integration

Slide 38

Slide 38 text

@duffleit Flavour #4: App Shell Integration APP SHELL Header Footer The aggregation is done on the client.

Slide 39

Slide 39 text

@duffleit Flavour #4: App Shell Integration Independent deployments Autonomous operations Technology agnostic Parallel Development ! A consistent UI/UX Smooth user interaction Fast loading APP SHELL Header Footer

Slide 40

Slide 40 text

@duffleit ! Metaframework

Slide 41

Slide 41 text

@duffleit Flavour #5: Metaframework Route-based modularisation is handled by a Metaframework Metaframework /catalogue /checkout

Slide 42

Slide 42 text

@duffleit /catalogue /checkout APP SHELL Header Footer A matter of modularisation Hyperlink Integration App Shell Integration Metaframework

Slide 43

Slide 43 text

@duffleit Flavour #5: Metaframework Route-based modularisation is handled by a Metaframework Metaframework /catalogue /checkout

Slide 44

Slide 44 text

@duffleit • they are implemented with iframes. • or start using web components now. Flavour #5: Technology agnostic

Slide 45

Slide 45 text

@duffleit Flavour #5: Metaframework Metaframework /catalogue /checkout Independent deployments Autonomous operations Technology agnostic Parallel Development ! A consistent UI/UX* Smooth user interaction Fast loading

Slide 46

Slide 46 text

@duffleit „a consistent UI“ ! CDN – for static files " CMS – for static content # A Component Library $ for one framework (version) $ technology agnostic

Slide 47

Slide 47 text

@duffleit Hyperlink Integration Build Time Integration Transclusion App Shell Integration Metaframework the agony of choice

Slide 48

Slide 48 text

@duffleit A consultant‘s favourite words. It depends

Slide 49

Slide 49 text

@duffleit A general decision advice Your application is big?* The need for smooth user interaction Build Time Integration Hyperlink Integration Strongly Independent UI/Domain Parts Complex modularisation needed Transclusion App Shell Integration Meta- Framework * an application is big enough to justify using micro frontends, if slight UI/UX differences between the two most unrelated subpages are acceptable. Yes No

Slide 50

Slide 50 text

@duffleit Compose your perfect MIX Landing Shop Ordering hyperlink hyperlink APP SHELL Header Footer

Slide 51

Slide 51 text

@duffleit Key-Takeaways KISS: „think twice if a frontend monolith does not fit your needs and start with a monolith first approach.“

Slide 52

Slide 52 text

@duffleit Key-Takeaways „Consider the frontend as part of your microservice architecture – and solve UI specific problems with UI specific solutions.“

Slide 53

Slide 53 text

@duffleit Key-Takeaways „micro frontends are not a stack or technology – everyone who tells you this, wants to sell you something.“

Slide 54

Slide 54 text

@duffleit Use the right tool for the right job. @duffleit

Slide 55

Slide 55 text

@duffleit If you liked this talk – vote for it. I’m David Leitner Non-Hype-Train-Activist & Enthusiastic Developer @duffleit