Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What I learned from using Svelte for the demos
Search
Niklas Kiefer
March 17, 2020
Programming
1
200
What I learned from using Svelte for the demos
Modeling Lightning Talk ⚡️
Niklas Kiefer
March 17, 2020
Tweet
Share
More Decks by Niklas Kiefer
See All by Niklas Kiefer
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
19
a11y testing
pinussilvestrus
0
69
Taking Templates to the Limit
pinussilvestrus
0
32
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
50
Automatic a11y testing with axe
pinussilvestrus
0
11
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
14
How to break down
pinussilvestrus
0
17
Move from webpack to vite
pinussilvestrus
0
160
JSON Schema Validation @Camunda Modeler
pinussilvestrus
0
200
Other Decks in Programming
See All in Programming
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
命名をリントする
chiroruxx
1
390
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
たのしいparse.y
ydah
3
120
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
return文におけるstd::moveについて
onihusube
1
1k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Designing for Performance
lara
604
68k
Adopting Sorbet at Scale
ufuk
73
9.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Optimizing for Happiness
mojombo
376
70k
Scaling GitHub
holman
458
140k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Embracing the Ebb and Flow
colly
84
4.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Transcript
What I learned from using Svelte for the demos Modeling
Lightning Talk ⚡ Niklas Kiefer
2 Background: DRD Edit Demo
3 Background: DRD Edit Demo
4 New: Navigation + Table Layout Demo
5 New: Navigation + Table Layout Demo
6
7 Lessons Learned (1) Reactivity is - Part 1 <script>
export let view; export let activeView; </script> <div class="wrapper" style="display: {view === activeView ? 'block' : 'none'}"> {#if view === activeView} <slot/> {/if} </div>
8 Lessons Learned (2) Reactivity is - Part 2 <script>
export let tableData = {}; const HIT_POLICIES = [ /* ... */ ]; $: explanation = find( HIT_POLICIES, hp => hp.name === tableData.hitPolicy ).explanation; function changeHitPolicy(event) { const { target: { value } } = event; tableData.hitPolicy = value; } </script> <select on:change={changeHitPolicy}> {#each HIT_POLICIES as { name }} <option selected={name === tableData.hitPolicy}> {name} </option> {/each} </select> <p class="hp-explanation">{explanation}</p>
9 Lessons Learned (3) Component Templating <script> import Table from
'../../../decision-table-layout/src/components/Table.svelte'; import ArrowExpandSvg from '../../resources/arrow-expand.svg'; import './NavigationTable.scss'; const noop = () => {}; export let onViewSwitch = noop; export let tableData; </script> <div class="navigation-table"> <div class="buttons"> <span class="arrow-expand btn btn-sticky" on:click={() => onViewSwitch('split-screen')}> {@html ArrowExpandSvg} </span> <button class="edit-drd btn" on:click={() => onViewSwitch('drd')}> Edit DRD </button> </div> <Table { tableData } /> </div>
10 Lessons Learned (4) Global State <script> import data from
'../resources/data.js'; let currentTable = data['Decision_03absfl']; let view = 'drd'; </script> <Wrapper view="drd" activeView={view}> <DRD decision={currentTable.id} /> </Wrapper> <Wrapper view="split-screen" activeView={view}> <SplitScreen tableData={currentTable} /> </Wrapper>
11 Lessons Learned (5) Local Styles are equally good
12 Lessons Learned (6) Performance measures DRD Editing Demo Navigation
Demo
13 Summary Reactivity + State Management makes it way easier
to build quick demos with Svelte
Thank you