KEMBAR78
JavaScript frameworks of tomorrow | PDF
JavaScript frameworks of tomorrow
Or what to expect in the coming years
Juho Vepsäläinen
JS Fwdays Europe – 10.11.2022
What to expect
1. Current trends
2. Islands architecture
3. Resumability
4. JSON as a building block
5. Conclusion
1
Current trends
Past, present, future
Source: Miško Hevery: WebApps at Scale
2
Client, server, developer
3
Edge computing [6]
4
Transitional web applications (TWAs) [4]
• In October 2021, Rich Harris proposed the idea of TWAs [4]
5
Transitional web applications (TWAs) [4]
• In October 2021, Rich Harris proposed the idea of TWAs [4]
• By his definition, TWAs mix ideas from SPAs and the traditional
web
5
Transitional web applications (TWAs) [4]
• In October 2021, Rich Harris proposed the idea of TWAs [4]
• By his definition, TWAs mix ideas from SPAs and the traditional
web
• TWAs utilize SSR for fast initial loading times
5
Transitional web applications (TWAs) [4]
• In October 2021, Rich Harris proposed the idea of TWAs [4]
• By his definition, TWAs mix ideas from SPAs and the traditional
web
• TWAs utilize SSR for fast initial loading times
• TWAs are resilient as they work without JavaScript by default
5
Transitional web applications (TWAs) [4]
• In October 2021, Rich Harris proposed the idea of TWAs [4]
• By his definition, TWAs mix ideas from SPAs and the traditional
web
• TWAs utilize SSR for fast initial loading times
• TWAs are resilient as they work without JavaScript by default
• TWAs provide consistent experience and accessibility as a
built-in feature
5
Progressive enhancement in a nutshell (2008) [3]
6
Disappearing frameworks [2]
• According to Ryan Carniato [2], disappearing frameworks come
with almost a zero cost and disappear from an application
7
Disappearing frameworks [2]
• According to Ryan Carniato [2], disappearing frameworks come
with almost a zero cost and disappear from an application
• The starting point forms a contrast to the current breed of
frameworks that load upfront and rely on expensive hydration
for SSR
7
Disappearing frameworks [2]
• According to Ryan Carniato [2], disappearing frameworks come
with almost a zero cost and disappear from an application
• The starting point forms a contrast to the current breed of
frameworks that load upfront and rely on expensive hydration
for SSR
• Changing the fundamental viewpoint allows for new
architectures to emerge and it’s consistent with the idea of TWAs
7
Upcoming technologies
• SolidJS - React done ”right”
8
Upcoming technologies
• SolidJS - React done ”right”
• Marko - HTML re-imagined as a language for building dynamic
and reactive user interfaces
8
Upcoming technologies
• SolidJS - React done ”right”
• Marko - HTML re-imagined as a language for building dynamic
and reactive user interfaces
• Fresh - Web framework with zero runtime overhead, islands, no
build step, no configuration, oriented around (P)React
8
Upcoming technologies
• SolidJS - React done ”right”
• Marko - HTML re-imagined as a language for building dynamic
and reactive user interfaces
• Fresh - Web framework with zero runtime overhead, islands, no
build step, no configuration, oriented around (P)React
• Remix - React framework mixing frontend and backend designed
with the edge in mind
8
Upcoming technologies
• SolidJS - React done ”right”
• Marko - HTML re-imagined as a language for building dynamic
and reactive user interfaces
• Fresh - Web framework with zero runtime overhead, islands, no
build step, no configuration, oriented around (P)React
• Remix - React framework mixing frontend and backend designed
with the edge in mind
• Qwik - No hydration, automatic lazy loading, and more
8
Islands architecture
Islands architecture [5]
9
Islands architecture implemented by Etsy [1]
10
Islands architecture compared [7]
11
Islands oriented solutions
• 11ty/is-land - a new performance-focused way to add interactive
client-side components to your web site
12
Islands oriented solutions
• 11ty/is-land - a new performance-focused way to add interactive
client-side components to your web site
• îles - Powered by Vite, supports many frameworks (Vue, React,
Preact, etc.) for islands
12
Islands oriented solutions
• 11ty/is-land - a new performance-focused way to add interactive
client-side components to your web site
• îles - Powered by Vite, supports many frameworks (Vue, React,
Preact, etc.) for islands
• Capri - Powered by Vite, live CMS integration, early release
12
Islands oriented solutions
• 11ty/is-land - a new performance-focused way to add interactive
client-side components to your web site
• îles - Powered by Vite, supports many frameworks (Vue, React,
Preact, etc.) for islands
• Capri - Powered by Vite, live CMS integration, early release
• Astro - Lots of integrations, provides a model for mixing
interactivity with content
12
Demo time (Astro)
12
Resumability
Resumability in Qwik
• Qwik was initiated by Miško Hevery (Angular.js)
13
Resumability in Qwik
• Qwik was initiated by Miško Hevery (Angular.js)
• It’s a new take on how to build web applications
13
Resumability in Qwik
• Qwik was initiated by Miško Hevery (Angular.js)
• It’s a new take on how to build web applications
• The big idea is resumability and the avoidance of hydration
13
Resumability in Qwik
• Qwik was initiated by Miško Hevery (Angular.js)
• It’s a new take on how to build web applications
• The big idea is resumability and the avoidance of hydration
• In other words, Qwik serializes the application/framework state
into HTML when rendering the application
13
Resumability in Qwik
• Qwik was initiated by Miško Hevery (Angular.js)
• It’s a new take on how to build web applications
• The big idea is resumability and the avoidance of hydration
• In other words, Qwik serializes the application/framework state
into HTML when rendering the application
• It leverages JSX but implements state via reactive bindings and
avoids component re-rendering
13
Demo time (Qwik)
13
JSON as a building block
Gustwind - SSG driven by JSON
• Earlier solution of mine (Antwar) started showing its age
14
Gustwind - SSG driven by JSON
• Earlier solution of mine (Antwar) started showing its age
• I also wanted to learn to use Deno
14
Gustwind - SSG driven by JSON
• Earlier solution of mine (Antwar) started showing its age
• I also wanted to learn to use Deno
• As a result, I started playing around with ideas and came up with
Gustwind
14
Gustwind - Design principles
• Built entirely around JSON definitions (routes, components) and
distilled to a bare minimum
15
Gustwind - Design principles
• Built entirely around JSON definitions (routes, components) and
distilled to a bare minimum
• Went with Twind for styling and Sidewind for state (both are
loosely coupled)
15
Gustwind - Design principles
• Built entirely around JSON definitions (routes, components) and
distilled to a bare minimum
• Went with Twind for styling and Sidewind for state (both are
loosely coupled)
• Side effect - it’s possible to write editors on top of it
15
Gustwind - Design principles
• Built entirely around JSON definitions (routes, components) and
distilled to a bare minimum
• Went with Twind for styling and Sidewind for state (both are
loosely coupled)
• Side effect - it’s possible to write editors on top of it
• Also reasonably fast and parallelized
15
Breezewind - Templating
• Breezewind forms the core of the component system
16
Breezewind - Templating
• Breezewind forms the core of the component system
• It has been heavily inspired by the semantics of React (context,
props, etc.)
16
Breezewind - Templating
• Breezewind forms the core of the component system
• It has been heavily inspired by the semantics of React (context,
props, etc.)
• Think of it as an extensible JSON to HTML/XML transformer
16
Breezewind - Templating
• Breezewind forms the core of the component system
• It has been heavily inspired by the semantics of React (context,
props, etc.)
• Think of it as an extensible JSON to HTML/XML transformer
• Designed to run on top of Cloudflare Workers (no eval)
16
Demo time (Gustwind)
16
Conclusion
What to expect in the coming years
• Exploration of shipping less JavaScript to the client and being
smarter about it
17
What to expect in the coming years
• Exploration of shipping less JavaScript to the client and being
smarter about it
• More edge-oriented solutions
17
What to expect in the coming years
• Exploration of shipping less JavaScript to the client and being
smarter about it
• More edge-oriented solutions
• Frontend meets backend in unexpected ways
17
What to expect in the coming years
• Exploration of shipping less JavaScript to the client and being
smarter about it
• More edge-oriented solutions
• Frontend meets backend in unexpected ways
• SSGs with more user and designer-focused features (think
editing UIs on the web)
17
What to expect in the coming years
• Exploration of shipping less JavaScript to the client and being
smarter about it
• More edge-oriented solutions
• Frontend meets backend in unexpected ways
• SSGs with more user and designer-focused features (think
editing UIs on the web)
• AI and machine learning-driven tools (variant generation etc.)
17
Thank you! Time for your questions
17
References i
Etsy engineering: Mobius: Adopting jsx while prioritizing user
experience, 2021.
CARNIATO, R.
Understanding transitional javascript apps, Nov 2021.
GUSTAFSON, A., OVERKAMP, L., BROSSET, P., PRATER, S. V., WILLS, M.,
AND PENZEYMOOG, E.
Understanding progressive enhancement, Oct 2008.
HARRIS, R.
Have single-page apps ruined the web?, Oct 2021.
MILLER, J.
Islands architecture, 2020.
References ii
SHI, W., CAO, J., ZHANG, Q., LI, Y., AND XU, L.
Edge computing: Vision and challenges.
IEEE internet of things journal 3, 5 (2016), 637–646.
TEAM, T. P.
Islands architecture, Oct 2021.

