Slide 1

Slide 1 text

ϞόΠϧΞϓϦ։ൃͷ ඪ४Λ୳Δ $PPLQBE5FDI$POG SE+BO '6+*(PSPHPSPGVKJ!DPPLQBEDPN

Slide 2

Slide 2 text

͸͡Ίʹ • ໊લ • FUJI Goro (GitHub: gfx, Twitter: @__gfx__) • ෦ॺ • ٕज़෦ ϞόΠϧ։ൃج൫ • ۙگ • Ϛάωοτגࣜձࣾʹग़޲தʢ2015೥9݄~ʣ

Slide 3

Slide 3 text

͜ͷτʔΫͷഎܠ • 2016೥1݄ݱࡏɺΫοΫύου͸εϚϗ΍λϒϨοτͳ ͲɺϞόΠϧ୺຤ͰͷΞΫηε͕ա൒਺Λ௒͍͑ͯΔ • ͦΕΏ͑ʹϞόΠϧΞϓϦ։ൃͷن໛͕େ͖͘ͳͬͨ • ୯ҰͷAndroidΞϓϦɺiOSΞϓϦʹͷΈؔΘΔΤϯδ χΞ͸૬ରతʹগͳ͘ͳͬͨ • ҰํͰʮΫοΫύουʯ͸αʔϏεͷण໋͕௕҆͘ఆ ͯ͠։ൃɾӡ༻Ͱ͖Δ͜ͱ͕ٻΊΒΕΔ

Slide 4

Slide 4 text

ϞόΠϧ୺຤͔ΒͷΞΫηεͷ಺༁ • PC vs εϚϗ • ΞΧ΢ϯτ࣋ͪϢʔβ͸ʮεϚϗͷΈʯ͕8ׂ • ήετϢʔβͷ͏ͪʮεϚϗʯ͸7ׂ • ΞϓϦ vs ΢Σϒ • ΞΧ΢ϯτ࣋ͪϢʔβ͸ʮΞϓϦͷΈʯ͕6ׂ • ήετϢʔβͷ͏ͪʮΞϓϦʯ͸1ׂ

Slide 5

Slide 5 text

։ൃʹ͓͚Δʮඪ४ʯͱ͸ʁ • ʮඪ४తͳ։ൃʯΛʮޮՌͱίετͷόϥϯε͕Α ͘ೲಘײͷ͋Δ։ൃʯͱߟ͑Δ • ͭ·Γʮඪ४తͰͳ͍։ൃʯͱ͸ʮௐ΂ͯ΋Θ͔Β ͳ͍ൿ఻ͷλϨ͕ଟ͘ɺཧෆਚʹײ͡Δ։ൃʯͱͳ Δ • ʮރΕٕͨज़ʯͷ͜ͱͱ͸ݶΒͳ͍ɻ؀ڥͷมԽʹ ͍͍ͭͯ͘͜ͱ΋େࣄɻ

Slide 6

Slide 6 text

ΫοΫύουͷߟ͑Δ ඪ४తͳϞόΠϧΞϓϦ։ൃ w ৽ٕज़ͷಋೖ w $* 5FTU 2" w '54

Slide 7

Slide 7 text

৽ٕज़ͷಋೖ

Slide 8

Slide 8 text

͜͜Ͱ͍͏ʮ৽ٕज़ʯͱ͸ • ϓϩάϥϛϯάݴޠʢe.g. Swiftʣ • ϑϨʔϜϫʔΫ΍ϥΠϒϥϦʢe.g. RxJavaʣ • ϓϩτίϧʢe.g. HTTP/2ʣ • σʔλϑΥʔϚοτʢe.g. WebPʣ • ΞʔΩςΫνϟʢe.g. MVVM, Clean Architectureʣ • ͦͷଞιϑτ΢ΣΞɾαʔϏε

Slide 9

Slide 9 text

৽ٕज़Λಋೖ͢Δͱ͍͏͜ͱ • جຊతʹੵۃతʹ࠾༻͢Δํ਑ • ͦΕ͕Ͳ͏͍͏໰୊Λղܾ͢Δͷ͔Λ͖ͪΜͱ໌Β ͔ʹ͢Δ͜ͱ • ʮ࢖͏ਓ͸ಋೖऀ͚ͩʯ͸ආ͚Δ΂͖ࣄଶ • ৽ٕज़ಋೖͷࡍ͸ࣾ಺ษڧձ΍ϒϩάͳͲͰੵۃ తʹܒ໤׆ಈΛߦͳ͍ͬͯΔ • cf. Android։ൃͰRxJavaΛνʔϜʹಋೖͨ͠࿩

