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
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
The Role of Developer Relations in AI Product Success.
giftojabu1
0
140
Engineer Career Talk
lycorp_recruit_jp
0
190
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
300
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
460
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
10
1.3k
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
170
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
190
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
How to Ace a Technical Interview
jacobian
276
23k
Bash Introduction
62gerente
608
210k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Done Done
chrislema
181
16k
BBQ
matthewcrist
85
9.3k
The Language of Interfaces
destraynor
154
24k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.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͡ΊͷҰา