Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
What I learned from using Svelte for the demos
Search
Niklas Kiefer
March 17, 2020
Programming
250
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
What I learned from using Svelte for the demos
Modeling Lightning Talk ⚡️
Niklas Kiefer
March 17, 2020
Transcript
14 slides
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
More Decks by Niklas Kiefer
See All by Niklas Kiefer
Optimizing tidy: Practical Insights with the React Compiler
pinussilvestrus
0
28
a11y testing: tech talk
pinussilvestrus
0
17
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
68
a11y testing
pinussilvestrus
0
99
Taking Templates to the Limit
pinussilvestrus
0
74
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
88
Automatic a11y testing with axe
pinussilvestrus
0
53
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
30
How to break down
pinussilvestrus
0
80
Other Decks in Programming
See All in Programming
GraphQL の onError と Nullability のこれから
quramy
0
220
Getting Started with Vibe Coding
miccheng
0
230
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
120
LLM 101
dalinaum
0
500
オーケストレーション記述言語 Katari
yukikurage
0
260
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
170
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6k
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
770
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
210
SODA - FACT BOOK(JP)
sodainc
1
40k
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
390
Designing for Performance
lara
612
70k
Optimising Largest Contentful Paint
csswizardry
37
4k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Music & Morning Musume
bryan
48
7.5k
It's Worth the Effort
3n
188
29k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Prompt Engineering for Job Search
mfonobong
0
590
Faster Mobile Websites
deanohume
310
32k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
1
300
Odyssey Design
rkendrick25
PRO
3
950