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
960
健康を取りもどすために 私がやった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.3k
社内でチーム作ってMashup Awards出た #dodosoft
okohs
0
87
全社員早押上司争奪戦 #MA_2016
okohs
0
1.1k
Other Decks in Technology
See All in Technology
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
200
CDKのコードレビューを楽にするパッケージcdk-mentorを作ってみた/cdk-mentor
tomoki10
0
210
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
160
Formal Development of Operating Systems in Rust
riru
1
420
GeometryReaderやスクロールを用いた表現と紐解き方
fumiyasac0921
0
100
ABWGのRe:Cap!
hm5ug
1
120
技術に触れたり、顔を出そう
maruto
1
150
機械学習を「社会実装」するということ 2025年版 / Social Implementation of Machine Learning 2025 Version
moepy_stats
5
970
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
240
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
580
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Designing Experiences People Love
moore
139
23k
BBQ
matthewcrist
85
9.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
The Language of Interfaces
destraynor
155
24k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
GitHub's CSS Performance
jonrohan
1030
460k
KATA
mclloyd
29
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Speed Design
sergeychernyshev
25
740
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
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͡ΊͷҰา