Slide 10

Slide 10 text

ಋೖࡁΈɾݕ౼தͷٕज़ • ಋೖࡁΈ • 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)

Slide 11

Slide 11 text

ྫ4XJGU • 2015೥12݄ʹOSSԽ͞ΕͨiOS༻ͷϓϩάϥϛϯάݴޠ • ৽نͰ͸SwiftΛ࢖ͬͨΞϓϦ΋͋Γ • طଘͷObjective-CΛॻ͖׵͑Δͷ͸Ұྫ͚ͩ͋Γ • Global Cookpad iOS app • SwiftͷӨڹͰ࣮૷͞ΕͨObjective-Cͷ৽ػೳ͸ੵۃతʹ ࢖͍ͬͯ͘ํ਑ʢͨͱ͑͹δΣωϦΫεʣ • AppleʹΑΓະདྷ͕໿ଋ͞Ε͍ͯΔ

Slide 12

Slide 12 text

ྫ,PUMJO • JetBrainsࣾͷ։ൃ͢ΔJVM༻ͷϓϩάϥϛϯάݴޠ • Android༻ͷϓϩάϥϛϯάݴޠͱͯ͠஫໨͞Ε͍ͯΔ • ߏจ͸ (Java + Swift) / 2 ͱ͍ͬͨͱ͜Ζ • ݴޠ࢓༷͸͔ͳΓΑ͘IDEͷαϙʔτ΋े෼ • ϥΠϯλΠϜͷϑοτϓϦϯτ΋1MBఔ౓ͱখ͞Ί • Javaͷࢿ࢈Λͦͷ··࢖͑ͯίʔυྔ͸JavaΑΓগͳ͍ • ͨͩ͜ΕʹΑͬͯʮԿΛղܾ͢Δͷ͔ʯ͸͸͖ͬΓͱ͠ͳ͍

Slide 13

Slide 13 text

$* 5FTU 2"

Slide 14

Slide 14 text

ϞόΠϧΞϓϦͷಛ௃ʢʣ • Ϣʔβʔ͕࢖͏όʔδϣϯΛ੍ޚͰ͖ͳ͍ • Ϣʔβʔ͕ΞϓϦͷΞοϓσʔτΛ͢Δͱ͸ݶΒͳ͍͠ɺ ࣮ࡍΞοϓσʔτΛ͠ͳ͍Ϣʔβ͸͍Δ • ʮΞοϓσʔτͷڧ੍ʯ͸͠ͳ͍ํ਑Ͱ͖͍ͯΔ • Android͸৽͍͠ύʔϛογϣϯΛ௥Ճ͢ΔͱݦஶʹΞοϓ σʔτ཰͕͕͞Δ • ύʔϛογϣϯΛ௥Ճ͢ΔͱࣗಈΞοϓσʔτ͕ޮ͔ͳ ͘ͳΔͨΊɻAndroid 6.0Ͱվળ͞Ε͕ͨະීٴ

Slide 15

Slide 15 text

ϞόΠϧΞϓϦͷಛ௃ʢʣ • ࣮ߦ؀ڥΛ੍ޚ͢Δ͜ͱ΋Ͱ͖ͳ͍ • ୺຤ͷεϖοΫ / OSͷόʔδϣϯ / ௨৴؀ڥ͸· ͪ·ͪ • ΢ΣϒΞϓϦΑΓ΋ࣦഊ͕ॏ͘ςετ΋೉͍͠ • ςετίʔυ΋΢ΣϒΞϓϦΑΓॻ͘ͷ͕೉͍͠ • ίʔυϨϏϡʔɾCIɾQAͳͲͷ඼࣭؅ཧ͕ॏཁ

Slide 16

Slide 16 text

$*+FOLJOT NVMUJTMBWFT • Android͸Linux/EC2 • iOS͸Mac࣮ػ • Travis CI, Circle CIͳͲ΋ݕ౼͕ͨ͠ະಋೖ • ίετʹରͯͦ͜͠·Ͱར఺͕ͳ͍ͱ͍͏൑அ • ؀ڥΛ੍ޚ͠΍͍͢ͱ͍͏ར఺Λͱ͍ͬͯΔ

Slide 17

Slide 17 text

