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
もう知らないとは言わせない! Play Frameworkはじめの一歩 #jjug_ccc #...
Search
Shoko Okochi
May 21, 2016
Technology
4
4.3k
もう知らないとは言わせない! Play Frameworkはじめの一歩 #jjug_ccc #ccc_m62
JJUG CCC 2016 Spring 「もう知らないとは言わせない!Play Frameworkはじめの一歩」 #jjug_ccc #ccc_m62
Shoko Okochi
May 21, 2016
Tweet
Share
More Decks by Shoko Okochi
See All by Shoko Okochi
Join EDP as working member of society
okohs
0
950
健康を取りもどすために 私がやった1つのこと
okohs
1
390
stretch opportunities #wtm17
okohs
0
190
転職したら転職しやすくなった #zohyomeetup
okohs
1
490
師匠(SENSEI)を見つけよう
okohs
0
260
集中 #innocafe
okohs
0
180
全社員早押上司争奪戦 #MA_2016 #forPro決勝戦
okohs
0
1.2k
社内でチーム作ってMashup Awards出た #dodosoft
okohs
0
86
全社員早押上司争奪戦 #MA_2016
okohs
0
1.1k
Other Decks in Technology
See All in Technology
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.6k
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
2
350
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
500
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
590
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
Lambdaと地方とコミュニティ
miu_crescent
2
370
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
459
33k
What's in a price? How to price your products and services
michaelherold
243
12k
GitHub's CSS Performance
jonrohan
1030
460k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Raft: Consensus for Rubyists
vanstee
136
6.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Visualization
eitanlees
145
15k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Transcript
͏Βͳ͍ͱݴΘͤͳ͍! Play Framework͡ΊͷҰา JJUG CCC 2016 Spring #jjug_ccc #ccc_m62 ͠ΐ͜@sd_ts1017
͓Βͤ ͜ͷεϥΠυSpeakerDeckʹެ։ࡁͰ͢ɻ https://goo.gl/wQfpk4 ϝϞ͍ͨ͠ํɺݟ͑ͮΒ͍ํ దٓͦͪΒΛ֬͝ೝ͍ͩ͘͞ɻ
Who am I? • ͠ΐ͜(@sd_ts1017) • PHP(Laravel)/Scala͍ • ݩJavaΤϯδχΞ •
dots.ঁࢠ෦ एঁক • Geek Women JapanӡӦ
ࠓ͢͜ͱ 1. Play Framework ͷ֓ཁ 2. Play Framework ͷಛ 3.
ʮ͡ΊͷҰาʯΛ౿Έग़͢ 4. Spring Frameworkͱͷൺֱ
ࠓ͞ͳ͍͜ͱ 1. Play Frameworkಋೖ࣌ʹݕ౼͖͢͜ͱ 2. Play FrameworkΛಋೖͨ࣌͠ͷTips ↑ͬͱόϦόϦ࡞ͬͯΔํʹฉ͖͍ͨ
͓٬͞Μௐࠪ
ීஈ͍ͬͯΔݴޠ 1. Java 2. Scala 3. ͲͪΒͰͳ͍
Λ ͍ͬͯ·͔͢ʁ 1. ͍ͬͯΔ 2. Βͳ͍
৮ͬͨ͜ͱ͕͋Γ·͔͢ʁ 1. ͋Δ 2. ͳ͍ Λ
ࣄͰ͍ͬͯ·͔͢ʁ 1. ͍ͬͯΔ 2. ͍ͬͯͳ͍ Λ
Ͳͷ͘Β͍ཧղ͍ͯ͠·͔͢ʁ Λ 1. ʮJavaͱScala͚ϑϨʔϜϫʔΫʯͬͯҐ 2. νϡʔτϦΞϧͷϨϕϧͳΒΘ͔ΔΑ 3. Կͱͳ͘ಛΘ͔ΔΑ 4. Ұ௨Γڭ͑ΒΕ·͢Α
͋Γ͕ͱ͏͍͟͝·͢ʂ
ຊ
1.Play Frameworkͷ֓ཁ
Play Frameworkͱ • ”The High Velocity(=ߴ) Web Framework” • Java,
Scala͚WebϑϨʔϜϫʔΫ • ݱࡏͷόʔδϣϯ2.5.3 • 2007ʹZenexity͕ࣾ։ൃˠ2008/5ʹެ։ ˠݱࡏɺLightbend͕ࣾ։ൃ
ಋೖࣄྫ • Scala×Play FrameworkͰಋೖ͍ͯ͠Δ֤ࣾ
Play͍͍ͯΔਓ ✓ JVMϢʔβ ✓ ܕ҆શɾؔܕϓϩάϥϛϯάେ͖ʂ ✓ େنͳνʔϜͰ։ൃ͍ͯ͠Δ ✓ ϑϧελοΫͳϑϨʔϜϫʔΫΛٻΊ͍ͯΔ
2. Play Frameworkͷಛ
ಛ ✓ ඇಉظϓϩάϥϛϯά ✓ ܕ҆શੑͷϑΥʔΧε ✓ Java/ScalaͷωΠςΟϒαϙʔτ ✓ ڧྗͳϏϧυγεςϜ ✓
σʔλετΞͱϞσϧͷ౷߹
• PlayAkkaΛωΠςΟϒαϙʔτ • AkkaɿJava/ScalaͰར༻ՄೳͳΞΫλʔϞσ ϧΛద༻ͨ͠εέʔϥϏϦςΟোੑʹ ༏Εͨฒߦॲཧ͕ॻ͚ΔϥΠϒϥϦ • ΞΫλʔϞσϧɿฒྻ͕ߴ͍γεςϜΛѻ ͏Ϟσϧͱͯ͠ݱ࣌Ͱ࠷ྑ ඇಉظϓϩάϥϛϯά
ܕ҆શੑͷϑΥʔΧε • ίϯύΠϥ͕ίʔυͷ͋Δ෦ΛνΣοΫͰ͖Δɺ ੩తܕ͚ݴޠΛબΜͰ͍Δ • Play 2.x͔ΒScalaϕʔεͷςϯϓϨʔτΤϯδϯ Twirlʢͱ͎͋ΔʣΛ࠾༻ • શʹίϯύΠϧ͕ߦΘΕΔ͜ͱͰɺςϯϓϨʔ
τɾϧʔτϑΝΠϧͷύοέʔδԽɾ࠶ར༻͕༰ қ && ࣮ߦ࣌ͷύϑΥʔϚϯε্͕ݟࠐΊΔ
Java/ScalaͷωΠςΟϒαϙʔτ • Play 1.xJavaͷΈαϙʔτ • ScalaPlay 2.x͔Βαϙʔτɻ1.xܥ֎෦Ϟ δϡʔϧऔΓࠐΈ͕ඞཁ • ScalaωΠςΟϒαϙʔτΛཧ༝ʹ1.xܥͱ
2.xܥେ͖͘ҧ͏
ڧྗͳϏϧυγεςϜ • Play 1.xͰPythonϕʔεͷεΫϦϓτ͕ఏڙ ͞Ε͍ͯͨ • Play 2.x͔ΒSBTΛPlayʹ౷߹͠ɺΧελϚΠ ζ͕؆୯ʹͳͬͨ •
SBTಋೖʹΑΓɺ։ൃதͰϥΠϒίϯύΠϧ ϦϩʔσΟϯά͕Մೳʹʂ
σʔλετΞͱϞσϧͷ౷߹ • σʔλετΞͷϞσϧଟ༷Խ͍ͯ͠ΔͷͰ ͦΕΒΛநԽ͢Δͷ΄ͱΜͲෆՄೳ • ࠷খݶͷϔϧύʔΛఏڙ • ಛʹཁٻΛ࣋ͨͳ͍Ϣʔβʔ͚ʹRelational Database Access
Libraryͱͯ͠Ebean, JPA, AnormΛಉࠝ
3. ʮ͡ΊͷҰาʯΛ౿Έग़͢
ʮ͡ΊͷҰาʯΛ౿Έग़͢ • ͍ͬͯΔ͚ͩͰٕज़ʹ͔ͭͳ͍ʢࣗռ • ࣮ࡍʹखΛಈ͔ͯ͠ɺPlay Frameworkͷ ཧղΛਂΊ·͠ΐ͏ • ʢ͜ͷεϥΠυ௨Γʹૢ࡞͢ΕͰ͖·͢ʣ
͡ΊͷҰา 1. ʢલఏ݅ʣJDK1.8ΛΠϯετʔϧ 2. Lightened ActivatorΛΠϯετʔϧ͠ىಈ 3. Play FrameworkͷϓϩδΣΫτΛ࡞Δ 4.
ϓϩδΣΫτΛ࣮ߦ͢Δ
JavaͷόʔδϣϯΛ֬ೝ͢Δɻ java version “1.8.x_xx”ͱදࣔ͞ΕΕෆཁ JDK1.8Ҏ߱ΛΠϯετʔϧ $ java -version java version
"1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) $ java -version
Lightened ActivatorΛΠϯετʔϧ 1. Play Framework ެࣜHP͔Βμϯϩʔυ
2. μϯϩʔυͨ͠ZIPΛల։͢Δ 3. activatorΛىಈ Lightened ActivatorΛΠϯετʔϧ $ cd <ల։ͨ͠σΟϨΫτϦ>¥bin $
activator ui
4. Lightened Activator͕ىಈͨ͜͠ͱΛ֬ೝ Lightened ActivatorΛΠϯετʔϧ
σϞ ϓϩδΣΫτ࡞ͯ͠ΈΔ
1. Activatorͷࠨଆϝχϡʔ͔ΒSeedΛબ Play FrameworkͷϓϩδΣΫτΛ࡞Δ
2. Create a new appͰ“Play Java Seed”Λબ Play FrameworkͷϓϩδΣΫτΛ࡞Δ
3. Activator ͷӈԼͰదͳσΟϨΫτϦΛࢦఆ ͠ɺ“Create app”Λԡ͢ Play FrameworkͷϓϩδΣΫτΛ࡞Δ
4. ࡞͞ΕΔͷΛͭ Play FrameworkͷϓϩδΣΫτΛ࡞Δ
5. ϓϩδΣΫτ࡞ྃʂ Play FrameworkͷϓϩδΣΫτΛ࡞Δ
ϓϩδΣΫτΛ࣮ߦ͢Δ 1. ࠨଆϝχϡʔʹ͋Δ”Run”Λԡ͢
ϓϩδΣΫτΛ࣮ߦ͢Δ 2. “Run”Λԡ͢
ϓϩδΣΫτΛ࣮ߦ͢Δ 3. ࣮ߦΛ֬ೝ͢Δ
ϓϩδΣΫτΛ࣮ߦ͢Δ 4. ࣮ߦ͞Εͨ͜ͱΛ֬ೝ
Congratulations!! Congratulations!
4. Spring Frameworkͱͷൺֱ
JavaSpringͰ͢ΑͶ… • ࠓճͷJJUG CCC͚ͩͰ4ηογϣϯ͋Δ • Play2012Ҏདྷ1ηογϣϯͳ͔ͬͨ • ͦΜͳJavaΤϯδχΞʹͬͯ΄͍͠ JavaͷϑϨʔϜϫʔΫʮPlay Frameworkʯ
SpringΑΓPlay͕͓͢͢Ίͳॴ 1. ։ൃͷੜ࢈ੑ • Play։ൃதͰϦϩʔσΟϯάɾϥΠϒί ϯύΠϧ͕Մೳʂ • SpringมߋΛݟΕΔঢ়ଶʹͳΔ·Ͱʹ࣌ ֻ͕͔ؒΔ
SpringΑΓPlay͕͓͢͢Ίͳॴ 2. ϊϯϒϩοΩϯάI/O • PlayશʹϊϯϒϩοΩϯάI/OͳͷͰϚΠΫϩαʔϏ εԽʹ͍͍ͯΔ • SpringͰReactive Spring Frameworkͷจ຺Ͱϊϯϒϩ
οΩϯάI/O࣮ݱՄೳɻ • ࢀߟɿJJUG CCC 2015 FallʮReactive WebΞϓϦέʔ γϣϯ - ͦͯ͠Spring 5ʯ
SpringΑΓPlay͕͓͢͢Ίͳॴ 3. ॳ৺ऀͰೖΓ͍͢ • PlayTutorialͷγφϦΦ͕ॆ࣮͍ͯ͠Δɻ AkkaElasticSearchͳͲͱͷ࿈ܞTutorialԽ • ʮࠇ͍ը໘ۤखʯʮԿͰάάΕ͍͍͔Θ͔ Βͳ͍ʯʮͲͷϑΝΠϧͷ͜ͱΛݴ͍ͬͯΔͷ ͔Θ͔Βͳ͍ʯॳֶऀʹධͰͨ͠
Tutorial͜Μͳײ͡Ͱ͢
PlayΑΓSpring͕͓͢͢Ίͳॴ 1. ར༻ਓޱ͕ଟ͍ใ͕ଟ͍ • QiitaͷߘPlayͷ̎ഒ 2. ԼҐޓੑ͕͋Δ • Playόʔδϣϯ͝ͱʹେ෯ͳมߋ͕͔͔Δ 3.
Javaͷै͕ૣ͍
·ͱΊ
Play FrameworkͲ͏Ͱ͔͢ʁ • JavaΤϯδχΞ͕ܕ҆શΔͳΒPlay/Scala! • JavaΤϯδχΞ͕ؔܕΔͳΒPlay/Scalaʂ • ·ͣ࡞ͬͨΞϓϦͰνϡʔτϦΞϧ • ͦͷޙActivatorʹ͋ΔTutorial͔Β͖ͳ
ͷΛʢHello Akka, Play Example FormͳͲ)
Λ ͍ͬͯ·͔͢ʁ 1. ͍ͬͯΔ 2. Βͳ͍
Ͳͷ͘Β͍ཧղ͍ͯ͠·͔͢ʁ Λ 1. ʮJavaͱScala͚ϑϨʔϜϫʔΫʯͬͯҐ 2. νϡʔτϦΞϧͷϨϕϧͳΒΘ͔ΔΑ 3. Կͱͳ͘ಛΘ͔ΔΑ 4. Ұ௨Γڭ͑ΒΕ·͢Α
ࢀߟࢿྉ • http://www.slideshare.net/brikis98/nodejs-vs- play-framework-with-japanese-subtitles • http://www.slideshare.net/sifue/akka-39611889 • https://www.playframework.com/ • https://www.quora.com/What-is-the-current-
webstack-LinkedIn-uses/answer/Yevgeniy- Brikman
͡ΊͷҰาɺ ౿Έग़͠·ͤΜ͔ʁ ͏Βͳ͍ͱݴΘͤͳ͍!Play Framework͡ΊͷҰา