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
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
31
a11y testing
pinussilvestrus
0
79
Taking Templates to the Limit
pinussilvestrus
0
40
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
61
Automatic a11y testing with axe
pinussilvestrus
0
20
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
17
How to break down
pinussilvestrus
0
28
Move from webpack to vite
pinussilvestrus
0
170
JSON Schema Validation @Camunda Modeler
pinussilvestrus
0
230
Other Decks in Programming
See All in Programming
レガシーシステムの機能調査・開発におけるAI利活用
takuya_ohtonari
0
610
Datadog RUM 本番導入までの道
shinter61
1
310
C++20 射影変換
faithandbrave
0
500
Effect の双対、Coeffect
yukikurage
5
1.4k
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
330
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
160
GraphRAGの仕組みまるわかり
tosuri13
7
450
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
0
140
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
800
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
320
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
850
Featured
See All Featured
How to Ace a Technical Interview
jacobian
277
23k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Fireside Chat
paigeccino
37
3.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
Side Projects
sachag
455
42k
The Language of Interfaces
destraynor
158
25k
Become a Pro
speakerdeck
PRO
28
5.4k
Speed Design
sergeychernyshev
31
1k
Rails Girls Zürich Keynote
gr2m
94
14k
Statistics for Hackers
jakevdp
799
220k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
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