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

モバイルアプリでのFeatureFlagの導入

tinpay
September 20, 2019

 モバイルアプリでのFeatureFlagの導入

モバイルアプリでFeature_Flagを導入したお話

tinpay

September 20, 2019
Tweet

More Decks by tinpay

Other Decks in Programming

Transcript

  1. ϞόΠϧΞϓϦͰͷ'FBUVSF'MBHಋೖ
    4FQ 

    .PCJMF"DU04","

    View full-size slide

  2. © Chatwork
    ࣗݾ঺հ
    !2
    $IBUXPSLגࣜձࣾ

    ΫϥΠΞϯτΞϓϦέʔγϣϯ։ൃ෦
    ෱Ҫɹষฏ
    J04ΞϓϦॻ͍ͨΓͯ͠·͢
    UX!UJOQBZ

    View full-size slide

  3. େࡕΦϑΟε
    ੢കాʹҾͬӽ͠·ͨ͠

    View full-size slide

  4. ෱ౡͷ͋ͨΓ
    ص

    View full-size slide

  5. ϞόΠϧΞϓϦͰ
    'FBUVSF'MBHΛಋೖ͢Δ·Ͱ

    View full-size slide

  6. © Chatwork
    'FBUVSF'MBHʢ'FBUVSF5PHHMFʣͱ͸
    !6
    ܧଓతϦϦʔεͱܧଓతσϓϩΠ͸ɺίʔσΟϯάʹ͍ͭͯͷϑΟʔυόοΫΛ։ൃऀͨͪʹ
    සൟʹఏڙͯ͘͠ΕΔɻ͜ΕΛ࣮ݱ͢Δʹ͸ɺෳ਺ͷ։ൃऀͨͪͷίʔυΛՄೳͳݶΓૣظʹ
    ౷߹͢Δ͜ͱ͕ඞཁʹͳΔɻ
    ػೳϒϥϯν͸͜ͷաఔʹൈ͚ಓΛ࡞ͬͯ͠·͏ɻػೳτάϧΛར༻͢Ε͹ɺ։ൃऀͨͪ͸ϝ
    ΠϯͷτϥοΫʹසൟʹιʔεΛ౷߹ͭͭ͠΋ɺ։ൃதͷػೳ΁ೖ͍͚ͬͯΔ࣮ߦܦ࿏ͷτά
    ϧΛʮ0''ʯʹ͓͚ͯ͠͹ɺͦͷػೳ͸ʮࢮΜͩʯঢ়ଶʹͳΔɻ৽͍࣮͠ߦܦ࿏Λ༗ޮʹ͢Δ
    ͨΊͷ࿑ྗ͸ɺ୯ʹτάϧΛʮ0/ʯʹઃఆ͢Δ͚ͩͳͷͰɺे෼ʹখ͍͞ɻ
    Ҿ༻ݩ8JLJQFEJB IUUQTKBXJLJQFEJBPSHXJLJϑΟʔνϟʔτάϧ

    View full-size slide

  7. © Chatwork
    'FBUVSF'MBHʢ'FBUVSF5PHHMFʣͱ͸
    !7
    ݸผͷػೳͷ༗ޮແޮΛϑϥάΛར༻ͯ͠؅ཧ
    ͢Δ࢓૊Έ
    wػೳΛ0''ʹͨ͠ঢ়ଶͰ͋Ε͹͍ͭͰ΋ϦϦʔεͰ͖
    ΔͷͰɺػೳϒϥϯνͷੜଘظ͕ؒ୹͘ͳΔ

    View full-size slide

  8. © Chatwork
    ࣮૷Πϝʔδ͸͜Μͳײ͡
    !8
    struct Feature {
    var isEnabled: Bool
    var name: String
    }
    public final class FeatureFlag {
    static let shared = FeatureFlag()
    let featureA = Feature(isEnabled: true, name: "ػೳA")
    let featureB = Feature(isEnabled: true, name: "ػೳB")
    let featureC = Feature(isEnabled: true, name: "ػೳC")
    }
    class DemoViewModel {
    var message: Message?
    func delete(){
    if FeatureFlag.shared.featureA.isEnabled {
    // ػೳA͕༗ޮͳ৔߹
    displayAlert {
    self.message?.delete()
    }
    } else {
    self.message?.delete()
    }
    }
    }

    View full-size slide

  9. Α͋͘Δέʔε

    View full-size slide

  10. ෳ਺ਓͰ։ൃΛ͓͜ͳ͍ͬͯΔͱ
    ৽ػೳͷ։ൃ͕
    ฒߦͰಈ͘έʔε

    View full-size slide

  11. େ͖Ίͷػೳ"௥Ճ
    ͦͦ͜͜ͷػೳ#௥Ճ
    ͦͦ͜͜ͷػೳ$௥Ճ
    ਓͰ৽ػೳΛ։ൃ͍ͯ͠Δέʔε

    View full-size slide

  12. 'FBUVSF'MBHΛಋೖ͢Δલ

    View full-size slide

  13. ػೳ͝ͱʹϒϥϯνΛ࡞Γ

    ͦͷϒϥϯνʹϚʔδ͍ͯ͘͠։ൃϑϩʔ
    ػೳ"
    ػೳ#
    ػೳ$

    View full-size slide

  14. © Chatwork
    ՝୊
    !14
    ڊେͳ13ʹͳͬͯ͠·͏
    ίϯϑϦΫτ͕େྔʹൃੜͯ͠ɺϚʔδ࡞ۀ͕େมʂ
    ֤ػೳͷ։ൃऀಉ࢜ͷίϛϡχέʔγϣϯίετ͕૿Ճʂ

    View full-size slide

  15. ίϯϑϦΫτ͕େྔʹൃੜͯ͠ɺ

    Ϛʔδ࡞ۀ͕େมʂ
    ػೳ"
    ػೳ#
    ػೳ$
    ͜͜ͷϚʔδ͕
    ͘͢͝େมʂ

    View full-size slide

  16. ֤ػೳͷ։ൃऀಉ࢜ͷίϛϡχέʔγϣ
    ϯίετ͕૿Ճʂ
    ػೳ"ɿλΠϜϥΠϯػೳɺमਖ਼͍ͯͬͯ͠ΔΑɻ
    ػೳ#ɿͦͷमਖ਼ೖ͔ͬͯΒͷํ͕ػೳ#͸ରԠ͠΍͚͢Ͳɺ
    ػೳ"ͷϦϦʔε͸͍ͩͿઌͩΑͳ͊ɻͲ͏͠Α͏͔ɻ
    ػೳ$ɿλΠϜϥΠϯɺ΋͔ͨ͠͠Βमਖ਼ඞཁ͔΋ʜ
    ڞ༗͓͍ͯͨ͠΄͏͕͍͍͔ͳɻ

    View full-size slide

  17. 'FBUVSF'MBHΛಋೖͨ͠ޙ

    View full-size slide

  18. 13͕͙͢ʹϚʔδ͞ΕΔͷͰ
    ίϯϑϦΫτ͕ൃੜ͠ʹ͘͘ͳΔ
    ػೳ"
    ػೳ#
    ػೳ$
    Ϛʔδָ͕ʂ

    View full-size slide

  19. © Chatwork
    ࣮ࡍʹ΍ͬͯΈͨײ૝
    !19
    w ৽ػೳͷ࣮૷͕ͲΜͲΜϚʔδ͞ΕΔΑ͏ʹͳͬͨ
    w ଞͷػೳ࣮૷ͷϦϦʔεΛ଴ͭඞཁ͕ͳ͘ͳͬͨ
    w 13͕খ͘͞ͳͬͨ
    w ίϯϑϦΫτ͕ൃੜ͠ʹ͘͘ͳͬͨ
    w ػೳϦϦʔεΛίϯτϩʔϧͰ͖ΔΑ͏ʹͳͬͨ
    w ࣾ಺ϝϯόʔʹ͚ͩػೳΛ༗ޮʹ͢Δͱ͍͏Α͏ͳϑϩʔ͕؆୯ʹ࣮ݱͰ͖Δ
    w ΍Γ͗͢ΔͱϦδΣΫτର৅ʹͳΔͷͰؾΛ͚ͭΔඞཁ͸͋Γ

    View full-size slide

  20. © Chatwork
    ࣮ࡍʹ΍ͬͯΈͨײ૝
    !20
    w 4UPSZCPBSE্Ͱͷ෼ذ͸ෆՄೳ
    w 4UPSZCPBSEͰQSPQFSUZΛ৭ʑઃఆ͍ͯ͠Δ৔߹͸qBHʹΑΔ෼ذ͕೉͍͠
    ͕ɺ7JFX$POUSPMMFSͰͷ෼ذ͸ՄೳͳͷͰɺ͋Δఔ౓͸6*ͷ෼ذ΋Ͱ͖Δ
    w "#ςετͷج൫ͮ͘ΓʹͳΔ
    w ϑϥάʹΑͬͯػೳΛ੾Γସ͑ΔͷͰɺ"#ςετ։ൃͷ࣮૷ʹࣅ͍ͯΔ

    View full-size slide

  21. © Chatwork
    ·ͱΊ
    !22
    'FBUVSF'MBHͷϝϦοτ
    w ͍ͭͰ΋EFWFMPQʹ13ΛϚʔδͰ͖ΔΑ͏ʹͳͬͨ
    w ϦϦʔε൛ΞϓϦΛར༻ͯ͠ɺ৽ػೳΛૣ͘ఏڙͰ͖Δ
    'FBUVSF'MBHΛ࢖ͬͯࢥͬͨ͜ͱ
    w 4UPSZCPBSEͰͷར༻͸೉͍͠ɺେ͖͗͢Δमਖ਼ʹ޲͍ͯͳ͍
    w ϑϥάʹΑΔ෼ذͷ࣮૷͸Ҋ֎γϯϓϧͳͷͰɺ·ͣ͸΍ͬͯ
    ΈͯΑ͔ͬͨ

    View full-size slide

  22. https://corp.chatwork.com/ja/recruit/engineer/
    ϞόΠϧΞϓϦ
    ΤϯδχΞ
    ืूͯ͠·͢ʂ

    View full-size slide

  23. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide