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
86
全社員早押上司争奪戦 #MA_2016
okohs
0
1.1k
Other Decks in Technology
See All in Technology
Wantedly での Datadog 活用事例
bgpat
2
1.1k
大規模言語モデルとそのソフトウェア開発に向けた応用 (2024年版)
kazato
2
390
能動的ドメイン名ライフサイクル管理のすゝめ / Practice on Active Domain Name Lifecycle Management
nttcom
0
310
.NET 9 のパフォーマンス改善
nenonaninu
0
2k
20241218_今年はSLI/SLOの導入を頑張ってました!
zepprix
0
250
AWS re:Invent 2024 ふりかえり勉強会
yhana
0
670
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
54k
OPENLOGI Company Profile for engineer
hr01
1
17k
Agentic RAG with LangGraph
atsushii
0
110
OCI技術資料 : ファイル・ストレージ 概要
ocise
3
12k
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
130
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
240
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
320
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Code Review Best Practice
trishagee
65
17k
Building Applications with DynamoDB
mza
92
6.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
540
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
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͡ΊͷҰา