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
Riot and Components
Search
Tsutomu Kawamura
February 24, 2016
Programming
4
580
Riot and Components
「Riotとコンポーネント」
Tokyo Riot #1
https://www.facebook.com/events/1547987355493585/
Tsutomu Kawamura
February 24, 2016
Tweet
Share
More Decks by Tsutomu Kawamura
See All by Tsutomu Kawamura
Connect your library to the world
cognitom
0
95
JTF2018
cognitom
5
1.2k
Riot: changing on v3 and its companion tools
cognitom
0
120
LLoT Night - Riot.js
cognitom
1
920
Felt - a simple web server with the power of the future
cognitom
0
300
Riot: all about v2 to v3
cognitom
7
3.7k
Create A Small Studio in A Cafe
cognitom
2
890
Riot.js in WPD-Week
cognitom
19
11k
Cooking Automation
cognitom
1
530
Other Decks in Programming
See All in Programming
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
1k
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
110
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
270
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
430
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
CSC509 Lecture 08
javiergs
PRO
0
110
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
350
現場で役立つモデリング 超入門
masuda220
PRO
13
2.9k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Git: the NoSQL Database
bkeepers
PRO
425
64k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Measuring & Analyzing Core Web Vitals
bluesmoon
1
40
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
What's in a price? How to price your products and services
michaelherold
243
12k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Transcript
Tsutomu Kawamura @cognitom Librize LLC / OpenSource Cafe, Shimokitazawa ͱ
ίϯϙʔωϯτ ΧελϜλά
HJUIVCDPNDPHOJUPN
3FBDU 1PMZNFS 7VF 3JPU "OHVMBS ʜ 6* 'MVY 3FEVY ΄͔֤छ
͋Γ͗͢ ʜ ϑϨʔϜϫʔΫϧʔλ $44 4BTT -&44 #&. 1PTU$44 ʜ $44 3PMMVQ #SPXTFSJGZ 8FC1BDL 4ZTUFN+4 ʜ .PEVMF#VOEMFS HVMQ OQN NBLF HSVOU ʜ λεΫϥϯφʔ &4 5ZQF4DSJQU 'MPX $P⒎FF4DSJQU &4 ʜ ݴޠ &YQSFTT -PPQCBDL 3FMBZ ,PB ʜ αʔόαΠυ LBSNB SFDUBOHVMBS OJHIUNBSF ʜ ςετɾMJOU FTMJOU BWB SJPUSPVUF
3FBDU 1PMZNFS 7VF 3JPU "OHVMBS ʜ 6* 'MVY 3FEVY ΄͔֤छ
͋Γ͗͢ ʜ ϑϨʔϜϫʔΫϧʔλ $44 4BTT -&44 #&. 1PTU$44 ʜ $44 3PMMVQ #SPXTFSJGZ 8FC1BDL 4ZTUFN+4 ʜ .PEVMF#VOEMFS HVMQ OQN NBLF HSVOU ʜ λεΫϥϯφʔ &4 5ZQF4DSJQU 'MPX $P⒎FF4DSJQU &4 ʜ ݴޠ &YQSFTT -PPQCBDL 3FMBZ ,PB ʜ αʔόαΠυ LBSNB SFDUBOHVMBS OJHIUNBSF ʜ ςετɾMJOU FTMJOU BWB SJPUSPVUF ٕज़ελοΫͷதͷɺίίɻ
3JPUKTͰग़དྷΔ͜ͱ ͷجຊ <div> <header>ఱؾ</header> <ul> <li>ۭΑ͏: Ε</li> <li>ؾԹ: 10</li> <li>࣪:
30%</li> </ul> </div> <weather type=“clear” temperature=“10” humidity=“30%” />
3JPUKTͲΜͳਓ͚
ʮઆ໌ॻಡ·ͳ͍ਓʯ͚ )5.-ɾ+4ɾ$44Λɺී௨ʹཧղ͍ͯͯ͠
SJPUKTDPNQMBZ ͬͯΈΑ͏
3JPUKTɺ طଘٕज़ͰʮίϯϙʔωϯτʯΛ ࣮ݱ͢ΔͨΊͷɺ࠷γϯϓϧͳ Ξϓϩʔνɻ
ίϯϙʔωϯτͬͯͳΜͳͷ ผ໊ʮΧελϜλάʯ ͔͋ͨ৽͍͠)5.-ཁૉΛɺ ࣗͰ͖ͳΑ͏ʹఆٛͰ͖ͯ͠·͏ͳʹ͔ɻ
<nandemo-iindayo /> <div> </div>
ίϯϙʔωϯτWTςϯϓϨʔτ
ίϯϙʔωϯτ ςϯϓϨʔτ )5.-ͷมຒΊࠐΈ :&4 :&4 ΧελϜλάͱͯ͠ৼΔ͏ :&4 /0 ϏϡʔϩδοΫ ϏϡʔͷϦΞϧλΠϜมߋ
:&4 /0 ϏδωεϩδοΫ /0 /0 ίϯϙʔωϯτWTςϯϓϨʔτ ॻ͍ͪΌμϝ
“Templates separate technologies, not concerns.” ʮςϯϓϨʔτ͕Γ͚͍ͯͨͷɺ ͡Όͳٕͯ͘ज़ͩʯ
ίϯϙʔωϯτWTK2VFSZ
ίϯϙʔωϯτWTK2VFSZ )5.-͕ඳը͞ΕΔ Πϕϯτ͕ى͖Δ )5.-͕ඳը͞ΕΔ K2VFSZͰॻ͖͑Δ Πϕϯτ͕ى͖Δ
ίϯϙʔωϯτ K2VFSZ )5.-ͷѻ͍ એݴత ॻ͍ͨ·Μ· ࠩΛૢ࡞ σʔλͷྲྀΕ ετΞˠϏϡʔ جຊతʹ ͪ͝Όͪ͝Ό
ίϯϙʔωϯτWTK2VFSZ
3JPUͰͷॻ͖ํ
<weather> <header>ఱؾ</header> <ul> <li>ۭΑ͏: { types[opts.type] }</li> <li>ؾԹ: { opts.temperature
}</li> <li>࣪: { opts.humidity }</li> </ul> <sctipt> this.types = { clear: ‘Ε’ } </script> <style scoped> :scope { display: block; } </style> </weather> HTML JS CSS
<html> <body> <weather></weather> <script src=“riot.js”></script> <script src=“weather.tag” type=“tag”></script> <script> riot.mount(‘weather’,
{ type: ‘clear’, temperature: 10, humidity: ’30%’ }) </script> <body> </body> Ϛϯτ
<html> <body> <app></app> <script src=“riot.js”></script> <script src=“app.tag” type=“tag”></script> <script src=“weather.tag”
type=“tag”></script> <script> riot.mount(‘app’) </script> <body> </body> ؒϚϯτ <app> <weather type=“clear” temperature=“10” humidity=“30%” /> </app>
ैདྷͷॻ͖ํ ਫฏۀ CSS HTML JS Template Template Template
3JPUͷॻ͖ํ ਨ౷߹ CSS HTML JS Template Template Template CSS JS
CSS JS CSS JS Tag A Tag B Tag C
w ෆඞཁʹόϥ͚͍ͯͨͷ͕ɺͻͱͭʹ w )5.-ɾ+4ɾ$44ͦΕͧΕཧղ͍ͯ͠Δඞཁ͋Γ ൣғʮٕज़ʯͰͳ͘ ʮίϯϙʔωϯτʯʹ
͓ΘΓ