JavaScript frameworks of tomorrow

  • 1.
    JavaScript frameworks oftomorrow Or what to expect in the coming years Juho Vepsäläinen JS Fwdays Europe – 10.11.2022
  • 2.
    What to expect 1.Current trends 2. Islands architecture 3. Resumability 4. JSON as a building block 5. Conclusion 1
  • 3.
  • 4.
    Past, present, future Source:Miško Hevery: WebApps at Scale 2
  • 5.
  • 6.
  • 7.
    Transitional web applications(TWAs) [4] • In October 2021, Rich Harris proposed the idea of TWAs [4] 5
  • 8.
    Transitional web applications(TWAs) [4] • In October 2021, Rich Harris proposed the idea of TWAs [4] • By his definition, TWAs mix ideas from SPAs and the traditional web 5
  • 9.
    Transitional web applications(TWAs) [4] • In October 2021, Rich Harris proposed the idea of TWAs [4] • By his definition, TWAs mix ideas from SPAs and the traditional web • TWAs utilize SSR for fast initial loading times 5
  • 10.
    Transitional web applications(TWAs) [4] • In October 2021, Rich Harris proposed the idea of TWAs [4] • By his definition, TWAs mix ideas from SPAs and the traditional web • TWAs utilize SSR for fast initial loading times • TWAs are resilient as they work without JavaScript by default 5
  • 11.
    Transitional web applications(TWAs) [4] • In October 2021, Rich Harris proposed the idea of TWAs [4] • By his definition, TWAs mix ideas from SPAs and the traditional web • TWAs utilize SSR for fast initial loading times • TWAs are resilient as they work without JavaScript by default • TWAs provide consistent experience and accessibility as a built-in feature 5
  • 12.
    Progressive enhancement ina nutshell (2008) [3] 6
  • 13.
    Disappearing frameworks [2] •According to Ryan Carniato [2], disappearing frameworks come with almost a zero cost and disappear from an application 7
  • 14.
    Disappearing frameworks [2] •According to Ryan Carniato [2], disappearing frameworks come with almost a zero cost and disappear from an application • The starting point forms a contrast to the current breed of frameworks that load upfront and rely on expensive hydration for SSR 7
  • 15.
    Disappearing frameworks [2] •According to Ryan Carniato [2], disappearing frameworks come with almost a zero cost and disappear from an application • The starting point forms a contrast to the current breed of frameworks that load upfront and rely on expensive hydration for SSR • Changing the fundamental viewpoint allows for new architectures to emerge and it’s consistent with the idea of TWAs 7
  • 16.
    Upcoming technologies • SolidJS- React done ”right” 8
  • 17.
    Upcoming technologies • SolidJS- React done ”right” • Marko - HTML re-imagined as a language for building dynamic and reactive user interfaces 8
  • 18.
    Upcoming technologies • SolidJS- React done ”right” • Marko - HTML re-imagined as a language for building dynamic and reactive user interfaces • Fresh - Web framework with zero runtime overhead, islands, no build step, no configuration, oriented around (P)React 8
  • 19.
    Upcoming technologies • SolidJS- React done ”right” • Marko - HTML re-imagined as a language for building dynamic and reactive user interfaces • Fresh - Web framework with zero runtime overhead, islands, no build step, no configuration, oriented around (P)React • Remix - React framework mixing frontend and backend designed with the edge in mind 8
  • 20.
    Upcoming technologies • SolidJS- React done ”right” • Marko - HTML re-imagined as a language for building dynamic and reactive user interfaces • Fresh - Web framework with zero runtime overhead, islands, no build step, no configuration, oriented around (P)React • Remix - React framework mixing frontend and backend designed with the edge in mind • Qwik - No hydration, automatic lazy loading, and more 8
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
    Islands oriented solutions •11ty/is-land - a new performance-focused way to add interactive client-side components to your web site 12
  • 26.
    Islands oriented solutions •11ty/is-land - a new performance-focused way to add interactive client-side components to your web site • îles - Powered by Vite, supports many frameworks (Vue, React, Preact, etc.) for islands 12
  • 27.
    Islands oriented solutions •11ty/is-land - a new performance-focused way to add interactive client-side components to your web site • îles - Powered by Vite, supports many frameworks (Vue, React, Preact, etc.) for islands • Capri - Powered by Vite, live CMS integration, early release 12
  • 28.
    Islands oriented solutions •11ty/is-land - a new performance-focused way to add interactive client-side components to your web site • îles - Powered by Vite, supports many frameworks (Vue, React, Preact, etc.) for islands • Capri - Powered by Vite, live CMS integration, early release • Astro - Lots of integrations, provides a model for mixing interactivity with content 12
  • 29.
  • 30.
  • 31.
    Resumability in Qwik •Qwik was initiated by Miško Hevery (Angular.js) 13
  • 32.
    Resumability in Qwik •Qwik was initiated by Miško Hevery (Angular.js) • It’s a new take on how to build web applications 13
  • 33.
    Resumability in Qwik •Qwik was initiated by Miško Hevery (Angular.js) • It’s a new take on how to build web applications • The big idea is resumability and the avoidance of hydration 13
  • 34.
    Resumability in Qwik •Qwik was initiated by Miško Hevery (Angular.js) • It’s a new take on how to build web applications • The big idea is resumability and the avoidance of hydration • In other words, Qwik serializes the application/framework state into HTML when rendering the application 13
  • 35.
    Resumability in Qwik •Qwik was initiated by Miško Hevery (Angular.js) • It’s a new take on how to build web applications • The big idea is resumability and the avoidance of hydration • In other words, Qwik serializes the application/framework state into HTML when rendering the application • It leverages JSX but implements state via reactive bindings and avoids component re-rendering 13
  • 36.
  • 37.
    JSON as abuilding block
  • 38.
    Gustwind - SSGdriven by JSON • Earlier solution of mine (Antwar) started showing its age 14
  • 39.
    Gustwind - SSGdriven by JSON • Earlier solution of mine (Antwar) started showing its age • I also wanted to learn to use Deno 14
  • 40.
    Gustwind - SSGdriven by JSON • Earlier solution of mine (Antwar) started showing its age • I also wanted to learn to use Deno • As a result, I started playing around with ideas and came up with Gustwind 14
  • 41.
    Gustwind - Designprinciples • Built entirely around JSON definitions (routes, components) and distilled to a bare minimum 15
  • 42.
    Gustwind - Designprinciples • Built entirely around JSON definitions (routes, components) and distilled to a bare minimum • Went with Twind for styling and Sidewind for state (both are loosely coupled) 15
  • 43.
    Gustwind - Designprinciples • Built entirely around JSON definitions (routes, components) and distilled to a bare minimum • Went with Twind for styling and Sidewind for state (both are loosely coupled) • Side effect - it’s possible to write editors on top of it 15
  • 44.
    Gustwind - Designprinciples • Built entirely around JSON definitions (routes, components) and distilled to a bare minimum • Went with Twind for styling and Sidewind for state (both are loosely coupled) • Side effect - it’s possible to write editors on top of it • Also reasonably fast and parallelized 15
  • 45.
    Breezewind - Templating •Breezewind forms the core of the component system 16
  • 46.
    Breezewind - Templating •Breezewind forms the core of the component system • It has been heavily inspired by the semantics of React (context, props, etc.) 16
  • 47.
    Breezewind - Templating •Breezewind forms the core of the component system • It has been heavily inspired by the semantics of React (context, props, etc.) • Think of it as an extensible JSON to HTML/XML transformer 16
  • 48.
    Breezewind - Templating •Breezewind forms the core of the component system • It has been heavily inspired by the semantics of React (context, props, etc.) • Think of it as an extensible JSON to HTML/XML transformer • Designed to run on top of Cloudflare Workers (no eval) 16
  • 49.
  • 50.
  • 51.
    What to expectin the coming years • Exploration of shipping less JavaScript to the client and being smarter about it 17
  • 52.
    What to expectin the coming years • Exploration of shipping less JavaScript to the client and being smarter about it • More edge-oriented solutions 17
  • 53.
    What to expectin the coming years • Exploration of shipping less JavaScript to the client and being smarter about it • More edge-oriented solutions • Frontend meets backend in unexpected ways 17
  • 54.
    What to expectin the coming years • Exploration of shipping less JavaScript to the client and being smarter about it • More edge-oriented solutions • Frontend meets backend in unexpected ways • SSGs with more user and designer-focused features (think editing UIs on the web) 17
  • 55.
    What to expectin the coming years • Exploration of shipping less JavaScript to the client and being smarter about it • More edge-oriented solutions • Frontend meets backend in unexpected ways • SSGs with more user and designer-focused features (think editing UIs on the web) • AI and machine learning-driven tools (variant generation etc.) 17
  • 56.
    Thank you! Timefor your questions 17
  • 57.
    References i Etsy engineering:Mobius: Adopting jsx while prioritizing user experience, 2021. CARNIATO, R. Understanding transitional javascript apps, Nov 2021. GUSTAFSON, A., OVERKAMP, L., BROSSET, P., PRATER, S. V., WILLS, M., AND PENZEYMOOG, E. Understanding progressive enhancement, Oct 2008. HARRIS, R. Have single-page apps ruined the web?, Oct 2021. MILLER, J. Islands architecture, 2020.
  • 58.
    References ii SHI, W.,CAO, J., ZHANG, Q., LI, Y., AND XU, L. Edge computing: Vision and challenges. IEEE internet of things journal 3, 5 (2016), 637–646. TEAM, T. P. Islands architecture, Oct 2021.