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
8
a11y testing: tech talk
pinussilvestrus
0
5
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
49
a11y testing
pinussilvestrus
0
86
Taking Templates to the Limit
pinussilvestrus
0
55
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
70
Automatic a11y testing with axe
pinussilvestrus
0
40
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
22
How to break down
pinussilvestrus
0
55
Other Decks in Programming
See All in Programming
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
320
あなたはユーザーではない #PdENight
kajitack
4
300
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
160
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.5k
CSC307 Lecture 14
javiergs
PRO
0
450
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
320
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
180
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
160
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
7.9k
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
160
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
210
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
110
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
350
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
370
Designing Experiences People Love
moore
143
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Evolving SEO for Evolving Search Engines
ryanjones
0
150
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
620
What's in a price? How to price your products and services
michaelherold
247
13k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
130
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
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