SlideShare a Scribd company logo
1 of 34
Download to read offline
Un-Framework
Delivering Dynamic Experiences with HTML over the Wire
Andreas Nedbal / T3DD23
About Me
Andreas Nedbal
Senior Frontend Developer @ in2code
TYPO3 Core Merger: Backend UX
TYPO3camp Munich Organizer
<template>
<ul id="entries">
<li v-for="item in items">
{{ item }}
</li>
</ul>
<button @click="fetchNextPage">Next Page</button>
</template>
<script>
const items = ref([])
function fetchNextPage() {
fetch('/endpoint').then((res) => {
items.value = items.value.concat(res.body)
})
}
</script>
function fetchNextPage() {
fetch('/endpoint').then(res => {
$('#entries').append(res.html);
})
}
<a href="/endpoint?page=2">Next Page</a>
Frontend is hard
Node
Toolchains
Which npm packages do I need?
All those frameworks
Vite
Webpack
Rollup
React Vue
Svelte
Which are safe?
Which Node version do I need?
Switching versions for projects
Turbo Drive
Previously known as “Turbolinks” in the Rails world.
Turns a page into an “SPA” by replacing all regular page loads with AJAX.
Previous pages are cached, so perceived performance is way faster.
Turbo Frames
Turbo Frames allow pages to be decomposed into smaller components that
capture form actions and navigation.
Navigating inside a <turbo-frame id=”idName”> will check the target
response for a matching <turbo-frame> tag and only replace it’s contents with
the current tag present.
Turbo Streams
Actually meant for streaming over websockets, you can also use this as
responses from any web request.
Turbo will listen to responses using the text/vnd.turbo-stream.html
content-type and execute actions based on <turbo-stream> tags present.
Demonstration
Problems with the Turbo approach
Porting an existing site using a lot of JS already is not recommended.
Pages using Turbo don’t fire the load event anymore (or well, only once) since
page navigation is happening over AJAX.
This requires massive refactoring/rethinking of an application.
Controllers
Classes that contain functionality for sites using actions, targets and values in
HTML.
Controllers don’t require event listeners to be initialized, this happens
automatically as soon as a matching data-controller attribute is found on the
page or even asynchronously loaded.
<div data-controller="hello">
<input data-hello-target="name" type="text">
<button data-action="click->hello#greet">
Greet
</button>
<span data-hello-target="output">
</span>
</div>
import { Controller } from "stimulus"
export default class extends Controller {
static targets = [ "name", "output" ]
greet() {
this.outputTarget.textContent =
`Hello, ${this.nameTarget.value}!`
}
}
Actions
Allow to call controller methods from HTML using data-action attributes.
Example:
<button data-action=”click->example#action”>
Would call the action() method on ExampleController on a button click.
The default interaction of an element can also be omitted, so the above can be
shortened to:
<button data-action=”example#action”>
<div data-controller="hello">
<input data-hello-target="name" type="text">
<button data-action="click->hello#greet">
Greet
</button>
<span data-hello-target="output">
</span>
</div>
import { Controller } from "stimulus"
export default class extends Controller {
static targets = [ "name", "output" ]
greet() {
this.outputTarget.textContent =
`Hello, ${this.nameTarget.value}!`
}
}
Targets
Allow to define targets via HTML that can be accessed inside controllers as an
alternative to selecting them via queries.
The names of targets need to be defined in a static array in the controller.
Example:
<div data-controller=”test” data-test-target=”root”>
The element would be accessible as this.rootTarget in the controller class.
<div data-controller="hello">
<input data-hello-target="name" type="text">
<button data-action="click->hello#greet">
Greet
</button>
<span data-hello-target="output">
</span>
</div>
import { Controller } from "stimulus"
export default class extends Controller {
static targets = [ "name", "output" ]
greet() {
this.outputTarget.textContent =
`Hello, ${this.nameTarget.value}!`
}
}
Values
Allow to specify values in HTML that can be used inside controllers using the
specified value name.
The names of values need to be defined in a static array in the controller.
Example:
<div data-controller=”test” data-test-example-value=”Hello World”>
this.exampleValue would resolve to “Hello World” in TestController.
Demonstration
Who is using Hotwire?
Integrations
Rails
Turbo Rails
bundle install turbo-rails
Laravel
Turbo Laravel
composer require hotwired/turbo-laravel
Symfony
Symfony UX Turbo
composer require symfony/ux-turbo
TYPO3
TYPO3 Extension “Topwire”
Find out more about it right at the next talk in Room IONOS
Past, Present and Future of creating server side rendered interactive websites
with TYPO3
by Helmut Hummel
Questions?
Thanks for listening!
Hope you enjoyed this talk :)
Feedback? Want to chat?
Fediverse (Mastodon/…):
@pixel@desu.social
Twitter:
@pixeldesu
TYPO3 Slack:
@pixeldesu

More Related Content

What's hot

Senso de Utilização e Limpeza
Senso de Utilização e LimpezaSenso de Utilização e Limpeza
Senso de Utilização e LimpezaCamila Oliveira
 
Estratégia de vendas
Estratégia de vendas Estratégia de vendas
Estratégia de vendas Carlos Rocha
 
5 técnicas de abordagens de vendas externas
5 técnicas de abordagens de vendas externas 5 técnicas de abordagens de vendas externas
5 técnicas de abordagens de vendas externas Agendor
 
Improving Cost to-Serve and Maximizing Sales and Margins
Improving Cost to-Serve and Maximizing Sales and MarginsImproving Cost to-Serve and Maximizing Sales and Margins
Improving Cost to-Serve and Maximizing Sales and MarginsHalo BI
 
Movimentacao de Materiais
Movimentacao de MateriaisMovimentacao de Materiais
Movimentacao de Materiaisazevedoac
 
Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...
Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...
Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...Alessio Alionço
 
Apresentacao koppert - Rsh Agricola
Apresentacao koppert - Rsh AgricolaApresentacao koppert - Rsh Agricola
Apresentacao koppert - Rsh Agricolaweversonlima
 
Treinamento atendimento, vendas e fechamento
Treinamento atendimento, vendas e fechamentoTreinamento atendimento, vendas e fechamento
Treinamento atendimento, vendas e fechamentotrainertek
 
Plantas daninhas e seu controle
Plantas daninhas e seu controlePlantas daninhas e seu controle
Plantas daninhas e seu controleGeagra UFG
 
ApresentaçãO Do Departamento De Suprimentos E LogíStica
ApresentaçãO Do Departamento De Suprimentos E LogíSticaApresentaçãO Do Departamento De Suprimentos E LogíStica
ApresentaçãO Do Departamento De Suprimentos E LogíSticaCaio Marin
 
Introdução de Kanban para Equipes Scrum
Introdução de Kanban para Equipes ScrumIntrodução de Kanban para Equipes Scrum
Introdução de Kanban para Equipes ScrumCamilo Almendra
 
73819802 guia-rapido-de-pcm
73819802 guia-rapido-de-pcm73819802 guia-rapido-de-pcm
73819802 guia-rapido-de-pcmricardotortora
 
Apostila (técnicas de vendas)
Apostila (técnicas de vendas)Apostila (técnicas de vendas)
Apostila (técnicas de vendas)drifrutal
 

What's hot (20)

Processo de vendas - Etapas
Processo de vendas - EtapasProcesso de vendas - Etapas
Processo de vendas - Etapas
 
Senso de Utilização e Limpeza
Senso de Utilização e LimpezaSenso de Utilização e Limpeza
Senso de Utilização e Limpeza
 
Estratégia de vendas
Estratégia de vendas Estratégia de vendas
Estratégia de vendas
 
5 técnicas de abordagens de vendas externas
5 técnicas de abordagens de vendas externas 5 técnicas de abordagens de vendas externas
5 técnicas de abordagens de vendas externas
 
Improving Cost to-Serve and Maximizing Sales and Margins
Improving Cost to-Serve and Maximizing Sales and MarginsImproving Cost to-Serve and Maximizing Sales and Margins
Improving Cost to-Serve and Maximizing Sales and Margins
 
Movimentacao de Materiais
Movimentacao de MateriaisMovimentacao de Materiais
Movimentacao de Materiais
 
Aula 4 - Projeto de Fábrica e Layout
Aula 4 - Projeto de Fábrica e Layout Aula 4 - Projeto de Fábrica e Layout
Aula 4 - Projeto de Fábrica e Layout
 
Slide Aula 2.pptx
Slide Aula 2.pptxSlide Aula 2.pptx
Slide Aula 2.pptx
 
Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...
Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...
Curso de Vendas e Negociação Completo - Do planejamento ao follow-up. E-book ...
 
Apresentacao koppert - Rsh Agricola
Apresentacao koppert - Rsh AgricolaApresentacao koppert - Rsh Agricola
Apresentacao koppert - Rsh Agricola
 
Treinamento atendimento, vendas e fechamento
Treinamento atendimento, vendas e fechamentoTreinamento atendimento, vendas e fechamento
Treinamento atendimento, vendas e fechamento
 
Adapta sertao kifnet 5
Adapta sertao kifnet 5Adapta sertao kifnet 5
Adapta sertao kifnet 5
 
Plantas daninhas e seu controle
Plantas daninhas e seu controlePlantas daninhas e seu controle
Plantas daninhas e seu controle
 
ApresentaçãO Do Departamento De Suprimentos E LogíStica
ApresentaçãO Do Departamento De Suprimentos E LogíSticaApresentaçãO Do Departamento De Suprimentos E LogíStica
ApresentaçãO Do Departamento De Suprimentos E LogíStica
 
Introdução de Kanban para Equipes Scrum
Introdução de Kanban para Equipes ScrumIntrodução de Kanban para Equipes Scrum
Introdução de Kanban para Equipes Scrum
 
73819802 guia-rapido-de-pcm
73819802 guia-rapido-de-pcm73819802 guia-rapido-de-pcm
73819802 guia-rapido-de-pcm
 
Gestão de compras
Gestão de comprasGestão de compras
Gestão de compras
 
Indicadores de Desempenho na Conferência de Recebimento e Expedição
Indicadores de Desempenho na Conferência de Recebimento e ExpediçãoIndicadores de Desempenho na Conferência de Recebimento e Expedição
Indicadores de Desempenho na Conferência de Recebimento e Expedição
 
Vendas
VendasVendas
Vendas
 
Apostila (técnicas de vendas)
Apostila (técnicas de vendas)Apostila (técnicas de vendas)
Apostila (técnicas de vendas)
 

Similar to Un-Framework - Delivering Dynamic Experiences with HTML over the Wire

HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and ImprovedTimothy Fisher
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJSEdi Santoso
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Ontico
 
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]Eleanor McHugh
 
Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and SymfonyIgnacio Martín
 
Web components with Angular
Web components with AngularWeb components with Angular
Web components with AngularAna Cidre
 
PrimeNG - Components para la Vida Real
PrimeNG - Components para la Vida RealPrimeNG - Components para la Vida Real
PrimeNG - Components para la Vida Realcagataycivici
 
Hidden Docs in Angular
Hidden Docs in AngularHidden Docs in Angular
Hidden Docs in AngularYadong Xie
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"GeeksLab Odessa
 
Technical Preview: The New Shopware Admin
Technical Preview: The New Shopware AdminTechnical Preview: The New Shopware Admin
Technical Preview: The New Shopware AdminPhilipp Schuch
 
Devoxx 2014-webComponents
Devoxx 2014-webComponentsDevoxx 2014-webComponents
Devoxx 2014-webComponentsCyril Balit
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentspsstoev
 
Building a js widget
Building a js widgetBuilding a js widget
Building a js widgetTudor Barbu
 
Introduction to React and MobX
Introduction to React and MobXIntroduction to React and MobX
Introduction to React and MobXAnjali Chawla
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular UJoonas Lehtinen
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMohammad Shaker
 

Similar to Un-Framework - Delivering Dynamic Experiences with HTML over the Wire (20)

HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJS
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
 
Client Web
Client WebClient Web
Client Web
 
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
 
Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and Symfony
 
Web components with Angular
Web components with AngularWeb components with Angular
Web components with Angular
 
practical9.pptx
practical9.pptxpractical9.pptx
practical9.pptx
 
PrimeNG - Components para la Vida Real
PrimeNG - Components para la Vida RealPrimeNG - Components para la Vida Real
PrimeNG - Components para la Vida Real
 
Web 5 | JavaScript Events
Web 5 | JavaScript EventsWeb 5 | JavaScript Events
Web 5 | JavaScript Events
 
Hidden Docs in Angular
Hidden Docs in AngularHidden Docs in Angular
Hidden Docs in Angular
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
 
Technical Preview: The New Shopware Admin
Technical Preview: The New Shopware AdminTechnical Preview: The New Shopware Admin
Technical Preview: The New Shopware Admin
 
Devoxx 2014-webComponents
Devoxx 2014-webComponentsDevoxx 2014-webComponents
Devoxx 2014-webComponents
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web components
 
Building a js widget
Building a js widgetBuilding a js widget
Building a js widget
 
Capstone ms2
Capstone ms2Capstone ms2
Capstone ms2
 
Introduction to React and MobX
Introduction to React and MobXIntroduction to React and MobX
Introduction to React and MobX
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
 

Recently uploaded

Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfkalichargn70th171
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit MilanNeo4j
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfkalichargn70th171
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...OnePlan Solutions
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfSrushith Repakula
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Maxim Salnikov
 
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with GraphGraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with GraphNeo4j
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Henry Schreiner
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdftimtebeek1
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In sowetokasambamuno
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...naitiksharma1124
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...Neo4j
 

Recently uploaded (20)

Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdf
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with GraphGraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 

