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

KMMでプラットフォーム依存を抑える設計 / A KMM architecture reducing the platform dependency

KMMでプラットフォーム依存を抑える設計 / A KMM architecture reducing the platform dependency

Masatoshi Kubode

November 16, 2021
Tweet

More Decks by Masatoshi Kubode

Other Decks in Programming

Transcript

  1. ©2021 Wantedly, Inc.
    KMMͰPlatformґଘΛ཈͑Δઃܭ
    ϞόΠϧษڧձ Wantedly × νʔϜϥϘ
    2021/11/16 ٱอग़խढ़

    View full-size slide

  2. ©2021 Wantedly, Inc.
    XXXXBOUFEMZDPNJELVCPEF

    View full-size slide

  3. ©2021 Wantedly, Inc.
    ,..Ͱ1MBUGPSNʹґଘ͢Δίʔυͷ՝୊ײ
    ղܾࡦ
    Ԡ༻
    ·ͱΊ
    ࿩͢͜ͱ

    View full-size slide

  4. ©2021 Wantedly, Inc.
    ՝୊ײ

    View full-size slide

  5. ©2021 Wantedly, Inc.
    42-%FMJHIU
    w ,..Ͱ΋࢖͑ΔσϑΝΫτελϯμʔυͳ03.
    w J04$PSF%BUBɺ"OESPJE3PPNɺ3FBMNతͳ
    ՝୊ײ
    TRϑΝΠϧ͔Βੜ੒͞ΕΔ

    View full-size slide

  6. ©2021 Wantedly, Inc.
    42-%FMJHIU
    w %#ͷΠϯελϯεΛ࡞Δʹ͸4RM%SJWFS͕ඞཁ
    w 4RM%SJWFS͸JOUFSGBDFͰ͋ΓɺJ04"OESPJEͰ
    ࣮૷Ϋϥε͕ҟͳΔ
    w "OESPJEͰ͸$POUFYU͕ඞཁ
    w ϩάΞ΢τ࣌ʹ%#Λ࡟আ͍͚ͨ͠Ͳɺ࡟আํ๏
    ΋J04"OESPJEͰҟͳΔ
    ՝୊ײ

    View full-size slide

  7. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ
    ©2021 Wantedly, Inc.
    ͜ͷࠩΛͲ͏΍ͬͯຒΊΔʁ

    View full-size slide

  8. ©2021 Wantedly, Inc.
    ղܾࡦ

    View full-size slide

  9. ©2021 Wantedly, Inc.
    ΠϯλʔϑΣʔε͚ͩ,..ʹఆٛͯ͠ɺΞϓϦଆ
    Ͱ࣮૷ͯ͠΋Β͏
    FYQFDUBDUVBMΛ࢖͏
    ղܾࡦ

    View full-size slide

  10. ©2021 Wantedly, Inc.
    ΠϯλʔϑΣʔε͚ͩఆٛ͢Δ
    ղܾࡦ
    J04ͰΠϯλʔϑΣʔε
    Λ࣮૷͢ΔʢQSPUPDPMద༻͢Δʣ
    "OESPJEͰΠϯλʔϑΣʔε
    Λ࣮૷͢Δ

    View full-size slide

  11. ©2021 Wantedly, Inc.
    ΠϯλʔϑΣʔε͚ͩఆٛ͢Δ
    ղܾࡦ
    J04ͰΠϯλʔϑΣʔε
    Λ࣮૷͢ΔʢQSPUPDPMద༻͢Δʣ
    "OESPJEͰΠϯλʔϑΣʔε
    Λ࣮૷͢Δ
    J04"OESPJE͕42-%FMJHIUʹ௚઀ґଘͯ͠͠·͏🙅
    J04"OESPJEͷ࣮૷͕૿͑ͯ͠·͏🙅

    View full-size slide

  12. ©2021 Wantedly, Inc.
    FYQFDUBDUVBMΛ࢖͏
    ͬͪ͜ͷ΄͏͕Αͦ͞͏👍
    ղܾࡦ

    View full-size slide

  13. ©2021 Wantedly, Inc.
    FYQFDUBDUVBM
    ղܾࡦ
    https://kotlinlang.org/docs/multiplatform.html

    View full-size slide

  14. ©2021 Wantedly, Inc.
    FYQFDUBDUVBMΛ࢖͏
    ղܾࡦ

    View full-size slide

  15. ©2021 Wantedly, Inc.
    FYQFDUBDUVBMΛ࢖͏
    ղܾࡦ
    ͜Μͳײ͡Ͱ"OESPJEͷ࣮૷͚ͩҾ਺Λ௥ՃͰ͖Δ

    View full-size slide

  16. ©2021 Wantedly, Inc.
    FYQFDUBDUVBMΛ࢖͏
    ղܾࡦ
    ※SharedModule͸KMMͷϞδϡʔϧఆٛΫϥε

    View full-size slide

  17. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ
    ©2021 Wantedly, Inc.
    ΞϓϦଆͷ࣮૷͕γϯϓϧʹ🎉

    View full-size slide

  18. ©2021 Wantedly, Inc.
    Ԡ༻

    View full-size slide

  19. ©2021 Wantedly, Inc.
    "OESPJEͷ$POUFYUґଘՕॴ͸ଞʹ΋͋Δ
    • Use-AgentͷͨΊʹPackageInfoΛऔಘ


    • ApolloͷNormalizedCache
    Ԡ༻
    ແݶʹ,..Ϟδϡʔϧ΁ͷҾ਺͕૿͍͑ͯ͘🙅
    શ෦QVCMJDʹ͠ͳ͚Ε͹ͳΒͳ͍🙅
    ※SharedModule͸KMMͷϞδϡʔϧఆٛΫϥε

    View full-size slide

  20. ©2021 Wantedly, Inc.
    1MBUGPSNΫϥεΛ࡞Δ
    Ԡ༻
    "OESPJEͷBDUVBM࣮૷ʹ͚ͩ$POUFYUΛ΋ͨͤΔ

    View full-size slide

  21. ©2021 Wantedly, Inc.
    1MBUGPSNΫϥεΛ࢖͏
    Ԡ༻

    View full-size slide

  22. ©2021 Wantedly, Inc.
    1MBUGPSNΫϥεΛ࢖͏
    Ԡ༻
    "OESPJEͷBDUVBM࣮૷Ͱ͸1MBUGPSNDPOUFYU͕ݟ͑Δ

    View full-size slide

  23. ©2021 Wantedly, Inc.
    1MBUGPSNΫϥεΛ࢖͏
    Ԡ༻
    JOUFSOBMʹͰ͖Δ

    View full-size slide

  24. ©2021 Wantedly, Inc.
    1MBUGPSNΫϥεΛ࢖͏
    Ԡ༻
    ※SharedModule͸KMMͷϞδϡʔϧఆٛΫϥε
    #FGPSF
    "GUFS

    View full-size slide

  25. ©2021 Wantedly, Inc.
    ·ͱΊ

    View full-size slide

  26. ©2021 Wantedly, Inc.
    w FYQFDUBDUVBM͸͏·͘࢖͑͹ڧྗ
    w 1MBUGPSNͱ͍͏ϓϥοτϑΥʔϜࠩ෼Λٵऩ͢
    ΔΦϒδΣΫτΛJ04"OESPJE͔Β౉͢
    ·ͱΊ

    View full-size slide

  27. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ
    ©2021 Wantedly, Inc.
    🙇

    View full-size slide