"OESPJE$*ϚγϯςετσόΠεͷมભ 1. EC2 + emulator 2. Macbook ProʢiOS CIͱಉ͡Ϛγϯʣ + ࣮ػ୺຤ 3. ϋΠεϖοΫLinuxϚγϯ + ࣮ػ୺຤ • εέʔϧΞοϓͰͦͦ͜͜շద 4. EC2 + emulator • ؆୯ʹεέʔϧΞ΢τͰ͖ΔΑ͏ʹͨ͠ • ϨΠςϯγΑΓ΋εϧʔϓοτΛͱͬͨ݁Ռ

Slide 18

Slide 18 text

1VMM3FRVFTU#VJMEFS • JenkinsͷpluginͰɺPR͝ͱʹCIΛىಈ͢Δ • master branchʹ௚઀commit / push͢Δͷ͸ېࢭ • Ϗϧυʴςετ͕ύε͠ɺϨϏϡʔΛ௨ͬͨΒϚʔδՄ

Slide 19

Slide 19 text

1VMM3FRVFTU#VJMEFS͕ߦ͏͜ͱ • Pull-Request Builder (+Dokumi) • ςετΛ࣮ߦͯ͠PRʹࣦഊϝοηʔδΛϙετ • ੩తղੳΛ࣮ߦͯ͠PRͷ֘౰ՕॴʹϝοηʔδΛϙετ • ػցʹίʔυϨϏϡʔͤͯ͞ਓͷෛ୲ΛݮΒ͢ • ΞϓϦύοέʔδΛϏϧυʢapk, ipaʣ • ΞϓϦύοέʔδΛDeployGateʹΞοϓϩʔυ • ΤϯδχΞҎ֎Ͱ΋։ൃதͷ৽ػೳΛࢼ͠΍͘͢

Slide 20

Slide 20 text

6OJU5FTU2" • ςετΤϯδχΞ2ਓମ੍ • 2ਓڞίʔυΛॻ͚Δ • ςετίʔυ͸ϓϥοτϑΥʔϜ͝ͱͷඪ४ςετϑϨʔ ϜϫʔΫʢAndroid JUnit4, XCTestʣ • ։ൃऀ΋ॻ͘͠ɺςετΤϯδχΞ΋ॻ͘ • Appium΍಺੡πʔϧʹΑΔࣗಈԽ͞Εͨςετ΍ɺख࡞ ۀʹΑΔςετ΋࣮ࢪ

Slide 21

Slide 21 text

'BJMVSF5FBDIFT4VDDFTT

Slide 22

Slide 22 text

'BJMVSF5FBDIFT4VDDFTT • ো֐ϨϙʔτͷϑΥʔϚοτɿ • ໰୊ʹ͍ͭͯνʔϜͰ࿩͠߹͏͜ͱ • ͳͥͦͷ໰୊Λൃੜͤͯͨ͞ͷ͔Λهࡌ͢Δ͜ͱ • ࠶ൃ๷ࢭࡦͱͦͷ࣮ࢪ೔Λهࡌ͢Δ͜ͱ • ʮؾΛ෇͚Δʯʮ஫ҙ͢Δʯͱ͍ͬͨओ؍తͳ๷ ࢭࡦ͸ೝΊͳ͍

Slide 23

Slide 23 text

'54͸ࢥߟͷϑϨʔϜϫʔΫ • ໰୊͕͋Ε͹ࠜຊతʹղܾ͢΂͖ͱ͍͏Ձ஋؍ • ʮͳͥ͜ͷ໰୊͕ى͖ͨͷ͔ʯΛ෼ੳٕͯ͠ज़తͳ ղܾࡦʹམͱ͜͠Ή • ։ൃʹ͓͚Δʮඪ४ʯΛ࡞͍ͬͯ͘աఔͰ΋͋Δ

Slide 24

Slide 24 text

࣮ࡍͷ'54͔Β ͍͔ͭ͘ϐοΫΞοϓ

Slide 25

Slide 25 text

"OESPJEΞϓϦͰ 8JEHFU͕͋Δͱ͖ʹ Ξοϓσʔτ͢ΔͱϩάΞ΢τ

Slide 26

Slide 26 text

$PPLQBE"QQ8JEHFU • AndroidͷϗʔϜʹஔ͚Δ খ͍͞ΞϓϦ • ىಈϑϩʔ͕ී௨ͷΞϓ Ϧͱҧ͏ʢ͜ͱ͕͋Δʣ

Slide 27

Slide 27 text

