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
290
Webフレームワークの功罪 / Advantages and considerable point of Web Frameworks
mather
0
400
LeacTion!のアップデートとプチ勉強会へのいざない / Updates of LeacTion and Petit Meetup
mather
0
440
LeacTion!について / About LeacTion!
mather
0
310
Rubyでワンライナー / One-liner on Ruby
mather
0
430
認知と思考パターン / Cognition and Pattern
mather
1
260
「モデル」を考える / Think about "model"
mather
0
370
Shall we make a speech?
mather
0
220
Elmでライフゲーム / LifeGame in Elm
mather
1
990
Other Decks in Programming
See All in Programming
ML.NETで始める機械学習
ymd65536
0
100
もう僕は OpenAPI を書きたくない
sgash708
5
1.8k
Honoとフロントエンドの 型安全性について
yodaka
7
1.3k
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
12
4.1k
Domain-Driven Transformation
hschwentner
2
1.9k
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
560
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
38
14k
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
330
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
790
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
110
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
170
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
Automating Front-end Workflow
addyosmani
1368
200k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Building an army of robots
kneath
303
45k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Cult of Friendly URLs
andyhume
78
6.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
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Λࢀ ߟʹ͍ͯ͠Δ
ঢ়ଶΛѲͯ͠·͔͢ʁ • Β͵ؒʹ૿͑Δϑϥά • ঢ়ଶύλʔϯͷݟམͱ͠ɾෆ߹ • ͦΕɺؔܕͷߟ͑ํͰ͍͚·͢Αʁ • ඞཁͳঢ়ଶΛߜΓࠐΉ •
ঢ়ଶ͔ΒΛऔΓग़͢Α͏ʹ͢Δ
͋Γ͕ͱ͏͍͟͝·ͨ͠