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
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
3
a11y testing: tech talk
pinussilvestrus
0
2
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
36
a11y testing
pinussilvestrus
0
81
Taking Templates to the Limit
pinussilvestrus
0
42
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
63
Automatic a11y testing with axe
pinussilvestrus
0
26
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
18
How to break down
pinussilvestrus
0
39
Other Decks in Programming
See All in Programming
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.9k
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
280
アルテニア コンサル/ITエンジニア向け 採用ピッチ資料
altenir
0
110
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
870
AI Agents: How Do They Work and How to Build Them @ Shift 2025
slobodan
0
100
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
290
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
310
rage against annotate_predecessor
junk0612
0
170
OSS開発者という働き方
andpad
5
1.7k
Cache Me If You Can
ryunen344
2
3.1k
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
230
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Invisible Side of Design
smashingmag
301
51k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Navigating Team Friction
lara
189
15k
How STYLIGHT went responsive
nonsquared
100
5.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Balancing Empowerment & Direction
lara
3
620
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Done Done
chrislema
185
16k
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