8JEHFU͕͋Δͱ͖ʹΞοϓσʔτ͢ΔͱϩάΞ΢τ • WidgetΛؚΊͯز͔ͭͷύλʔϯͰىಈϑϩʔ͕গ ͚ͩ͠ҧ͏ • ΞϓϦέʔγϣϯͷىಈ࣌ ʢApplication#onCreate()ʣʹ͢΂ͯͷॳظԽΛߦ͏ ͱ஗͗͢ΔͷͰɺผͷͱ͜Ζʹ੾Γ෼͚͍ͯͨ • ݁Ռɺ௨ৗͱҧ͏ىಈϑϩʔΛऔΔ৔߹ʹ͢΂ͯͷ ॳظԽ͕૸Βͳ͍ঢ়ଶͩͬͨ

Slide 28

Slide 28 text

ղܾํ๏ • ॳظԽΛ Application#onCreate() Ͱߦ͏Α͏ʹͨ͠ • ͦͷࡍɺॳظԽϓϩηεΛݟͳ͓ͯ͠ߴ଎Խͨ͠ • ͜ͷॳظԽ͸εϓϥογϡεΫϦʔϯ͕ग़Δલͷ ͜ͱͳͷͰɺͦΕͳΓʹ࣌ؒΛ࢖ͬͯߴ଎Խ͢Δ Ձ஋͕͋Δ • ʮؾΛ͚࣮ͭͯ૷͢Δʯ͸ো֐ͷ΋ͱ

Slide 29

Slide 29 text

/໰୊Ͱ"1*ΞΫηε ͯ͠αʔόʔͷෛՙ্͕ঢ

Slide 30

Slide 30 text

/໰୊ • ͋ΔϦιʔεʢͨͱ͑͹RecipeʣΛNݸऔಘͨ͋͠ ͱɺͦͷϦιʔεʹඥͮ͘ผͷϦιʔεʢͨͱ͑͹ UserʣΛऔಘ͠Α͏ͱͯ͠͞ΒʹNճͷAPIΛൃߦ ͯ͠͠·͍ύϑΥʔϚϯε͕ྼԽ͢Δ໰୊ • RailsͰ͸Α͋͘Δ͜ͱͰɺbulletͱ͍͏N+1໰୊Λ ൃݟ͢Δઐ༻ͷgem·Ͱ͋Δ

Slide 31

Slide 31 text

J04ΞϓϦͰ/໰୊ʹؾͮ͘ • ίʔυϨϏϡʔ΍QA Λ௨աͯ͠ɺϦϦʔεޙʹAPI αʔόͷෛՙ͕ߴ·ͬͯൃ֮ • αʔόʔαΠυͷ࣮૷΋Α͘ͳ͔ͬͨͷͰͦͷվ ળͰ͋Δఔ౓͸͠ͷ͛ͨ • ΞϓϦͷڍಈͦͷ΋ͷ͸ਖ਼ৗ͕ͩো֐͕͓͖Δͱ͍ ͏ঢ়گͩͬͨ

Slide 32

Slide 32 text

ղܾࡦɿνΣοΫϦετʹ߲໨Λ௥Ճ • pull-requestʹಛఆͷϥϕϧΛ͚ͭΔͱɺͦΕʹԠ͡ ͨνΣοΫϦετ͕షΒΕΔ࢓૊Έ͕͋Δ • ͦΕΛ֦ுͯ͠νΣοΫͰ͖ΔΑ͏ʹͨ͠ • ߋʹΞϓϦ͔ΒͷϦΫΤετΛΩϟϓνϟͯ͠νΣο Ϋ͢Δ࢓૊ΈΛςετʹ૊ΈࠐΜͩ

Slide 33

Slide 33 text

