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
300
Webフレームワークの功罪 / Advantages and considerable point of Web Frameworks
mather
0
440
LeacTion!のアップデートとプチ勉強会へのいざない / Updates of LeacTion and Petit Meetup
mather
0
460
LeacTion!について / About LeacTion!
mather
0
320
Rubyでワンライナー / One-liner on Ruby
mather
0
450
認知と思考パターン / Cognition and Pattern
mather
1
270
「モデル」を考える / Think about "model"
mather
0
370
Shall we make a speech?
mather
0
230
Elmでライフゲーム / LifeGame in Elm
mather
1
1k
Other Decks in Programming
See All in Programming
開発者フレンドリーで顧客も満足?Platformの秘密
algoartis
0
200
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
240
By the way Google Cloud Next 2025に行ってみてどうだった
ymd65536
0
120
Making TCPSocket.new "Happy"!
coe401_
1
3.3k
2ヶ月で生産性2倍、お買い物アプリ「カウシェ」4チーム同時改善の取り組み
ike002jp
1
120
ComposeでWebアプリを作る技術
tbsten
0
130
note の Elasticsearch 更新系を支える技術
tchov
9
3.5k
RuboCop: Modularity and AST Insights
koic
3
2.6k
Storybookの情報をMCPサーバー化する
shota_tech
2
870
実践Webフロントパフォーマンスチューニング
cp20
45
10k
Laravel × Clean Architecture
bumptakayuki
PRO
0
150
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
8
3.3k
Featured
See All Featured
Faster Mobile Websites
deanohume
306
31k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Optimising Largest Contentful Paint
csswizardry
37
3.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
33k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
560
Code Review Best Practice
trishagee
67
18k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
120
52k
BBQ
matthewcrist
88
9.6k
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Λࢀ ߟʹ͍ͯ͠Δ
ঢ়ଶΛѲͯ͠·͔͢ʁ • Β͵ؒʹ૿͑Δϑϥά • ঢ়ଶύλʔϯͷݟམͱ͠ɾෆ߹ • ͦΕɺؔܕͷߟ͑ํͰ͍͚·͢Αʁ • ඞཁͳঢ়ଶΛߜΓࠐΉ •
ঢ়ଶ͔ΒΛऔΓग़͢Α͏ʹ͢Δ
͋Γ͕ͱ͏͍͟͝·ͨ͠