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
elmから学ぼう
Search
mather
April 04, 2016
Programming
1
250
elmから学ぼう
関数型リアクティブなフロントエンド言語であるelmの紹介
mather
April 04, 2016
Tweet
Share
More Decks by mather
See All by mather
SolidjsでLeacTion!を作り直しました / Rebuilt LeacTion! in Solid.js
mather
0
270
Webフレームワークの功罪 / Advantages and considerable point of Web Frameworks
mather
0
350
LeacTion!のアップデートとプチ勉強会へのいざない / Updates of LeacTion and Petit Meetup
mather
0
420
LeacTion!について / About LeacTion!
mather
0
310
Rubyでワンライナー / One-liner on Ruby
mather
0
410
認知と思考パターン / Cognition and Pattern
mather
1
260
「モデル」を考える / Think about "model"
mather
0
360
Shall we make a speech?
mather
0
210
Elmでライフゲーム / LifeGame in Elm
mather
1
970
Other Decks in Programming
See All in Programming
最新TCAキャッチアップ
0si43
0
140
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
Remix on Hono on Cloudflare Workers
yusukebe
1
290
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
cmp.Or に感動した
otakakot
2
140
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
CSC509 Lecture 12
javiergs
PRO
0
160
Jakarta EE meets AI
ivargrimstad
0
530
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Automating Front-end Workflow
addyosmani
1366
200k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Faster Mobile Websites
deanohume
305
30k
Docker and Python
trallard
40
3.1k
Agile that works and the tools we love
rasmusluckow
327
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
It's Worth the Effort
3n
183
27k
Transcript
elm͔Βֶ΅͏ 2016/04/02 ܂ാ ӳࢿ #satoimo
ࣗݾհ • ܂ാ ӳࢿ (32) • גࣜձࣾΞϥλφ • ීஈόοΫΤϯυͬͯ·͢ •
Scalaͱ͔Haskellͱ͔ • ΧϝϥͱεΩϡʔόμΠϏϯά͕झຯ
ࠓͷ༰ • elmͷհ • σϞ • ؔܕͱϦΞΫςΟϒ • ·ͱΊ
elm
elm • http://elm-lang.org/ • ·ͩൃల్্(ݱࡏver. 0.16.0)ͳݴޠ • ؔܕϦΞΫςΟϒͳϑϩϯτΤϯυݴޠ • HTML,
JavaScript(, CSS)Λੜ͢Δ • HaskellϥΠΫͳهड़͕Ͱ͖Δ
લஔ͖ • elm·࣮ͩ༻తͳஈ֊Ͱ͋Γ·ͤΜ • elm͕͑ͳͯ͘ྑ͍Ͱ͢ • Τοηϯε͚ͩͳΜͱͳ͘Θ͔ͬͯ͘ΕΔͱ͋ Γ͕͍ͨͰ͢(^_^ʎ
σϞ
TodoMVC (ެࣜσϞ)
ྃͨ͠λεΫΛআ ະྃͷλεΫ ͲͷλεΫ͕ݟΕΔঢ়ଶ͔ʁ λεΫ ྃͨ͠ʁ λεΫϦετ
ؔܕͱϦΞΫςΟϒ
ঢ়ଶͷͱෳࡶ͞ • ཧ͢Δঢ়ଶͷ͕ଟ͍ˠෳࡶʹͳΔ • ϑϥάͷཧɺදࣔ༻ͷɺetc… • ࣮ࡍʹผͷঢ়ଶʹґଘ͍ͯ͠Δ͜ͱ • ґଘ͍ͯ͠Δͣͷঢ়ଶ͕ಉظ࿙Εˠόά •
ෳͷঢ়ଶΛಉظ͢ΔͨΊͷίʔυ͕૿͑Δ
ґଘ͍ͯ͠Δͣͷঢ়ଶ var str = “hoge”; var len = str.length; var
str = “fugafuga”; if (str.length === len) { // 正常 } else { // 例外処理!? }
ཧ͢Δঢ়ଶΛ࠷খݶʹ͢Δ ΞϓϦέʔγϣϯͷ શͯͷঢ়ଶ ҰͭͷλεΫͷ ঢ়ଶ
ঢ়ଶ͔ΒΛಋ͘ λεΫϦετΛ༩͑Δͱʜ ඞཁͳΛλεΫϦετ͔Β ಋ͖ग़ͯ͠ʜ )5.-Λॻ͖ग़͢ ؔܕ 'VODUJPOBM
ΞΫγϣϯͷͨͼʹ࣍ͷঢ়ଶ "DUJPOΛड͚ͯࠓͷঢ়ଶ͔Β ৽͍͠ঢ়ଶ ʢߋ৽͠ͳ͍ʣ
ΞΫγϣϯܾΊ͓ͯ͘
Ͳ͏ͬͯߋ৽͢Δʁ .PEFM .PEFM .PEFM λεΫՃ λεΫྃ ྃࡁΈ λεΫআ ೖྗ͞ΕͨΞΫγϣϯʹ Ԡͯ͠৽͍͠ঢ়ଶʹ͢Δ
ʹϦΞΫςΟϒ(Reactive)
·ͱΊ
ϦΞΫςΟϒདྷͯ·͢ • ϦΞΫςΟϒͩΜͩΜਁಁ͖ͯͨ͠ • React.jsͱͦͷϑϨʔϜϫʔΫ(Flux) • FluxϑϨʔϜϫʔΫͷҰͭReduxelmΛࢀ ߟʹ͍ͯ͠Δ
ঢ়ଶΛѲͯ͠·͔͢ʁ • Β͵ؒʹ૿͑Δϑϥά • ঢ়ଶύλʔϯͷݟམͱ͠ɾෆ߹ • ͦΕɺؔܕͷߟ͑ํͰ͍͚·͢Αʁ • ඞཁͳঢ়ଶΛߜΓࠐΉ •
ঢ়ଶ͔ΒΛऔΓग़͢Α͏ʹ͢Δ
͋Γ͕ͱ͏͍͟͝·ͨ͠