1SP(VBSEͱͷઓ͍

Slide 34

Slide 34 text

1SP(VBSE • JavaͷόΠτίʔυͷͨΊͷminifyπʔϧ • γϯϘϧ໊ͷ୹ॖɺόΠτίʔυ࠷దԽɺϝλσʔλͷ࡟আɺσο υίʔυ࡟আɺ೉ಡԽͳͲΛߦ͏ • γϯϘϧ໊ͷ୹ॖͱσουίʔυ࡟আͰAPKαΠζΛখ͘͢͞Δޮ ՌΛظ଴ • ProGuard͸ͦͷ࢓্༷ɺΞϓϦͷػೳෆશΛඇৗʹى͜͠΍͍͢ • ͔͠͠APKαΠζͷॖখޮՌ͸਺ϝΨόΠτʹٴͿͷͰ࢖Θͳ͍ Θ͚ʹ͸͍͔ͳ͍

Slide 35

Slide 35 text

BTTVNFOPTJEFF⒎FDUT • σουίʔυ࡟আʹ͓͍ͯɺಛఆͷϝιου͕෭࡞ ༻Λ࣋ͨͳ͍ͱ͍͏ώϯτΛ༩͑ΔΦϓγϣϯ • ϩΨʔͷϝιουΛ "no side-effects" ͱ͢Δ͜ͱͰɺ Log.d()ͷݺͼग़͠ΛόΠτίʔυ͔Β࡟আͰ͖Δ • ΫοΫύουΞϓϦͰ͸͜ΕͰϩάग़ྗΛ࡟͍ͬͯ ͕ͨ…

Slide 36

Slide 36 text

໰୊ϦϦʔεϏϧυͰϩάग़ྗ • ͋Δόʔδϣϯ͔Βϩάग़ྗ͕ແޮԽ͞Εͳ͍ঢ়ଶ ʹͳ͍ͬͯͨ • ͦ͜Ͱ -assumenosideeffects Ͱ Log.d() Λ࡟আ͢Δ ͜ͱʹͨ͠ɿ BTTVNFOPTJEFF⒎FDUTa DMBTTBOESPJEVUJM-PH\NFUIPET^

Slide 37

Slide 37 text

໰୊"1*αʔό΁ͷෛՙ૿େ • ΄Ͳͳͯ͘͠APIαʔό΁ͷෛՙ͕ߴ·͖ͬͯͨ • ೝূϦΫΤετ͕ա৒ʹൃߦ͞Ε͍ͯΔΒ͍͠ • ΫοΫύουΞϓϦ͸ىಈ࣌ʹೝূΛߦ͏Α͏ʹͳͬ ͍ͯΔ • ೝূ͕׬͍ྃͯ͠ͳ͍ͱ͖ʹൃߦ͞Εͨͦͷଞͷ APIίʔϧ͸ೝূ͕௨Δ·Ͱ଴ͭΑ͏ʹͳ͍ͬͯΔ w w

Slide 38

Slide 38 text

"1*ίʔϧ͸ೝূ͕௨Δ·Ͱ଴ͭ w w • ͜ͷ଴ͪ߹Θͤʹ Object#wait() Λ࢖͍ͬͯͨ • -assumenosideeffects class Log { ; } ͸Ϋϥε ֊૚ΛḪͬͯద༻͞ΕΔ • LogΫϥεͷεʔύʔΫϥεͰ͋ΔObjectΫϥεͷશϝ ιου͕෭࡞༻ͳ͠ͱղऍ͞ΕΔʂ • ͜ͷΑ͏ͳܦҢͰ Object#wait() ͷݺͼग़͕͠όΠτίʔ υ͔Β࡟আ͞Ε͍ͯͨ…

Slide 39

Slide 39 text

ͳͥϦϦʔε·Ͱؾ෇͔ͳ͔͔ͬͨ • APIίʔϧͷೝূ଴͕ͪյΕͨ݁Ռɺೝূ͕ͱ͓Βͣʹ APIίʔϧ͕͞ΕͯΤϥʔʹͳ͍ͬͯͨ • ͔͠͠ɺAPIΫϥΠΞϯτʹ࣮૷͞ΕͨࣗಈϦτϥΠػ ߏ͕͏·͘ಈ͍ͯ͠·͍ɺϦτϥΠ͢Δؒʹೝূ͕ͱ͓ͬ ͯଓ͘APIίʔϧ͕੒ޭͯ͠͠·͏ • ·ͨ΋ΞϓϦͷڍಈͦͷ΋ͷ͸ਖ਼ৗ͕ͩো֐͕͓͖Δͱ ͍͏ঢ়گ

Slide 40

Slide 40 text

"1*ݺͼग़͠ଟ͗͢໰୊ͷࠜຊղܾ • ΞϓϦ্ͰΦʔόʔϨΠදࣔ͢ΔϩΨʔΛͭ͘Γɺ status 4xx, 5xxͷAPIݺͼग़͠ΛͦͷϩΨʔͰه࿥͢Δ Α͏ʹͨ͠ʢAndroid, σόοάϏϧυͰͷΈ༗ޮʣ • ͦͷޙɺ௨৴पΓͷτϥϒϧ͸ΦʔόʔϨΠϩΨʔ ͷ͓͔͛Ͱ͍ͩͿॿ͔ͬͨ • ·ͨ௨৴ྔΛଌఆ͢ΔπʔϧΛͭ͘ΓɺQAʹऔΓೖ Εͨ

Slide 41

Slide 41 text

͓ΘΓ