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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Niklas Kiefer
March 17, 2020
Programming
240
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
More Decks by Niklas Kiefer
See All by Niklas Kiefer
Optimizing tidy: Practical Insights with the React Compiler
pinussilvestrus
0
17
a11y testing: tech talk
pinussilvestrus
0
11
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
62
a11y testing
pinussilvestrus
0
91
Taking Templates to the Limit
pinussilvestrus
0
69
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
80
Automatic a11y testing with axe
pinussilvestrus
0
48
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
26
How to break down
pinussilvestrus
0
75
Other Decks in Programming
See All in Programming
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.4k
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
340
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
170
プロポーザルを書いてもらう
pvcresin
0
590
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
[DroidKaigi 26] How We Moved from Android Studio to Slack
thisaay
0
140
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
560
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
160
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
500
AWS Transform Customによる Spring Boot 2.xから4.xへのVerUp
satoshi256kbyte
2
120
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
240
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
2
910
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
3.8k
For a Future-Friendly Web
brad_frost
183
10k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
510
Into the Great Unknown - MozCon
thekraken
41
2.7k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Thoughts on Productivity
jonyablonski
76
5.3k
How to Ace a Technical Interview
jacobian
281
24k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
ラッコキーワード サービス紹介資料
rakko
1
4.7M
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
320
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