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
モバイルアプリ開発の "標準"を探る #CookpadTechConf
Search
FUJI Goro
January 23, 2016
Technology
12
21k
モバイルアプリ開発の "標準"を探る #CookpadTechConf
FUJI Goro
January 23, 2016
Tweet
Share
More Decks by FUJI Goro
See All by FUJI Goro
How to Boost Your Code with WebAssembly
gfx
2
2.7k
AssemblyScriptでライブラリコードの高速化をしてみる
gfx
5
2.8k
実践TypeScriptトークバトル
gfx
1
1.1k
歴史的経緯の説明 as code
gfx
7
2.6k
Elasticsearchによる 全文検索の実装 in Rails
gfx
5
9.3k
すばらしきGraphQLのSEKAIへようこそ
gfx
20
9.1k
マルチテナント・ウェブアプリケーションの実践
gfx
14
9.4k
How to choose the ORM on Android
gfx
1
4.1k
How Do We Get Along With Static Types
gfx
5
3.3k
Other Decks in Technology
See All in Technology
入門 KRR
donkomura
0
110
LeSSはスクラムではない!?LeSSにおけるスクラムマスターの振る舞い方とは / Scrum Master Behavior in LeSS
toma_sm
0
170
Oracle Database 23ai 新機能#4 Application Continuity
oracle4engineer
PRO
0
110
I tried the newly introduced certification "Applied Skills" on Microsoft Learn
mappie_kochi
0
130
ガバメントクラウド開発と変化と成長する組織 / Organizational change and growth in developing a government cloud
kazeburo
4
730
普通の Web エンジニアのための様相論理入門 #yapcjapan / YAPC Hakodate 2024
ytaka23
5
1.3k
それでもやっぱり ExpressRoute が好き!
skmkzyk
0
230
AWSの初級者向けAI・ML資格『AWS Certified AI Practitioner』の傾向と対策/So You Want To Pass AWS Certified AI Practitioner
quiver
0
110
kube-vipとkube-proxy置き換えCiliumを積んだ究極のK3sクラスタを建てる
logica0419
4
210
AI時代のアジャイル開発(XP祭り2024版) / Agile Development in the AI Era in XPJUG
takaking22
13
3.6k
入門 バックアップ
ryuichi1208
18
6.5k
【swonet.conf_】NOCメンバーが語るSTMの実態!! ~ShowNetから若者への贈り物~
shownet
PRO
0
290
Featured
See All Featured
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
110
6.9k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
327
21k
Automating Front-end Workflow
addyosmani
1365
200k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
38
2.1k
Speed Design
sergeychernyshev
22
480
Robots, Beer and Maslow
schacon
PRO
157
8.2k
The Cult of Friendly URLs
andyhume
77
6k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Producing Creativity
orderedlist
PRO
341
39k
Transcript
ϞόΠϧΞϓϦ։ൃͷ ඪ४Λ୳Δ $PPLQBE5FDI$POG SE+BO '6+*(PSPHPSPGVKJ!DPPLQBEDPN
͡Ίʹ • ໊લ • FUJI Goro (GitHub: gfx, Twitter: @__gfx__)
• ෦ॺ • ٕज़෦ ϞόΠϧ։ൃج൫ • ۙگ • Ϛάωοτגࣜձࣾʹग़தʢ20159݄~ʣ
͜ͷτʔΫͷഎܠ • 20161݄ݱࡏɺΫοΫύουεϚϗλϒϨοτͳ ͲɺϞόΠϧͰͷΞΫηε͕աΛ͍͑ͯΔ • ͦΕΏ͑ʹϞόΠϧΞϓϦ։ൃͷن͕େ͖͘ͳͬͨ • ୯ҰͷAndroidΞϓϦɺiOSΞϓϦʹͷΈؔΘΔΤϯδ χΞ૬ରతʹগͳ͘ͳͬͨ •
ҰํͰʮΫοΫύουʯαʔϏεͷण໋͕҆͘ఆ ͯ͠։ൃɾӡ༻Ͱ͖Δ͜ͱ͕ٻΊΒΕΔ
ϞόΠϧ͔ΒͷΞΫηεͷ༁ • PC vs εϚϗ • ΞΧϯτ࣋ͪϢʔβʮεϚϗͷΈʯ͕8ׂ • ήετϢʔβͷ͏ͪʮεϚϗʯ7ׂ •
ΞϓϦ vs Σϒ • ΞΧϯτ࣋ͪϢʔβʮΞϓϦͷΈʯ͕6ׂ • ήετϢʔβͷ͏ͪʮΞϓϦʯ1ׂ
։ൃʹ͓͚Δʮඪ४ʯͱʁ • ʮඪ४తͳ։ൃʯΛʮޮՌͱίετͷόϥϯε͕Α ͘ೲಘײͷ͋Δ։ൃʯͱߟ͑Δ • ͭ·Γʮඪ४తͰͳ͍։ൃʯͱʮௐͯΘ͔Β ͳ͍ൿͷλϨ͕ଟ͘ɺཧෆਚʹײ͡Δ։ൃʯͱͳ Δ • ʮރΕٕͨज़ʯͷ͜ͱͱݶΒͳ͍ɻڥͷมԽʹ
͍͍ͭͯ͘͜ͱେࣄɻ
ΫοΫύουͷߟ͑Δ ඪ४తͳϞόΠϧΞϓϦ։ൃ w ৽ٕज़ͷಋೖ w $* 5FTU 2" w '54
৽ٕज़ͷಋೖ
͜͜Ͱ͍͏ʮ৽ٕज़ʯͱ • ϓϩάϥϛϯάݴޠʢe.g. Swiftʣ • ϑϨʔϜϫʔΫϥΠϒϥϦʢe.g. RxJavaʣ • ϓϩτίϧʢe.g. HTTP/2ʣ
• σʔλϑΥʔϚοτʢe.g. WebPʣ • ΞʔΩςΫνϟʢe.g. MVVM, Clean Architectureʣ • ͦͷଞιϑτΣΞɾαʔϏε
৽ٕज़Λಋೖ͢Δͱ͍͏͜ͱ • جຊతʹੵۃతʹ࠾༻͢Δํ • ͦΕ͕Ͳ͏͍͏Λղܾ͢Δͷ͔Λ͖ͪΜͱ໌Β ͔ʹ͢Δ͜ͱ • ʮ͏ਓಋೖऀ͚ͩʯආ͚Δ͖ࣄଶ • ৽ٕज़ಋೖͷࡍࣾษڧձϒϩάͳͲͰੵۃ
తʹܒ׆ಈΛߦͳ͍ͬͯΔ • cf. Android։ൃͰRxJavaΛνʔϜʹಋೖͨ͠
ಋೖࡁΈɾݕ౼தͷٕज़ • ಋೖࡁΈ • WebP, Shared Web Credentials, Smart Lock
for Passwords, Retrolambda, Dokumi, Pull-Request Builder • ݕ౼த • Swift, Kotlin, fastlane, Issue Tracking System, CI as a Service (Travis, CircleCI)
ྫ4XJGU • 201512݄ʹOSSԽ͞ΕͨiOS༻ͷϓϩάϥϛϯάݴޠ • ৽نͰSwiftΛͬͨΞϓϦ͋Γ • طଘͷObjective-CΛॻ͖͑ΔͷҰྫ͚ͩ͋Γ • Global Cookpad
iOS app • SwiftͷӨڹͰ࣮͞ΕͨObjective-Cͷ৽ػೳੵۃతʹ ͍ͬͯ͘ํʢͨͱ͑δΣωϦΫεʣ • AppleʹΑΓະདྷ͕ଋ͞Ε͍ͯΔ
ྫ,PUMJO • JetBrainsࣾͷ։ൃ͢ΔJVM༻ͷϓϩάϥϛϯάݴޠ • Android༻ͷϓϩάϥϛϯάݴޠͱͯ͠͞Ε͍ͯΔ • ߏจ (Java + Swift)
/ 2 ͱ͍ͬͨͱ͜Ζ • ݴޠ༷͔ͳΓΑ͘IDEͷαϙʔτे • ϥΠϯλΠϜͷϑοτϓϦϯτ1MBఔͱখ͞Ί • Javaͷࢿ࢈Λͦͷ··͑ͯίʔυྔJavaΑΓগͳ͍ • ͨͩ͜ΕʹΑͬͯʮԿΛղܾ͢Δͷ͔ʯ͖ͬΓͱ͠ͳ͍
$* 5FTU 2"
ϞόΠϧΞϓϦͷಛʢʣ • Ϣʔβʔ͕͏όʔδϣϯΛ੍ޚͰ͖ͳ͍ • Ϣʔβʔ͕ΞϓϦͷΞοϓσʔτΛ͢ΔͱݶΒͳ͍͠ɺ ࣮ࡍΞοϓσʔτΛ͠ͳ͍Ϣʔβ͍Δ • ʮΞοϓσʔτͷڧ੍ʯ͠ͳ͍ํͰ͖͍ͯΔ • Android৽͍͠ύʔϛογϣϯΛՃ͢ΔͱݦஶʹΞοϓ
σʔτ͕͕͞Δ • ύʔϛογϣϯΛՃ͢ΔͱࣗಈΞοϓσʔτ͕ޮ͔ͳ ͘ͳΔͨΊɻAndroid 6.0Ͱվળ͞Ε͕ͨະීٴ
ϞόΠϧΞϓϦͷಛʢʣ • ࣮ߦڥΛ੍ޚ͢Δ͜ͱͰ͖ͳ͍ • ͷεϖοΫ / OSͷόʔδϣϯ / ௨৴ڥ· ͪ·ͪ
• ΣϒΞϓϦΑΓࣦഊ͕ॏ͘ςετ͍͠ • ςετίʔυΣϒΞϓϦΑΓॻ͘ͷ͕͍͠ • ίʔυϨϏϡʔɾCIɾQAͳͲͷ࣭ཧ͕ॏཁ
$*+FOLJOT NVMUJTMBWFT • AndroidLinux/EC2 • iOSMac࣮ػ • Travis CI, Circle
CIͳͲݕ౼͕ͨ͠ະಋೖ • ίετʹରͯͦ͜͠·Ͱར͕ͳ͍ͱ͍͏அ • ڥΛ੍ޚ͍͢͠ͱ͍͏རΛͱ͍ͬͯΔ
"OESPJE$*Ϛγϯ ςετσόΠεͷมભ 1. EC2 + emulator 2. Macbook ProʢiOS CIͱಉ͡Ϛγϯʣ
+ ࣮ػ 3. ϋΠεϖοΫLinuxϚγϯ + ࣮ػ • εέʔϧΞοϓͰͦͦ͜͜շద 4. EC2 + emulator • ؆୯ʹεέʔϧΞτͰ͖ΔΑ͏ʹͨ͠ • ϨΠςϯγΑΓεϧʔϓοτΛͱͬͨ݁Ռ
1VMM3FRVFTU#VJMEFS • JenkinsͷpluginͰɺPR͝ͱʹCIΛىಈ͢Δ • master branchʹcommit / push͢Δͷېࢭ • Ϗϧυʴςετ͕ύε͠ɺϨϏϡʔΛ௨ͬͨΒϚʔδՄ
1VMM3FRVFTU#VJMEFS͕ߦ͏͜ͱ • Pull-Request Builder (+Dokumi) • ςετΛ࣮ߦͯ͠PRʹࣦഊϝοηʔδΛϙετ • ੩తղੳΛ࣮ߦͯ͠PRͷ֘ՕॴʹϝοηʔδΛϙετ •
ػցʹίʔυϨϏϡʔͤͯ͞ਓͷෛ୲ΛݮΒ͢ • ΞϓϦύοέʔδΛϏϧυʢapk, ipaʣ • ΞϓϦύοέʔδΛDeployGateʹΞοϓϩʔυ • ΤϯδχΞҎ֎Ͱ։ൃதͷ৽ػೳΛࢼ͘͢͠
6OJU5FTU2" • ςετΤϯδχΞ2ਓମ੍ • 2ਓڞίʔυΛॻ͚Δ • ςετίʔυϓϥοτϑΥʔϜ͝ͱͷඪ४ςετϑϨʔ ϜϫʔΫʢAndroid JUnit4, XCTestʣ
• ։ൃऀॻ͘͠ɺςετΤϯδχΞॻ͘ • AppiumπʔϧʹΑΔࣗಈԽ͞Εͨςετɺख࡞ ۀʹΑΔςετ࣮ࢪ
'BJMVSF5FBDIFT4VDDFTT
'BJMVSF5FBDIFT4VDDFTT • োϨϙʔτͷϑΥʔϚοτɿ • ʹ͍ͭͯνʔϜͰ͠߹͏͜ͱ • ͳͥͦͷΛൃੜͤͯͨ͞ͷ͔Λهࡌ͢Δ͜ͱ • ࠶ൃࢭࡦͱͦͷ࣮ࢪΛهࡌ͢Δ͜ͱ •
ʮؾΛ͚Δʯʮҙ͢Δʯͱ͍ͬͨओ؍తͳ ࢭࡦೝΊͳ͍
'54ࢥߟͷϑϨʔϜϫʔΫ • ͕͋Εࠜຊతʹղܾ͖͢ͱ͍͏Ձ؍ • ʮͳͥ͜ͷ͕ى͖ͨͷ͔ʯΛੳٕͯ͠ज़తͳ ղܾࡦʹམͱ͜͠Ή • ։ൃʹ͓͚Δʮඪ४ʯΛ࡞͍ͬͯ͘աఔͰ͋Δ
࣮ࡍͷ'54͔Β ͍͔ͭ͘ϐοΫΞοϓ
"OESPJEΞϓϦͰ 8JEHFU͕͋Δͱ͖ʹ Ξοϓσʔτ͢ΔͱϩάΞτ
$PPLQBE"QQ8JEHFU • AndroidͷϗʔϜʹஔ͚Δ খ͍͞ΞϓϦ • ىಈϑϩʔ͕ී௨ͷΞϓ Ϧͱҧ͏ʢ͜ͱ͕͋Δʣ
8JEHFU͕͋Δͱ͖ʹΞοϓσʔτ͢ΔͱϩάΞτ • WidgetΛؚΊͯز͔ͭͷύλʔϯͰىಈϑϩʔ͕গ ͚ͩ͠ҧ͏ • ΞϓϦέʔγϣϯͷىಈ࣌ ʢApplication#onCreate()ʣʹͯ͢ͷॳظԽΛߦ͏ ͱ͗͢ΔͷͰɺผͷͱ͜ΖʹΓ͚͍ͯͨ • ݁Ռɺ௨ৗͱҧ͏ىಈϑϩʔΛऔΔ߹ʹͯ͢ͷ
ॳظԽ͕Βͳ͍ঢ়ଶͩͬͨ
ղܾํ๏ • ॳظԽΛ Application#onCreate() Ͱߦ͏Α͏ʹͨ͠ • ͦͷࡍɺॳظԽϓϩηεΛݟͳ͓ͯ͠ߴԽͨ͠ • ͜ͷॳظԽεϓϥογϡεΫϦʔϯ͕ग़Δલͷ ͜ͱͳͷͰɺͦΕͳΓʹ࣌ؒΛͬͯߴԽ͢Δ
Ձ͕͋Δ • ʮؾΛ͚࣮ͭͯ͢Δʯোͷͱ
/ Ͱ"1*ΞΫηε ͯ͠αʔόʔͷෛՙ্͕ঢ
/ • ͋ΔϦιʔεʢͨͱ͑RecipeʣΛNݸऔಘͨ͋͠ ͱɺͦͷϦιʔεʹඥͮ͘ผͷϦιʔεʢͨͱ͑ UserʣΛऔಘ͠Α͏ͱͯ͠͞ΒʹNճͷAPIΛൃߦ ͯ͠͠·͍ύϑΥʔϚϯε͕ྼԽ͢Δ • RailsͰΑ͋͘Δ͜ͱͰɺbulletͱ͍͏N+1Λ ൃݟ͢Δઐ༻ͷgem·Ͱ͋Δ
J04ΞϓϦͰ/ ʹؾͮ͘ • ίʔυϨϏϡʔQA Λ௨աͯ͠ɺϦϦʔεޙʹAPI αʔόͷෛՙ͕ߴ·ͬͯൃ֮ • αʔόʔαΠυͷ࣮Α͘ͳ͔ͬͨͷͰͦͷվ ળͰ͋Δఔ͠ͷ͛ͨ •
ΞϓϦͷڍಈͦͷͷਖ਼ৗ͕ͩো͕͓͖Δͱ͍ ͏ঢ়گͩͬͨ
ղܾࡦɿνΣοΫϦετʹ߲ΛՃ • pull-requestʹಛఆͷϥϕϧΛ͚ͭΔͱɺͦΕʹԠ͡ ͨνΣοΫϦετ͕షΒΕΔΈ͕͋Δ • ͦΕΛ֦ுͯ͠νΣοΫͰ͖ΔΑ͏ʹͨ͠ • ߋʹΞϓϦ͔ΒͷϦΫΤετΛΩϟϓνϟͯ͠νΣο Ϋ͢ΔΈΛςετʹΈࠐΜͩ
1SP(VBSEͱͷઓ͍
1SP(VBSE • JavaͷόΠτίʔυͷͨΊͷminifyπʔϧ • γϯϘϧ໊ͷॖɺόΠτίʔυ࠷దԽɺϝλσʔλͷআɺσο υίʔυআɺಡԽͳͲΛߦ͏ • γϯϘϧ໊ͷॖͱσουίʔυআͰAPKαΠζΛখ͘͢͞Δޮ ՌΛظ •
ProGuardͦͷ্༷ɺΞϓϦͷػೳෆશΛඇৗʹى͍͜͢͠ • ͔͠͠APKαΠζͷॖখޮՌϝΨόΠτʹٴͿͷͰΘͳ͍ Θ͚ʹ͍͔ͳ͍
BTTVNFOPTJEFF⒎FDUT • σουίʔυআʹ͓͍ͯɺಛఆͷϝιου͕෭࡞ ༻Λ࣋ͨͳ͍ͱ͍͏ώϯτΛ༩͑ΔΦϓγϣϯ • ϩΨʔͷϝιουΛ "no side-effects" ͱ͢Δ͜ͱͰɺ Log.d()ͷݺͼग़͠ΛόΠτίʔυ͔ΒআͰ͖Δ
• ΫοΫύουΞϓϦͰ͜ΕͰϩάग़ྗΛ͍ͬͯ ͕ͨ…
ϦϦʔεϏϧυͰϩάग़ྗ • ͋Δόʔδϣϯ͔Βϩάग़ྗ͕ແޮԽ͞Εͳ͍ঢ়ଶ ʹͳ͍ͬͯͨ • ͦ͜Ͱ -assumenosideeffects Ͱ Log.d() Λআ͢Δ
͜ͱʹͨ͠ɿ BTTVNFOPTJEFF⒎FDUTa DMBTTBOESPJEVUJM-PH\NFUIPET^
"1*αʔόͷෛՙ૿େ • ΄Ͳͳͯ͘͠APIαʔόͷෛՙ͕ߴ·͖ͬͯͨ • ೝূϦΫΤετ͕աʹൃߦ͞Ε͍ͯΔΒ͍͠ • ΫοΫύουΞϓϦىಈ࣌ʹೝূΛߦ͏Α͏ʹͳͬ ͍ͯΔ • ೝূ͕͍ྃͯ͠ͳ͍ͱ͖ʹൃߦ͞Εͨͦͷଞͷ
APIίʔϧೝূ͕௨Δ·ͰͭΑ͏ʹͳ͍ͬͯΔ w w
"1*ίʔϧೝূ͕௨Δ·Ͱͭ w w • ͜ͷͪ߹Θͤʹ Object#wait() Λ͍ͬͯͨ • -assumenosideeffects class
Log { <methods>; } Ϋϥε ֊ΛḪͬͯద༻͞ΕΔ • LogΫϥεͷεʔύʔΫϥεͰ͋ΔObjectΫϥεͷશϝ ιου͕෭࡞༻ͳ͠ͱղऍ͞ΕΔʂ • ͜ͷΑ͏ͳܦҢͰ Object#wait() ͷݺͼग़͕͠όΠτίʔ υ͔Βআ͞Ε͍ͯͨ…
ͳͥϦϦʔε·Ͱؾ͔ͳ͔͔ͬͨ • APIίʔϧͷೝূ͕ͪյΕͨ݁Ռɺೝূ͕ͱ͓Βͣʹ APIίʔϧ͕͞ΕͯΤϥʔʹͳ͍ͬͯͨ • ͔͠͠ɺAPIΫϥΠΞϯτʹ࣮͞ΕͨࣗಈϦτϥΠػ ߏ͕͏·͘ಈ͍ͯ͠·͍ɺϦτϥΠ͢Δؒʹೝূ͕ͱ͓ͬ ͯଓ͘APIίʔϧ͕ޭͯ͠͠·͏ • ·ͨΞϓϦͷڍಈͦͷͷਖ਼ৗ͕ͩো͕͓͖Δͱ
͍͏ঢ়گ
"1*ݺͼग़͠ଟ͗͢ͷࠜຊղܾ • ΞϓϦ্ͰΦʔόʔϨΠදࣔ͢ΔϩΨʔΛͭ͘Γɺ status 4xx, 5xxͷAPIݺͼग़͠ΛͦͷϩΨʔͰه͢Δ Α͏ʹͨ͠ʢAndroid, σόοάϏϧυͰͷΈ༗ޮʣ • ͦͷޙɺ௨৴पΓͷτϥϒϧΦʔόʔϨΠϩΨʔ
ͷ͓͔͛Ͱ͍ͩͿॿ͔ͬͨ • ·ͨ௨৴ྔΛଌఆ͢ΔπʔϧΛͭ͘ΓɺQAʹऔΓೖ Εͨ
͓ΘΓ