Un-Framework - Delivering Dynamic Experiences with HTML over the Wire

  • 1. Un-Framework Delivering Dynamic Experiences with HTML over the Wire Andreas Nedbal / T3DD23
  • 2. About Me Andreas Nedbal Senior Frontend Developer @ in2code TYPO3 Core Merger: Backend UX TYPO3camp Munich Organizer
  • 3. <template> <ul id="entries"> <li v-for="item in items"> {{ item }} </li> </ul> <button @click="fetchNextPage">Next Page</button> </template> <script> const items = ref([]) function fetchNextPage() { fetch('/endpoint').then((res) => { items.value = items.value.concat(res.body) }) } </script>
  • 4. function fetchNextPage() { fetch('/endpoint').then(res => { $('#entries').append(res.html); }) }
  • 6. Frontend is hard Node Toolchains Which npm packages do I need? All those frameworks Vite Webpack Rollup React Vue Svelte Which are safe? Which Node version do I need? Switching versions for projects
  • 7.
  • 8.
  • 9.
  • 10. Turbo Drive Previously known as “Turbolinks” in the Rails world. Turns a page into an “SPA” by replacing all regular page loads with AJAX. Previous pages are cached, so perceived performance is way faster.
  • 11. Turbo Frames Turbo Frames allow pages to be decomposed into smaller components that capture form actions and navigation. Navigating inside a <turbo-frame id=”idName”> will check the target response for a matching <turbo-frame> tag and only replace it’s contents with the current tag present.
  • 12. Turbo Streams Actually meant for streaming over websockets, you can also use this as responses from any web request. Turbo will listen to responses using the text/vnd.turbo-stream.html content-type and execute actions based on <turbo-stream> tags present.
  • 14. Problems with the Turbo approach Porting an existing site using a lot of JS already is not recommended. Pages using Turbo don’t fire the load event anymore (or well, only once) since page navigation is happening over AJAX. This requires massive refactoring/rethinking of an application.
  • 15.
  • 16. Controllers Classes that contain functionality for sites using actions, targets and values in HTML. Controllers don’t require event listeners to be initialized, this happens automatically as soon as a matching data-controller attribute is found on the page or even asynchronously loaded.
  • 17. <div data-controller="hello"> <input data-hello-target="name" type="text"> <button data-action="click->hello#greet"> Greet </button> <span data-hello-target="output"> </span> </div>
  • 18. import { Controller } from "stimulus" export default class extends Controller { static targets = [ "name", "output" ] greet() { this.outputTarget.textContent = `Hello, ${this.nameTarget.value}!` } }
  • 19. Actions Allow to call controller methods from HTML using data-action attributes. Example: <button data-action=”click->example#action”> Would call the action() method on ExampleController on a button click. The default interaction of an element can also be omitted, so the above can be shortened to: <button data-action=”example#action”>
  • 20. <div data-controller="hello"> <input data-hello-target="name" type="text"> <button data-action="click->hello#greet"> Greet </button> <span data-hello-target="output"> </span> </div>
  • 21. import { Controller } from "stimulus" export default class extends Controller { static targets = [ "name", "output" ] greet() { this.outputTarget.textContent = `Hello, ${this.nameTarget.value}!` } }
  • 22. Targets Allow to define targets via HTML that can be accessed inside controllers as an alternative to selecting them via queries. The names of targets need to be defined in a static array in the controller. Example: <div data-controller=”test” data-test-target=”root”> The element would be accessible as this.rootTarget in the controller class.
  • 23. <div data-controller="hello"> <input data-hello-target="name" type="text"> <button data-action="click->hello#greet"> Greet </button> <span data-hello-target="output"> </span> </div>
  • 24. import { Controller } from "stimulus" export default class extends Controller { static targets = [ "name", "output" ] greet() { this.outputTarget.textContent = `Hello, ${this.nameTarget.value}!` } }
  • 25. Values Allow to specify values in HTML that can be used inside controllers using the specified value name. The names of values need to be defined in a static array in the controller. Example: <div data-controller=”test” data-test-example-value=”Hello World”> this.exampleValue would resolve to “Hello World” in TestController.
  • 27. Who is using Hotwire?
  • 30. Laravel Turbo Laravel composer require hotwired/turbo-laravel
  • 31. Symfony Symfony UX Turbo composer require symfony/ux-turbo
  • 32. TYPO3 TYPO3 Extension “Topwire” Find out more about it right at the next talk in Room IONOS Past, Present and Future of creating server side rendered interactive websites with TYPO3 by Helmut Hummel
  • 34. Thanks for listening! Hope you enjoyed this talk :) Feedback? Want to chat? Fediverse (Mastodon/…): @pixel@desu.social Twitter: @pixeldesu TYPO3 Slack: @pixeldesu