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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Niklas Kiefer
March 17, 2020
Programming
1
220
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
Optimizing tidy: Practical Insights with the React Compiler
pinussilvestrus
0
8
a11y testing: tech talk
pinussilvestrus
0
5
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
47
a11y testing
pinussilvestrus
0
83
Taking Templates to the Limit
pinussilvestrus
0
51
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
68
Automatic a11y testing with axe
pinussilvestrus
0
37
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
22
How to break down
pinussilvestrus
0
53
Other Decks in Programming
See All in Programming
Fluid Templating in TYPO3 14
s2b
0
130
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
660
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
dchart: charts from deck markup
ajstarks
3
1k
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
AI巻き込み型コードレビューのススメ
nealle
2
1.3k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
610
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
470
2026年 エンジニアリング自己学習法
yumechi
0
140
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
120
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
260
The World Runs on Bad Software
bkeepers
PRO
72
12k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
150
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
54
The Art of Programming - Codeland 2020
erikaheidi
57
14k
sira's awesome portfolio website redesign presentation
elsirapls
0
150
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Being A Developer After 40
akosma
91
590k
The browser strikes back
jonoalderson
0
420
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
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