Upgrade to Pro — share decks privately, control downloads, hide ads and more …

大公開! ZOZOTOWN iOSのコードレビューを覗きながらレビューの必要性を再確認しよう! / Big reveal! Let's revisit the need for reviews with a peek into the ZOZOTOWN iOS code review!

9182e5f95d56ff8a28dc25e4333b5d0e?s=47 Saya Matsui
December 07, 2021

大公開! ZOZOTOWN iOSのコードレビューを覗きながらレビューの必要性を再確認しよう! / Big reveal! Let's revisit the need for reviews with a peek into the ZOZOTOWN iOS code review!

ZOZO Tech Talk #2 - iOSでの登壇資料です。

9182e5f95d56ff8a28dc25e4333b5d0e?s=128

Saya Matsui

December 07, 2021
Tweet

Transcript

  1. େެ։ʂ ZOZOTOWN iOSͷίʔυϨϏϡʔΛ೷͖ ͳ͕ΒϨϏϡʔͷඞཁੑΛ࠶֬ೝ͠Α͏ʂ גࣜձࣾZOZ O ZOZOTOWN։ൃຊ෦ ZOZOTOWNΞϓϦ෦ iOSϒϩοΫ Saya

    Matsui Copyright © ZOZO, Inc.
  2. © ZOZO, Inc. גࣜձࣾZOZO ZOZOTOWN։ൃຊ෦ ZOZOTOWNΞϓϦ෦ iOSϒϩοΫ দҪ ࠼ʢSaya Matsuiʣ

    2020೥7݄ʹೖࣾ ZOZOTOWN iOSΞϓϦͷ։ൃΛ୲౰ 2
  3. © ZOZO, Inc. 3 talk topic

  4. © ZOZO, Inc. ZOZOTOWN iOSͷPull RequestʢҎԼɺPRʣϨϏϡʔࣄ৘ͱ ະܦݧͰೖࣾͨ͠Θ͕ͨ͠ɺखް͍ϨϏϡʔચྱΛड͚ͳ͕Β 1೥ͰͲͷΑ͏ʹ੒௕ͨ͠ͷ͔Λ͓࿩͠·͢ɻ 4

  5. © ZOZO, Inc. Agenda 5 1. ZOZOTOWN iOSͷνʔϜମ੍ͱϨϏϡʔࣄ৘ 2. Θͨ͠Λ੒௕ͤͨ͞PRϨϏϡʔ

    3.PRΛग़͢ͱ͖ʹҙ͍ࣝͯ͠Δ͜ͱ 4.·ͱΊɿPRϨϏϡʔͷඞཁੑ
  6. © ZOZO, Inc. 6 ZOZOTOWN iOS ͷ νʔϜମ੍ͱϨϏϡʔࣄ৘ 01 CHAPTER

  7. © ZOZO, Inc. 7 ຊ࣭վળɾPRඞਢϨϏϡϫʔ ZOZOTOWN iOS νʔϜମ੍ νʔϜϦʔμʔ ։ൃ

  8. © ZOZO, Inc. 8 ຊ࣭վળɾPRඞਢϨϏϡϫʔ ػೳ։ൃɾෆ۩߹मਖ਼ ZOZOTOWN iOS νʔϜମ੍

  9. © ZOZO, Inc. ٕज़ސ໰ɹ؛઒͞Μ 9

  10. © ZOZO, Inc. PRϨϏϡʔΛͯ͠΋ΒͬͨΓ SlackͰٕज़తͳ࣭໰ʹ ౴͑ͯ΋ΒͬͨΓ͍ͯ͠·͢ʂ 10

  11. © ZOZO, Inc. 11 ׬શʹۀ຿෼୲͞Ε͍ͯΔͷʁ🤔 ඞਢϨϏϡϫʔ͕͍ͳ͍࣌ɺ։ൃ͸ࢭ·ΔΜͰ͔͢ʁ💥

  12. © ZOZO, Inc. 12 ຊ࣭վળɾPRඞਢϨϏϡϫʔ ػೳ։ൃɾෆ۩߹मਖ਼ ZOZOTOWN iOS νʔϜମ੍

  13. © ZOZO, Inc. ZOZOTOWN iOS ։ൃࣄ৘ 13 ෳ਺ͷϓϩδΣΫτ͕ฒߦɺ ϒϥϯν͕ཚཱ͕ͪ͠ ͱ͋Δ೔ͷϒϥϯνঢ়گ

  14. © ZOZO, Inc. 14 ࣮૷ͷҰ෦ΛݟΔࢹ఺ͱશମΛݟ௨͢ࢹ఺͸ҟͳΔ ϨϏϡʔʹूதͯ͠΋Β͏͜ͱͰಘΒΕΔϝϦοτ ඼࣭୲อ ੒௕ શମతͳυϝΠϯ஌ࣝΛ࣋ͭਓ͕ෳ਺͍Δ͜ͱͰɺ ଞͷը໘΁ͷӨڹൣғʹؾͮ͘͜ͱ͕Ͱ͖ΔͳͲ

    ඼࣭୲อʹܨ͕Δ ඞਢϨϏϡϫʔ͸ϨϏϡʔʹूதͰ͖ΔͨΊɺ ઃܭ΍ॻ͖ํͳͲΑΓྑ͍ํ๏Λࡉ͔͘ ݟΔ͜ͱ͕Ͱ͖ΔͷͰɺϨϏϡΠʔͷ੒௕ʹܨ͕Δ
  15. © ZOZO, Inc. 15 Θͨ͠Λ੒௕ͤͨ͞PRϨϏϡʔ 02 CHAPTER

  16. © ZOZO, Inc. 16 ීஈ΋Β͍ͬͯΔ ϨϏϡʔίϝϯτΛ େެ։͠·͢ʂ

  17. © ZOZO, Inc. ೖࣾͯ͠͸͡Ίͯग़ͨ͠PRͷ͓࿩ 17 ͓୊ मਖ਼diff ಛఆͷಈ࡞Λͨ࣌͠ʹૹΒΕΔΠϕϯτͷIDΛ਺஋͔Βจࣈྻʹมߋ͢Δ

  18. © ZOZO, Inc. ೖࣾͯ͠͸͡Ίͯग़ͨ͠PRͷ͓࿩ 18 ͓୊ मਖ਼diff ಛఆͷಈ࡞Λͨ࣌͠ʹૹΒΕΔΠϕϯτͷIDΛ਺஋͔Βจࣈྻʹมߋ͢Δ ͜ͷPRɺԿ݅ίϝϯτ͕ ͍ͭͨͱࢥ͍·͔͢ʁ

  19. © ZOZO, Inc. thinking time!! 19

  20. © ZOZO, Inc. 16݅ 20 ʘͨͬͨ1ߦमਖ਼ͳͷʹʂʁʗ

  21. © ZOZO, Inc. 21 ͔͠΋1ͭ1ͭͷίϝϯτΊͬͪΌ௕͍΍Μʂ

  22. © ZOZO, Inc. 22 ਤΛ༻͍ͨઆ໌΋׆ൃʹ͓͜ͳΘΕ͍ͯ·͢

  23. © ZOZO, Inc. 23 վળޙ

  24. © ZOZO, Inc. 24 1೥ؒͰग़ͨ͠ PRͷ਺ ࢲͷPRʹ͍ͭͨ ૯ίϝϯτ਺ PR1ݸʹ͖ͭ ฏۉίϝϯτ਺

    Θͨ͠ͷ1೥ؒͷPRʹؔ͢Δ਺ࣈΛݟͯΈΑ͏ʂ
  25. © ZOZO, Inc. 25 1೥ؒͰग़ͨ͠ PRͷ਺ 120 ࢲͷPRʹ͍ͭͨ ૯ίϝϯτ਺ PR1ݸʹ͖ͭ

    ฏۉίϝϯτ਺ Θͨ͠ͷ1೥ؒͷPRʹؔ͢Δ਺ࣈΛݟͯΈΑ͏ʂ
  26. © ZOZO, Inc. 26 1೥ؒͰग़ͨ͠ PRͷ਺ 120 1426 ࢲͷPRʹ͍ͭͨ ૯ίϝϯτ਺

    PR1ݸʹ͖ͭ ฏۉίϝϯτ਺ Θͨ͠ͷ1೥ؒͷPRʹؔ͢Δ਺ࣈΛݟͯΈΑ͏ʂ
  27. © ZOZO, Inc. 27 1೥ؒͰग़ͨ͠ PRͷ਺ 120 1426 12 ࢲͷPRʹ͍ͭͨ

    ૯ίϝϯτ਺ PR1ݸʹ͖ͭ ฏۉίϝϯτ਺ Θͨ͠ͷ1೥ؒͷPRʹؔ͢Δ਺ࣈΛݟͯΈΑ͏ʂ
  28. © ZOZO, Inc. 28 ͜Ε·Ͱ΋ΒͬͨίϝϯτͰ جຊ͚ͩͲͱͯ΋େࣄͩͱࢥͬͨ ۩ମྫΛ঺հ͠·͢ʂ

  29. © ZOZO, Inc. 29 01. ม਺΍ؔ਺ͷ໊͚ͮ

  30. © ZOZO, Inc. 30 ͓୊ ίʔσΟωʔτ৘ใΛAPI͔Βऔಘ͠ɺ CollectionViewʹදࣔͤ͞Δ

  31. © ZOZO, Inc. Question!! 31

  32. © ZOZO, Inc. 32 मਖ਼diff thinking time!!

  33. © ZOZO, Inc. 33 ϨϏϡʔ

  34. © ZOZO, Inc. 34 मਖ਼diff

  35. © ZOZO, Inc. νϣοτσΩϧΑ͏ʹͳͬͨPoint 35 ɾฦΓ஋ͷͳ໋͍ྩతͳfunc͸ಈࢺͰॻ͘ ɾରͷfuncΛ࡞Δ࣌͸ରশੑͷ͋ΔಈࢺΛ࢖͏ ɾಉ͡Α͏ͳॲཧͷͱ͖पลίʔυͰͲΜͳ໊͚͕ͮ͞Ε͍ͯΔ͔֬ೝ͢Δ

  36. © ZOZO, Inc. 36 02. ੹຿Λߟ͑Δ

  37. © ZOZO, Inc. 37 ͓୊ ΦϑϥΠϯঢ়ଶͰ঎඼ͷ ʮΧʔτʹೖΕΔʯϘλϯΛԡͨ࣌͠ɺ ద੾ͳΤϥʔΛදࣔͤ͞Δ

  38. © ZOZO, Inc. Question!! 38

  39. © ZOZO, Inc. 39 मਖ਼diff thinking time!!

  40. © ZOZO, Inc. 40 मਖ਼diff

  41. © ZOZO, Inc. 41 ϨϏϡʔ

  42. © ZOZO, Inc. νϣοτσΩϧΑ͏ʹͳͬͨPoint 42 ɾ໾ׂΛཧղͯ͠ద੾ͳ৔ॴʹίʔυΛॻ͘ ɾPRΛग़͢લʹࣗ෼ͷॻ͍͍ͯΔίʔυ͕ద੾ͳ৔ॴʹॻ͔Ε͍ͯΔ͔ݕ౼͢Δ

  43. © ZOZO, Inc. 43 03. ίʔυͷՄಡੑΛߴΊΔ

  44. © ZOZO, Inc. 44 ͓୊ ΞΠςϜͷ਺͕ح਺ͷ৔߹͸ ۭനηϧΛදࣔ͢Δ Before After brandName

    brandName Name brandName Name
  45. © ZOZO, Inc. 45 طଘ࣮૷ ঎඼͸goodsListͱ͍͏ม਺͕঎඼৘ใΛ͓࣋ͬͯΓɺ goodsListͷcountͰηϧ͕࡞ΒΕΔ࣮૷ʹͳ͍ͬͯͨ

  46. © ZOZO, Inc. Question!! 46

  47. © ZOZO, Inc. 47 मਖ਼diff goods͕nilͷ࣌͸emptyCellΛද͍ࣔͤͨ͞ͷͰɺ goodsΛΦϓγϣφϧʹ͠ɺisEmptyΛBoolͰදݱͰ͖ΔܕΛ࡞Γɺ ͦΕΛgoodsListͷܕʹͨ͠ goodsΛgoodͱλΠϙ͍ͯ͠Δ… thinking

    time!!
  48. © ZOZO, Inc. 48 ϨϏϡʔ

  49. © ZOZO, Inc. 49 վળޙ enumΛ࢖ͬͯgoods͕ଘࡏ͢Δঢ়ଶͳͷ͔ɺ emptyͷঢ়ଶͳͷ͔ΛΘ͔Γ΍ͨ͘͢͠

  50. © ZOZO, Inc. νϣοτσΩϧΑ͏ʹͳͬͨPoint 50 ɾঢ়ଶͷ؅ཧʹؾΛ෇͚Δ ɾϩʔΧϧม਺Ͱྑ͍΋ͷΛϝϯόม਺ʹ͠ͳ͍Α͏ʹ͢Δ ɾؔ਺ʹ໊͚ͭͨલҎ֎ͷॲཧΛͤ͞ͳ͍Α͏ʹ͢Δ ɾద੾ͳίϝϯτΛੵۃతʹ͚ͭΔ

  51. © ZOZO, Inc. 51 ͍·Ͱ͸ɺޙഐ΁ͷPRϨϏϡʔΛ͢ΔͳͲ ࣗ෼͕ڭ͑ͯ΋Β͖ͬͯͨ͜ͱΛؐݩ͍ͯ͠·͢

  52. © ZOZO, Inc. 52 PRΛग़͢ͱ͖ʹҙ͍ࣝͯ͠Δ͜ͱ 03 CHAPTER

  53. © ZOZO, Inc. ϨϏϡϫʔͷෛ୲Λܰݮ͢ΔͨΊʹɾɾɾ 53 ɾͲͷΑ͏ʹमਖ਼ͨ͠ͷ͔ɺͳͥͦͷमਖ਼Ҋʹͨ͠ͷ͔ ਤΛ࢖ͬͯઆ໌͢ΔͱΘ͔Γ΍͍͢͜ͱ΋͋Δ ʢͱ͘ʹෳ਺ͷঢ়ଶ΍ύλʔϯ͕͋Δ৔߹ͳͲʣ

  54. © ZOZO, Inc. ϨϏϡϫʔͷෛ୲Λܰݮ͢ΔͨΊʹɾɾɾ 54 ɾͲ͜ΛͲ͏͍͏෩ʹमਖ਼ͨ͠ͷ͔ɺͳͥͦͷ मਖ਼Ҋʹͨ͠ͷ͔ΛͳΔ΂͘ॻ͘Α͏ʹ͢Δ

  55. © ZOZO, Inc. ϨϏϡϫʔͷෛ୲Λܰݮ͢ΔͨΊʹɾɾɾ 55 ɾमਖ਼Օॴ΍ӨڹൣғΛύοͱݟͰΘ͔ΔΑ͏ʹ ɹ໌ࣔ͢Δ ʢνʔϜϝϯόʔ͔Βڭ͑ͯ΋Βͬͨ͜ͱͷ1ͭͰ͢ʂʣ

  56. © ZOZO, Inc. 56 ·ͱΊɿPRϨϏϡʔͷඞཁੑ 04 CHAPTER

  57. © ZOZO, Inc. 57 ͜ΜͳʹϨϏϡʔΛ͔ͬ͠Γ΍Δͱɺ޻਺૿͑·͢ΑͶʁ🤔 ͦΕ͚ͩ޻਺Λඅ΍ͯ͠େৎ෉ͳΜͰ͔͢ʁ⚠

  58. © ZOZO, Inc. 58 ݟੵ΋Γஈ֊ͰɺϨϏϡʔظؒΛؚΊͯ޻਺Λࢉग़ ϦϦʔε೔ʹରͯ͠ॊೈͳରԠ΋࣮ࢪ͍ͯ͠Δ ʢಈ࡞ʹ͸໰୊͕ͳ͘ɺίʔυͷॻ͖ํ͚ͩͷϨϏϡʔʹ͍ͭͯ͸ λεΫΛ෼͚ͯϦϑΝΫλϦϯάͱͯ͠ޙͰରԠ͢ΔͳͲʣ

  59. © ZOZO, Inc. PRϨϏϡʔͷඞཁੑ 59 • ϓϩμΫτͷ඼࣭୲อͷͨΊʹඞཁͰ͋Δ • ઃܭɺॻ͖ํ͕ΑΓྑ͍΋ͷʹͳΔ •

    ϨϏϡʔ͢Δ͜ͱͰυϝΠϯ஌͕ࣝ਎ʹͭ͘ • ੒௕ʹܨ͕Δ
  60. None