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

ABEMA モバイルアプリにおける 「アーキテクチャ」 / ABEMA Mobile Architecture (CA.swift #18)

Akio Yasui
November 20, 2023

ABEMA モバイルアプリにおける 「アーキテクチャ」 / ABEMA Mobile Architecture (CA.swift #18)

Akio Yasui

November 20, 2023
Tweet

More Decks by Akio Yasui

Other Decks in Programming

Transcript

  1. 2023/11/20 CA.swift #18
    ABEMA ϞόΠϧΞϓϦʹ͓͚Δ


    ʮΞʔΩςΫνϟʯ
    גࣜձࣾAbemaTV ҆Ҫӯஉ

    View full-size slide

  2. ࣗݾ঺հ
    • ҆Ҫ ӯஉ / Akio Yasui


    • 2019೥ גࣜձࣾAbemaTV ৽ଔೖࣾ


    • SNS: @akkyie


    • iOS ΞϓϦͷج൫पΓΛ୲౰


    • 2021೥͝Ζ͔ΒΞʔΩςΫνϟؔ࿈ͷऔΓ૊Έ

    View full-size slide

  3. ΞδΣϯμ
    • ΞʔΩςΫνϟͷٞ࿦ʹࢸͬͨഎܠ


    • ϓϥοτϑΥʔϜʹด͡ͳ͍ʮΞʔΩςΫνϟʯͷఆٛ


    • ABEMAͷϨΠϠʔߏ଄ͱɺAPIͱͷؔ܎ੑ


    • ϞόΠϧΞϓϦͷΞʔΩςΫνϟͷߟ͔͑ͨ


    • ABEMAʹ͓͚ΔΞʔΩςΫνϟͷ՝୊ͱͦͷઌ

    View full-size slide

  4. ΞʔΩςΫνϟͷٞ࿦ʹࢸͬͨഎܠ

    View full-size slide

  5. ΞʔΩςΫνϟͷٞ࿦ʹࢸͬͨഎܠ
    “Multiplatform Engineering”
    AbemaTV, Inc. All Rights Reserved
 10
    ※ Daydream, Clova Desk サポート終了
    対応デバイス 拡大
    2016
    iOS
    mobile
    Android
    mobile
    Web
    pc / mobile
    Chrome
    cast
    Apple
    TV
    Android
    TV
    IPTV
    Daydream
    Clova
    Desk
    Google
    Nest Hub
    Game
    Console
    2017 2019
    2018 2020 2021
    Amazon
    Alexa
    Amazon
    Fire TV
    Amazon
    FIre Tablet
    2022
    AbemaTV, Inc. All Rights Reserved
 1
    Multiplatform Engineering Roadmap for the Future (2021)


    https://developer.abema.io/2021/sessions/bvjpwJEoGP/

    View full-size slide

  6. AbemaTV, Inc. All Rights Reserved
 16
    対応デバイス 拡大
    Desktop
    Browser
    Android Web Unity
    Mobile
    Browser
    Mobile
    App
    Smart
    Display/
    Speaker
    TV
    iOS
    iOS
    Mobile
    Android
    Mobile
    PC
    Web
    Chrome
    cast
    Apple
    TV
    Android
    TV
    IPTV
    Google
    Nest Hub
    Game
    Console
    Amazon
    Fire TV
    Amazon
    FIre Tablet
    Mobile
    Web
    ユースケース
    技術スタック
    ΞʔΩςΫνϟͷٞ࿦ʹࢸͬͨഎܠ
    “Multiplatform Engineering”
    AbemaTV, Inc. All Rights Reserved
 1
    Multiplatform Engineering Roadmap for the Future (2021)


    https://developer.abema.io/2021/sessions/bvjpwJEoGP/

    View full-size slide

  7. AbemaTV, Inc. All Rights Reserved

    対応デバイス 拡大
    18
    汎化と特化
    Use Cases
    Entities
    UI
    Presentation
    DB
    platform-specific
    APIs
    External
    Interfaces
    Gateways
    Presenters
    Controllers
    特化
    汎化
    ● 特化する部分
    ○ プレゼンテーション層
    ○ プラットフォーム固有 エンティティ・ユー
    スケース
    ● 汎化する部分
    ○ 汎化された外部IF
    ○ プラットフォームに依存しないエンティティ
    ・ユースケース
    ΞʔΩςΫνϟͷٞ࿦ʹࢸͬͨഎܠ
    “Multiplatform Engineering”
    AbemaTV, Inc. All Rights Reserved
 1
    Multiplatform Engineering Roadmap for the Future (2021)


    https://developer.abema.io/2021/sessions/bvjpwJEoGP/

    View full-size slide

  8. ΞʔΩςΫνϟͷٞ࿦ʹࢸͬͨഎܠ
    “Multiplatform Engineering”
    AbemaTV, Inc. All Rights Reserved
 1
    Multiplatform Engineering Roadmap for the Future (2021)


    https://developer.abema.io/2021/sessions/bvjpwJEoGP/
    AbemaTV, Inc. All Rights Reserved

    Mobile Appが抱えていた課題
    27
    リアーキテクチャ
    ● 設計によってコンポーネント間 疎結合が担保されていない
    ● テスタビリティ・メンテナビリティ 低さ
    ● AndroidとiOS 仕様・実装差異 拡大
    ● UI開発 安全性と生産性 低下
    AbemaTV, Inc. All Rights Reserved

    Mobile Appが抱えていた課題
    28
    リアーキテクチャ

    KMM
    ● 設計によってコンポーネント間 疎結合が担保されていない
    ● テスタビリティ・メンテナビリティ 低さ
    ● AndroidとiOS 仕様・実装差異 拡大
    ● UI開発 安全性と生産性 低下

    View full-size slide

  9. ΞʔΩςΫνϟͷٞ࿦ʹࢸͬͨഎܠ
    “Multiplatform Engineering”
    ,...PEVMFT
    %PNBJO
    3FQPTJUPSZ
    6*
    $PNQPOFOU
    6TF$BTF
    6*-PHJD
    *OUFSGBDF
    3FQPTJUPSZ
    *OUFSGBDF
    6*-PHJD
    6TF$BTF
    *OUFSGBDF
    %#
    "1*4FSWJDF
    "1*4FSWJDF
    *OUFSGBDF
    $BDIF
    "1*
    3FQPTJUPSZ
    %#
    $BDIF
    04%FWJDF
    &WFOU
    6TF$BTF
    6TF$BTF
    *OUFSGBDF
    ,.."SDIJUFDUVSF
    4IBSJOHUIFDPNNPOCVTJOFTTMPHJD
    AbemaTV, Inc. All Rights Reserved
 1
    ABEMAϞόΠϧΞϓϦ։ൃͷDevOpsઓུ (2022) ۩ମతͳઃܭ͸౰࣌ͷ΋ͷ
    https://cadc.cyberagent.co.jp/2022/program/abema-mobile-app-devops/

    View full-size slide

  10. Ͳ͏͍͏ٞ࿦Λ͔ͨ͠
    ϓϥοτϑΥʔϜ͝ͱʹϕετϓϥΫςΟε͕ҟͳΔ
    https://developer.apple.com/documentation/uikit/about_app_development_with_uikit/


    https://github.com/pointfreeco/swift-composable-architecture


    https://developer.android.com/topic/architecture?hl=ja

    View full-size slide

  11. Ͳ͏͍͏ٞ࿦Λ͔ͨ͠
    લఏͱͳΔೝࣝΛ͋ΘͤΔඞཁੑ
    • ʮυϝΠϯʯͱ͸ʁ


    • ʮϢʔεέʔεʯͱ͸ʁ


    • ʮϨΠϠʔʯʁʮϞδϡʔϧʯʁʮύοέʔδʯʁ

    View full-size slide

  12. Ͳ͏͍͏ٞ࿦Λ͔ͨ͠
    ڞ௨ೝࣝΛυΩϡϝϯτͱͯ͠੔උ

    View full-size slide

  13. ʮΞʔΩςΫνϟʯͱ͸ʁ

    View full-size slide

  14. ʮΞʔΩςΫνϟʯͱ͸ʁ
    • ʮઃܭʯͱ͸Ͳ͏ҧ͏ʁ


    • ʮΞʔΩςΫνϟʯͱ໊ͷͭ͘/ݺ͹ΕΔ༷ʑͳ΋ͷ


    • Clean ArchitectureɺMVC΍MVVMɺThe Composable
    Architectureɺ…


    • ͲΕ΋ʮΞʔΩςΫνϟʯʁ


    • UIKit/SwiftUIɺiOS/AndroidɺMobile/Webɺ…
    ΞʔΩςΫνϟ͸ڞ௨ʁมΘΔʁ
    Clean Architectureʹ΋MVC͸ؚ·ΕΔ🧐


    ʰClean Architecture ୡਓʹֶͿιϑτ΢ΣΞͷߏ଄ͱઃܭʱp.202

    View full-size slide

  15. ΞʔΩςΫνϟͱ͸
    ʮϓϩμΫτ΍νʔϜΛલఏͱͨ͠ɺ
    ઃܭ্ɾ࣮૷্ͷτϨʔυΦϑʹର͢Δ൑அࢦ਑ʯ

    View full-size slide

  16. ΞʔΩςΫνϟͱ͸
    ʮϓϩμΫτ΍νʔϜΛલఏͱͨ͠ɺ
    ઃܭ্ɾ࣮૷্ͷτϨʔυΦϑʹର͢Δ൑அࢦ਑ʯ

    View full-size slide

  17. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ࢓༷ ࣮૷
    ઃܭ

    View full-size slide

  18. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ࣮૷C
    ࣮૷B
    ࢓༷ ࣮૷A
    ઃܭ

    View full-size slide

  19. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ࣮૷C
    ࣮૷B
    ࢓༷ ࣮૷A
    ઃܭC
    ઃܭB
    ઃܭA

    View full-size slide

  20. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ࣮૷C
    ࣮૷B
    ࣮૷A
    ઃܭC
    ઃܭB
    ઃܭA
    ͲΕΛબͿʁ

    View full-size slide

  21. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ύϑΥʔϚϯε
    ✔︎
    ✔︎
    ৴པੑ
    ✔︎
    ϝϯςφϯεੑ
    ✔︎
    ✔︎

    ઃܭA ઃܭB ઃܭC

    View full-size slide

  22. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ύϑΥʔϚϯε
    ✔︎
    ✔︎
    ৴པੑ
    ✔︎
    ϝϯςφϯεੑ
    ✔︎
    ✔︎

    ઃܭA ઃܭB ઃܭC
    τϨʔυΦϑ τϨʔυΦϑ

    View full-size slide

  23. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ύϑΥʔϚϯε
    ✔︎
    ✔︎
    ৴པੑ
    ✔︎
    ϝϯςφϯεੑ
    ✔︎
    ✔︎

    ઃܭA ઃܭB ઃܭC
    ͲͷΑ͏ͳಛੑΛ


    ༏ઌ͢Δ͔
    τϨʔυΦϑ τϨʔυΦϑ

    View full-size slide

  24. ʮΞʔΩςΫνϟʯͱ͸
    ୯७Խͨ͠։ൃϓϩηε
    ύϑΥʔϚϯε
    ✔︎
    ✔︎
    ৴པੑ
    ✔︎
    ϝϯςφϯεੑ
    ✔︎
    ✔︎

    ઃܭA ઃܭB ઃܭC
    ͲͷΑ͏ͳ
    ઃܭʢߏ଄ʣΛ


    બ୒͢Δ͔
    τϨʔυΦϑ τϨʔυΦϑ

    View full-size slide

  25. ʮΞʔΩςΫνϟʯͱ͸
    ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʱʹΑΔఆٛ
    ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʕΤϯδχΞϦϯάʹجͮ͘ମܥతΞϓϩʔνʱ


    https://www.oreilly.co.jp/books/9784873119823/

    View full-size slide

  26. ʮΞʔΩςΫνϟʯͱ͸
    ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʱʹΑΔఆٛ
    • ΞʔΩςΫνϟಛੑ


    • ࣄۀ΍૊৫Λ΋ͱʹͨ͠ɺγεςϜʹٻΊΒΕΔੑ࣭


    • ߏ଄


    • ϨΠϠʔ΍αʔϏεͳͲͷઃܭɺιʔείʔυͷฤ੒ͳͲ


    • ΞʔΩςΫνϟܾఆ


    • ಛੑ΍ߏ଄ʹӨڹΛ༩͑Δҙࢥܾఆ


    • ઃܭࢦ਑


    • νʔϜ͕࣮ࡍʹઃܭΛ͢ΔࡍͷࢀߟʹͰ͖Δࢦ਑

    View full-size slide

  27. ʮΞʔΩςΫνϟʯͱ͸
    ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʱʹΑΔఆٛ
    • ΞʔΩςΫνϟಛੑ


    w lద੾ͳΞʔΩςΫνϟಛੑΛ໌Β͔ʹ͢Δʹ͸ɺυϝΠϯͷؔ৺ࣄΛ

    ຋༁Ͱ͖ͳ͚Ε͹ͳΒͳ͍ɻॏཁͳͷ͸εέʔϥϏϦςΟͩΖ͏͔ɻ

    ͦΕͱ΋ɺ଱ো֐ੑ΍ηΩϡϦςΟɺύϑΥʔϚϯεͩΖ͏͔ɻz

    * υϝΠϯ: ιϑτ΢ΣΞ͕ର৅ͱ͢Δࣄۀ΍ۀքͱ͍ͬͨ໰୊ྖҬ

    w lυϝΠϯͷεςʔΫϗϧμʔͱڠྗͯ͠ΞʔΩςΫνϟಛੑΛఆٛ͢Δ

    ࡍ͸ɺαϙʔτ͢ΔΞʔΩςΫνϟಛੑͷ਺ΛՄೳͳݶΓߜΖ͏ɻ

    ͢΂ͯͷΞʔΩςΫνϟಛੑΛαϙʔτ͢Δ൚༻ΞʔΩςΫνϟΛ

    ઃܭ͠Α͏ͱ͢Δͷ͸ɺΞʔΩςΫνϟͰΑ͋͘ΔΞϯνύλʔϯͩɻ

    ΞʔΩςΫνϟಛੑΛαϙʔτ͢Δ͜ͱͰɺγεςϜશମͷઃܭ͸

    ෳࡶʹͳ͍ͬͯ͘ɻz
    ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʱ p.67

    View full-size slide

  28. ʮΞʔΩςΫνϟʯͱ͸
    ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʱʹΑΔఆٛʢͷղऍʣ
    • ʮΞʔΩςΫνϟΛܾΊΔʯͱ͍͏͜ͱ =


    ࣄۀ΍૊৫Λ΋ͱʹ༏ઌ͢΂͖ΞʔΩςΫνϟಛੑΛܾΊɺ


    ͦΕΛຬͨ͢Α͏ͳߏ଄΍ઃܭΛఆΊɺ


    ҙࢥܾఆ΍มߋΛه࿥͠ɺ


    কདྷͷͨΊʹઃܭࢦ਑Λ໌จԽ͢Δ͜ͱ

    View full-size slide

  29. ΞʔΩςΫνϟͱ͸
    ʮϓϩμΫτ΍νʔϜΛલఏͱͨ͠ɺ
    ઃܭ্ɾ࣮૷্ͷτϨʔυΦϑʹର͢Δ൑அࢦ਑ʯ

    View full-size slide

  30. ʮΞʔΩςΫνϟʯͷछྨ
    “ϝλ” ΞʔΩςΫνϟ


    ΞʔΩςΫνϟʢओʹߏ଄ʣ
    ʹ͍ͭͯͷݪଇ΍ΨΠυϥΠϯ
    Clean Architecture


    (SOLID, ҆ఆґଘͷݪଇ, ด࠯ੑڞ௨ͷݪଇ, …)
    Android Developers “Guide to app architecture”
    ΞʔΩςΫνϟελΠϧ
    ΞʔΩςΫνϟύλʔϯ


    ʢσβΠϯύλʔϯʣ
    MVC, MVVM, MVP, Flux, VIPER, …


    ϨΠϠʔυΞʔΩςΫνϟ,


    ϚΠΫϩαʔϏεΞʔΩςΫνϟ, …
    ΞʔΩςΫνϟϑϨʔϜϫʔΫ


    ಛఆͷΞʔΩςΫνϟύλʔϯΛ
    ڧ੍ͯ͘͠ΕΔϑϨʔϜϫʔΫ
    The Composable Architecture,


    RIBs, Unio, …

    View full-size slide

  31. ʮΞʔΩςΫνϟʯͱ͸
    ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʱʹΑΔఆٛ
    • ΞʔΩςΫνϟಛੑ


    • ࣄۀ΍૊৫Λ΋ͱʹͨ͠ɺγεςϜʹٻΊΒΕΔੑ࣭


    • ߏ଄


    • ϨΠϠʔ΍αʔϏεͳͲͷઃܭɺιʔείʔυͷฤ੒ͳͲ


    • ΞʔΩςΫνϟܾఆ


    • ಛੑ΍ߏ଄ʹӨڹΛ༩͑Δҙࢥܾఆ


    • ઃܭࢦ਑


    • νʔϜ͕࣮ࡍʹઃܭΛ͢ΔࡍͷࢀߟʹͰ͖Δࢦ਑

    View full-size slide

  32. ߏ଄ͷ͸ͳ͠

    View full-size slide

  33. ABEMAϞόΠϧΞϓϦͷϨΠϠʔߏ଄

    View full-size slide

  34. αʔϏεͱͯ͠ͷ
    ڞ௨ͷ஌ࣝ
    ABEMAϞόΠϧΞϓϦͷϨΠϠʔߏ଄

    View full-size slide

  35. ABEMAϞόΠϧΞϓϦͷϨΠϠʔߏ଄
    αʔϏεͱͯ͠ͷ
    ڞ௨ͷ஌ࣝ
    ΞϓϦͱͯ͠ͷ
    ࢓༷

    View full-size slide

  36. ABEMAϞόΠϧΞϓϦͷϨΠϠʔߏ଄
    αʔϏεͱͯ͠ͷ
    ڞ௨ͷ஌ࣝ
    ΞϓϦͱͯ͠ͷ
    ࢓༷
    UIදݱ΍
    OSͱͷ΍ΓͱΓ

    View full-size slide

  37. ABEMAϞόΠϧΞϓϦͷϨΠϠʔߏ଄
    αʔϏεͱͯ͠ͷ
    ڞ௨ͷ஌ࣝ
    ΞϓϦͱͯ͠ͷ
    ࢓༷
    UIදݱ΍
    OSͱͷ΍ΓͱΓ
    σʔλͷӬଓԽͳͲ
    ֎෦ͱͷ΍ΓͱΓ

    View full-size slide

  38. ABEMAϞόΠϧΞϓϦͷϨΠϠʔߏ଄
    αʔϏεͱͯ͠ͷ
    ڞ௨ͷ஌ࣝ
    ΞϓϦͱͯ͠ͷ
    ࢓༷
    UIදݱ΍
    OSͱͷ΍ΓͱΓ
    σʔλͷӬଓԽͳͲ
    ֎෦ͱͷ΍ΓͱΓ
    • ͳͥAPIͷݺͼग़͠ΛRepositoryͰ
    ந৅ԽʢӅṭʣ͠ͳ͍ͷ͔

    View full-size slide

  39. ABEMAϞόΠϧΞϓϦͷϨΠϠʔߏ଄
    αʔϏεͱͯ͠ͷ
    ڞ௨ͷ஌ࣝ
    ΞϓϦͱͯ͠ͷ
    ࢓༷
    UIදݱ΍
    OSͱͷ΍ΓͱΓ
    σʔλͷӬଓԽͳͲ
    ֎෦ͱͷ΍ΓͱΓ
    • ͳͥAPIͷݺͼग़͠ΛRepositoryͰ
    ந৅ԽʢӅṭʣ͠ͳ͍ͷ͔


    • ͦ΋ͦ΋ɺΞϓϦʹϨΠϠʔυΞʔΩςΫνϟʢυϝΠϯ΍Ϣʔεέʔεʣ
    ͸ඞཁͳͷ͔

    View full-size slide

  40. DomainɾRepositoryͱAPI
    Repositoryͷ໾ׂ
    • Repository = υϝΠϯϞσϧΛ γεςϜ಺෦ ʹอଘ͢Δ໾ׂ


    • γεςϜʢΞϓϦʣͷ౎߹ͰมߋͰ͖Δ΋ͷ


    • υϝΠϯϞσϧʹҰக͢ΔܗͰઃܭͰ͖Δ


    • ಁաతʹѻ͑Δ৔߹͸ωοτϫʔΫΛލ͙৔߹΋͋Δ
    Repository
    Logic
    App
    File
    DB
    SDK iCloud Firebase

    View full-size slide

  41. DomainɾRepositoryͱAPI
    Repositoryͷ໾ׂ
    • APIʢόοΫΤϯυʣ͸ΞϓϦͱ…


    • ผͷγεςϜʁ


    • ಉ͡γεςϜʁ

    View full-size slide

  42. DomainɾRepositoryͱAPI
    Repositoryͷ໾ׂ
    • APIʢόοΫΤϯυʣ͸ΞϓϦͱ…


    • ผͷγεςϜʁ


    • ಉ͡γεςϜʁ


    → ͲͪΒͷଊ͑ํ΋͋Γ͑ΔͷͰ͸

    View full-size slide

  43. DomainɾRepositoryͱAPI
    ʮγεςϜʯͷڥք
    • όοΫΤϯυΛ ผͷγεςϜ ͱଊ͑ͯΈΔ


    • ΫϥΠΞϯτͱόοΫΤϯυ͸ҟͳΔνʔϜ͕։ൃ͢Δ͜ͱ΋ଟ͍


    • νʔϜ͕ҧ͑͹มԽͷεϐʔυ΋ҟͳΔ


    • cf. ίϯ΢ΣΠͷ๏ଇ


    • γεςϜͱͯ͠ͷ໨త͕ҧ͏ͷͰϞσϧ΋ҟͳΔ

    View full-size slide

  44. • όοΫΤϯυΛ ผͷγεςϜ ͱଊ͑ͯΈΔ


    • Clean ArchitectureͳͲ͸ 1ͭͷγεςϜ ͷઃܭʹ͍ͭͯઆ໌͍ͯ͠Δ


    • ͦΕͧΕ͕ “ಉ৺ԁ” Λ͍࣋ͬͯΔ͜ͱʹͳΔ
    DomainɾRepositoryͱAPI
    ʮγεςϜʯͷڥք
    Domain
    Application
    Presentation Infrastructure
    Domain
    Application
    Presentation Infrastructure
    App Backend
    UI
    JSON


    protobuf



    DB

    View full-size slide

  45. • όοΫΤϯυΛ ಉ͡γεςϜ ͱଊ͑ͯΈΔ


    • υϝΠϯϞσϧͷ࠶࣮૷Λආ͚ΔͳΒɺΞϓϦ͸දࣔ
    ʢϓϨθϯςʔγϣϯ૚ʣʹప͢Δ


    • BFF΍Server-Driven UI͕͜ͷܗʹ͋ͨΔ
    DomainɾRepositoryͱAPI
    ʮγεςϜʯͷڥք
    Presentation
    Domain
    Application
    Infrastructure
    App Backend
    UI DB
    JSON


    protobuf



    View full-size slide

  46. • όοΫΤϯυΛ ಉ͡γεςϜ ͱଊ͑ͯΈΔ


    • υϝΠϯϞσϧͷ࠶࣮૷Λආ͚ΔͳΒɺΞϓϦ͸දࣔ
    ʢϓϨθϯςʔγϣϯ૚ʣʹప͢Δ


    • BFF΍Server-Driven UI͕͜ͷܗʹ͋ͨΔ
    DomainɾRepositoryͱAPI
    Repositoryͷ໾ׂ
    Presentation
    Domain
    Application
    Infrastructure
    App Backend
    UI DB
    ϓϥοτϑΥʔϜͷڥք
    νʔϜͷڥք
    BFF

    View full-size slide

  47. DomainɾRepositoryͱAPI
    ʮγεςϜʯͷڥք
    • όοΫΤϯυΛ ผͷγεςϜ ͱଊ͑Δ


    • ΞϓϦݻ༗ͷϩδοΫ͕ଟ͍৔߹


    • ΦϑϥΠϯରԠͳͲΞϓϦ୯ମͰಈ࡞͢Δඞཁ͕͋Δ৔߹


    • ൚༻తͳAPIΛఏڙ/ར༻͢Δ͜ͱ͕ॏཁͳ৔߹


    • αʔόʔଆͷ։ൃίετ͕ߴ͍৔߹
    • όοΫΤϯυΛ ಉ͡γεςϜ ͱଊ͑Δ


    • ߴ͍ϦϦʔεαΠΫϧ͕ඞཁͳ৔߹


    • ΫϥΠΞϯτͷछྨ͕গͳ͍৔߹


    • ΞϓϦͱόοΫΤϯυͷ։ൃαΠΫϧΛ߹ΘͤΒΕΔ৔߹

    View full-size slide

  48. DomainɾRepositoryͱAPI
    ʮγεςϜʯͷڥք
    • όοΫΤϯυΛ ผͷγεςϜ ͱଊ͑Δ


    • ΞϓϦݻ༗ͷϩδοΫ͕ଟ͍৔߹


    • ΦϑϥΠϯରԠͳͲΞϓϦ୯ମͰಈ࡞͢Δඞཁ͕͋Δ৔߹


    • ൚༻తͳAPIΛఏڙ/ར༻͢Δ͜ͱ͕ॏཁͳ৔߹


    • αʔόʔଆͷ։ൃίετ͕ߴ͍৔߹
    • όοΫΤϯυΛ ಉ͡γεςϜ ͱଊ͑Δ


    • ߴ͍ϦϦʔεαΠΫϧ͕ඞཁͳ৔߹


    • ΫϥΠΞϯτͷछྨ͕গͳ͍৔߹


    • ΞϓϦͱόοΫΤϯυͷ։ൃαΠΫϧΛ߹ΘͤΒΕΔ৔߹
    ABEMAͰ͸ͪ͜Βͷଊ͑ํΛબ୒

    View full-size slide

  49. ΞʔΩςΫνϟͷߟ͔͑ͨʢࢲݟʣ
    • ΞϓϦͷΞʔΩςΫνϟΛߟ͑Δͱ͖͸
    • ٕज़ʹด͡ͳ͍


    • ࣄۀͱͯ͠༏ઌ͢΂͖ΞʔΩςΫνϟಛੑΛݟఆΊΔ
    • ΞϓϦʹด͡ͳ͍


    • ϓϩμΫτΛܗ࡞ΔʮγεςϜʯશମ͔ΒΞʔΩςΫνϟΛߟ͑Δ
    • ʮΞʔΩςΫνϟ୲౰ʯʹด͡ͳ͍


    • νʔϜʹܾఆ΍ࢦ਑Λల։͢Δ

    View full-size slide

  50. ABEMAͰͰ͖ͯ “͍ͳ͍” ͜ͱ
    • ΞʔΩςΫνϟಛੑͷ໌จԽ


    • ·ͩ҉໧తʹͳͬͯ͠·͍ͬͯΔ
    • νʔϜ΁ͷల։


    • ݕূஈ֊ͷ෦෼΋ଟ͘ਁಁ͖ͤ͞Ε͍ͯͳ͍


    • GitHub Discussions΍ADR (Architectural Decision Records) ʹΑΓه
    ࿥ʹ͸࢒࢝͠Ί͍ͯΔ
    • όοΫΤϯυνʔϜͱͷೝࣝ߹Θͤ


    • ABEMAશମͰͷυϝΠϯϞσϦϯάͳͲਐߦத

    View full-size slide

  51. ΞʔΩςΫνϟͷͦͷઌ
    • ςετΞʔΩςΫνϟʢDevOpsʣ


    • ඼࣭ɾ։ൃαΠΫϧɾίετͷτϨʔυΦϑ
    • υϝΠϯϞσϦϯά΍Ϣʔεέʔεઃܭͷϓϩηε


    • DDDʢυϝΠϯۦಈ։ൃʣɺICONIXϓϩηε
    • ػೳ࢓༷ࣗମ΍UIσβΠϯ΁ͷΞϓϩʔν


    • UIߏ଄ԽɺϞσϧϕʔεUIσβΠϯ΍OOUIͱͷؔ܎ੑ
    • ૊৫ߏ଄ͱͷ૬ޓ࡞༻


    • ίϯ΢ΣΠͷ๏ଇɾ ٯίϯ΢ΣΠͷ๏ଇ

    View full-size slide

  52. • աڈൃදࢿྉ


    • ABEMA ϞόΠϧΞϓϦʹ͓͚ΔϦΞʔΩςΫνϟͷऔΓ૊Έͱల๬ (CA BASE NEXT 2021)
    https://ca-base-next.cyberagent.co.jp/2021/sessions/abema-mobile-rearchitecture/
    https://developers.cyberagent.co.jp/blog/archives/29967/


    • Multiplatform Engineering Roadmap for the Future (ABEMA Developer Conference 2021)
    https://developer.abema.io/2021/sessions/bvjpwJEoGP/


    • ABEMAϞόΠϧΞϓϦ։ൃͷDevOpsઓུ (CyberAgent Developer Conference 2022)
    https://cadc.cyberagent.co.jp/2022/program/abema-mobile-app-devops/


    • ΞʔΩςΫνϟؔ࿈


    • Mark RichardsɺNeal Fordɹஶɺౡా ߒೋɹ༁ʰιϑτ΢ΣΞΞʔΩςΫνϟͷجૅʕΤϯδχΞϦϯάʹجͮ͘ମܥతΞϓϩʔνʱΦϥΠϦʔɾδϟύϯ
    https://www.oreilly.co.jp/books/9784873119823/


    • Robert C. Martin (ஶ), ֯੐య, ∁໦ਖ਼߂ (༁) ʰClean Architecture ୡਓʹֶͿιϑτ΢ΣΞͷߏ଄ͱઃܭʱΞεΩʔυϫϯΰ
    https://www.kadokawa.co.jp/product/301806000678/


    • Titus WintersɺTom ManshreckɺHyrum Wrightɹฤɺ஛ล ༃তɹ؂༁ɺٱ෋໦ ོҰɹ༁
    ʰGoogleͷιϑτ΢ΣΞΤϯδχΞϦϯάʕ࣋ଓՄೳͳϓϩάϥϛϯάΛࢧ͑Δٕज़ɺจԽɺϓϩηεʱΦϥΠϦʔɾδϟύϯ
    https://www.oreilly.co.jp/books/9784873119656/


    • ఝٶጏ೭հ, ԣນܓਅʰνʔϜͰҭͯΔAndroidΞϓϦઃܭʱ PEAKSग़൛
    https://peaks.cc/books/architecture_with_team


    • ઃܭɺ։ൃϓϩηε


    • ΤϦοΫɾΤϰΝϯε ஶ ࠓؔ ߶ ؂༁ ࿨ஐ ӈܡ, ຀໺ ༞ࢠ ຋༁ ʰΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭʱᠳӭࣾ
    https://www.shoeisha.co.jp/book/detail/9784798126708


    • ϰΥʔϯɾϰΝʔϊϯ ஶ ∁໦ ਖ਼߂ ຋༁ʰ࣮ફυϝΠϯۦಈઃܭʱᠳӭࣾ
    https://www.shoeisha.co.jp/book/detail/9784798131610


    • μάɾϩʔθϯόʔά, ϚοτɾεςϑΝϯ ஶ ࡾՏ३Ұ, ࠤ౻ཽҰ, ધ໦݈ࣇ ༁ ʰϢʔεέʔεۦಈ։ൃ࣮ફΨΠυʱᠳӭࣾ
    https://www.shoeisha.co.jp/book/detail/9784798114453


    • ʢຊࢿྉͰ௚઀Ҿ༻͍ͯ͠ͳ͍΋ͷ΋ؚΉʣ
    ࢀߟจݙɾؔ࿈ॻ੶

    View full-size slide