Herdy Handoko
Well-rounded developer focusing on web technologies. Distributed computing, concurrency, and the actor model. Scala, Play, Akka, and Kotlin.
Voxxed Days Singapore - 30th - 31st May 2019
_hhandoko
hhandoko
hhandoko.com
Overview of microfrontend architecture:
Microfrontends learnings from Standard Chartered:
Core ideas:
Notes:
[1] - https://micro-frontends.org/#what-are-micro-frontends
Also known as:
Comparable concepts:
Extends the concept of microservices to the frontend.
Notes:
[1] - https://micro-frontends.org/ressources/diagrams/organisational/monolith-frontback-microservices.png
Notes:
[1] - https://micro-frontends.org/ressources/diagrams/organisational/verticals-headline.png
Notes:
[1] - https://micro-frontends.org/ressources/screen/three-teams.png
Microfrontend as an architectural and
team organisation approach,
not technology stacks
Reinvention(s):
Intrinsic dependencies:
Dynamic coupling:
Restructuring teams around business domains and capabilities:
Knowledge on specific domain can be transferable across regions and markets.
Team composition remains fluid, but enable better continuity from project to project.
Integration on 'last-mile':
Independent deployment:
Risk containment:
Customer requirements indicate that we were going to build a content-heavy web application, with only limited interactivity.
Notes:
[1] - https://cdn-images-1.medium.com/max/1600/1*NJMQCgyMShhjYx6dE_pbRw.png
[2] - https://medium.com/@areai51/microfrontends-an-approach-to-building-scalable-web-apps-e8678e2acdd6
[3] - https://2018.ar.al/notes/the-documents-to-applications-continuum/
Complexity lies in data sourcing and aggregation:
Offline first and PWAs:
CPU utilisation vs network latency:
First microfrontends?
skatejs:
node-tailor:
markojs:
Notes:
[1] - https://skatejs.netlify.com/
[2] - https://github.com/zalando/tailor
[3] - https://markojs.com/
Server Side Rendering:
Edge Side Includes:
Notes:
[1] - https://en.wikipedia.org/wiki/Edge_Side_Includes
[2] - https://medium.com/walmartlabs/the-benefits-of-server-side-rendering-over-client-side-rendering-5d07ff2cefe8
Customisations:
Replaced good-guy-http with Axios for consistency with the rest of the apps, contextual logging, tuneable retry strategy, and Bearer token header embeds.
Subset of ESI standard with a Promise-based interface.
Notes:
[1] - https://github.com/Schibsted-Tech-Polska/nodesi
<esi:include src="http://example.com/1.html"
alt="http://bak.example.com/2.html"
onerror="continue"/>
Stacks:
Build Tools:
Infrastructure:
Others:
Optimise for Time to First Render:
Future considerations:
Notes:
[1] - https://github.com/spdy-http2/node-spdy
[2] - https://github.com/patrick-steele-idem/morphdom
Optimise for clarity:
Optimise for fast response and small payload:
Future considerations:
Notes:
[1] - https://github.com/fizzed/rocker
[2] - https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#spring-webflux
[3] - https://micronaut.io/
[4] - https://typelevel.org/cats-effect/datatypes/io.html
Progressive enhancements:
Agreed conventions:
Future considerations:
Monorepo for each vertical:
Services are broken down into small modules which are shared by runtime artifacts (i.e. apps).
End to end development within a (domain) boundary.
Various environment-specific configurations:
Service mocks and API-compatible alternatives:
Development setup and standalone mode via Docker compose:
Promote shared resource as a library:
Three types of resources available:
JSON for external service consumption.
HTML fragments are the resource used for embedding in the web application.
HTML page format is used during development to provide an indication how the component will look and behave.
Implicit assumptions from modern web and mobile apps:
Good (+ resilient) on poor connection:
Will it scale?
Image Attributions:
- https://www.vecteezy.com/vector-art/192201-seamless-memphis-background
- https://www.vecteezy.com/vector-art/275088-memphis-pattern-design
- https://www.pexels.com/photo/white-painted-wall-1939485/
By Herdy Handoko
Presentation on Server-side microfrontends, prepared for Voxxed Days Singapore on 30 - 31 May 2019. Link: https://slides.com/hhandoko/server-side-microfrontends-voxxed-days-sg/
Well-rounded developer focusing on web technologies. Distributed computing, concurrency, and the actor model. Scala, Play, Akka, and Kotlin.