機材管理ツールをFirebaseで構築しようとした話 / Building equipment management software with Firebase
by
Yusei Yamanaka
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
ػࡐཧπʔϧΛ'JSFCBTFͰ ߏங͠Α͏ͱͨ͠ גࣜձࣾ"CFNB57 :VTFJ:"."/"," !UPSJJNJZVLLJ
Slide 2
Slide 2 text
ࣗݾհ
Slide 3
Slide 3 text
ࣗݾհ 山中勇成 @toriimiyukki 株式会社サイバーエージェント 2017年新卒 株式会社AbemaTV 開発本部 コンテンツ配信チーム 慶應義塾大学湘南藤沢キャンパス(SFC) 卒業
Slide 4
Slide 4 text
ػࡐཧπʔϧ
Slide 5
Slide 5 text
ػࡐཧͷ՝ ػࡐ͕୭ͷͷͳͷ͔͕͔Βͳ͍ ػࡐΛ͍͔͕͔ͭͬͨΒͳ͍ ୭͔ʹିͯ͠͠Βͨ͘͠ޙʹͦͷػࡐ͕Ͳ͜ʹ͋Δͷ͔͔Βͳ͍ ػࡐʹԿ͕ηοτͰೖ͍ͬͯΔͷ͔͔Βͳ͍ ͯ͢'JSFCBTFͰղܾʂ
Slide 6
Slide 6 text
ͳͥ'JSFCBTFʜʁ खܰʹΞϓϦέʔγϣϯΛ࡞Γ͔ͨͬͨ αʔόͷڥσʔλϕʔεͷߏஙʹ࣌ؒΛ͍ͨ͘ͳ͔ͬͨ Ͱ͖Δ͚͓ͩۚΛ͔͚ͣʹ࡞Γ͔ͨͬͨ લʹ3FBMUJNF%BUBCBTFΛͬͨ͜ͱ͕͋ͬͨɺ $MPVE'JSFTUPSFΛͬͨ͜ͱ͕ͳ͔ͬͨͷͰͬͯΈ͔ͨͬͨ
Slide 7
Slide 7 text
ػࡐཧͷ՝ղܾํ๏ ػࡐ͕୭ͷͷͳͷ͔͕͔Βͳ͍ ػࡐΛ͍͔͕͔ͭͬͨΒͳ͍ ୭͔ʹିͯ͠͠Βͨ͘͠ޙʹͦͷػࡐ͕Ͳ͜ʹ͋Δͷ͔͔Βͳ͍ ػࡐʹԿ͕ηοτͰೖ͍ͬͯΔͷ͔͔Βͳ͍ ػࡐʹ23ίʔυΛ͚ͯɺಡΈऔΔͱ8FCϖʔδ͕දࣔ͞ΕΔ ͭͷػࡐʹԿͷػࡐ͕ಉࠝ͞Ε͍ͯΔ͔ΛσʔλԽ͢Δ ػࡐΛ͏࣌ʹɺ23ίʔυΛಡΈࠐΉ͜ͱͰ༻ཤྺΛཧ͢Δ 23ίʔυΛಡΈऔͬͨࡍʹݱࡏͷॴΛه͢Δ
Slide 8
Slide 8 text
ػࡐλά ػࡐ͝ͱʹλάΛൃߦ͢Δ 23ίʔυػࡐ͝ͱʹݻ༗ͷ63-͕ೖ͍ͬͯΔ
Slide 9
Slide 9 text
"OESPJEΞϓϦͱ8FCαΠτ ػࡐΛཧ͢Δਓ͕͏ͨΊͷ"OESPJEΞϓϦ 23ίʔυͷεΩϟϯ ػࡐͷՃฤू ػࡐλάͷ23ίʔυΛεΩϟϯͨ࣌͠ʹ։͘8FCαΠτ खೖྗͰ͖ΔΑ͏ʹ͍63-Λൃߦ͢ΔʢγϣʔτΧοτʣ ػࡐͷৄࡉͷ֬ೝ ΞϓϦΛ͍࣋ͬͯͳ͍ਓͰ͑Δ ฆࣦ࣌ʹ23ίʔυ͔Β࿈བྷઌΛΔ͜ͱ͕Ͱ͖Δ
Slide 10
Slide 10 text
༻ྫ ػࡐΛ͏࣌ ػࡐͷ༻ཤྺΛՃ ಡΈऔͬͨॴͷه ઐ༻ΞϓϦ
Slide 11
Slide 11 text
༻ྫ ػࡐΛ୳͍ͨ࣌͠ ػࡐͷҰཡ ػࡐͷಡΈऔΓཤྺ
Slide 12
Slide 12 text
༻ྫ த͕Γ͍ͨฆࣦͨ࣌͠ ػࡐͷৄࡉͷ8FCϖʔδ
Slide 13
Slide 13 text
σʔλߏ
Slide 14
Slide 14 text
σʔλߏ ෳͷάϧʔϓͰར༻Ͱ͖ΔΑ͏ͳߏʹ͢Δ γϣʔτΧοτશάϧʔϓͰڞ௨ͱ͢Δ /groups/{group} /addresses /equipments /scans /tags /shortcuts/{code} /users/{id} ‐Ϣʔβʔ ‐ػࡐͷอॴ ‐ػࡐ ‐ػࡐͷεΩϟϯཤྺ ‐λάϦετ ‐γϣʔτΧοτίʔυ ‐σόΠε /devices/{id} ‐άϧʔϓ
Slide 15
Slide 15 text
Ϣʔβʔ Ϣʔβʔͷσʔλ 'JSFCBTF"VUIFOUJDBUJPOͰαΠϯΠϯαΠϯΦϯͨ͠ޙʹ࡞ /users/{id} -uid String -belongingGroups Array(Reference(Group)) -name String /users/{id}/devices/{id} -name String
Slide 16
Slide 16 text
ػࡐ Ұ൪ॏཁͳσʔλ ໊લɺը૾ͷύεɺಉࠝ͢ΔػࡐɺλάͳͲΛೖΕΔ /groups/{group}/equipments/{id} -image String -includingEquipments Array(Reference(Equipments)) -name String -tags Array(String)
Slide 17
Slide 17 text
γϣʔτΧοτ 23ίʔυΛੜ͢ΔͨΊͷγϣʔτΧοτίʔυͱػࡐΛඥ͚ͮͨ σʔλ /shortcuts/{code} -group Reference(Group) -equipment Reference(Equipments) IUUQTYYYYYT\DPEF^
Slide 18
Slide 18 text
"OESPJEΞϓϦ
Slide 19
Slide 19 text
"OESPJEΞϓϦ "OESPJE4UVEJPΛͬͯ։ൃ ػࡐҰཡ ػࡐৄࡉ εΩϟϯ
Slide 20
Slide 20 text
"OESPJEΞϓϦ // Lombok compileOnly 'org.projectlombok:lombok:1.16.22' annotationProcessor "org.projectlombok:lombok:1.16.22" // ZXing implementation 'com.journeyapps:zxing-android-embedded:3.6.0' // Firestore implementation 'com.google.firebase:firebase-firestore:17.0.1' implementation 'com.google.firebase:firebase-storage:16.0.1' // FirebaseUI (for authentication) implementation 'com.firebaseui:firebase-ui-auth:4.0.0' // Other Firebase/Play services deps implementation 'com.google.firebase:firebase-core:16.0.0' implementation 'com.google.firebase:firebase-auth:16.0.1' implementation 'com.google.android.gms:play-services-auth:15.0.1' // Butterknife implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' // Glide implementation 'com.github.bumptech.glide:glide:4.7.1' annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1' // Tag implementation 'me.gujun.android.taggroup:library:1.4@aar' ༻ͨ͠ओͳϥΠϒϥϦ
Slide 21
Slide 21 text
8FCαΠτ
Slide 22
Slide 22 text
8FCαΠτ 3FBDUΛͬͯ։ൃ ϗεςΟϯά'JSFCBTF)PTUJOHΛ༻ ඞཁͳ"1*$MPVE'VODUJPOTͰ"1*Λߏங
Slide 23
Slide 23 text
Ϛελʔσʔλͷೖ
Slide 24
Slide 24 text
Ϛελʔσʔλͷೖ શͯͷػࡐΛεϚϗϒϥβͷϑΥʔϜͰೖྗ͢Δͷۤ௧ grahamearley / FirestoreGoogleAppsScript IUUQTHJUIVCDPNHSBIBNFBSMFZ'JSFTUPSF(PPHMF"QQT4DSJQU ϘλϯͭͰ'JSFTUPSFʹσʔλΛೖͯ͠ཉ͍͠ εϓϨουγʔτͰ࠷ॳͷσʔλΛೖྗͰ͖ΔΑ͏ʹ͢Δ ʴ
Slide 25
Slide 25 text
Ϛελʔσʔλͷೖ ("4ΛͬͯπʔϧόʔͷϘλϯΛԡ͢ͱσʔλͷߋ৽Λߦ͏Α͏ʹ
Slide 26
Slide 26 text
ͭ·͍ͣͨͱ͜Ζ
Slide 27
Slide 27 text
ͭ·͍ͣͨͱ͜Ζ 'JSFTUPSFͷ3VMF4JNVMBUPS͕3FGFSFODFΛ͏·͘ѻ͑ͳ͍ʜʁ Ϣʔβʔ͕ॴଐ͍ͯ͠ΔάϧʔϓͷΈɺಡΈॻ͖ͷݖݶΛ༩͍͑ͨ TFSWJDFDMPVEpSFTUPSF\ NBUDIEBUBCBTFT\EBUBCBTF^EPDVNFOUT\ ʜ NBUDIHSPVQT\HSPVQ^\ BMMPXSFBE VQEBUF EFMFUF JGSFRVFTUBVUIVJEOVMMEBUBCBTFT EBUBCBTF EPDVNFOUTHSPVQT HSPVQ JO HFU EBUBCBTFT EBUBCBTF EPDVNFOUTVTFST SFRVFTUBVUIVJE EBUBCFMPOHJOH(SPVQT ʜ ࣮ࡍͷϦΫΤετ͏·͘ಈ͚͘ͲγϛϡϨʔλʔ͚ͩಈ͔ͳ͍ʜʁ
Slide 28
Slide 28 text
ͭ·͍ͣͨͱ͜Ζ 'JSFTUPSF(PPHMF"QQT4DSJQUͰಛఆͷΩʔͷΈߋ৽͢Δग़དྷͳ͍ ΦϒδΣΫτΛճऔಘ͔ͯ͠Βɺߋ৽͢Δඞཁ͕͋Δ \ lOBNFzl໊લz ^ \ lBOPUIFS,FZzl໊લz ^ \ lBOPUIFS,FZzl໊લz ^ ݩͷσʔλ ߋ৽͢Δσʔλ อଘ͞ΕΔσʔλ
Slide 29
Slide 29 text
ͭ·͍ͣͨͱ͜Ζ λάʹΑΔݕࡧΛ͍ͨ͠ $MPVE'JSFTUPSFͰɺྻͷதʹରͯ͠ΫΤϦΛ࣮ߦ͢Δ͜ͱ ग़དྷͳ͍
Slide 30
Slide 30 text
λάʹΑΔݕࡧ $MPVE'VODUJPOTΛ༻͠ɺ'JSFTUPSFͷPO8SJUFΠϕϯτΛϑοΫ ػࡐͷσʔλ͕ߋ৽͞ΕͨλΠϛϯάʹ߹ΘͤͯλάΛߋ৽͢Δ /groups/{group}/tags/{name} -equipments Array(Reference(Equipment))
Slide 31
Slide 31 text
·ͱΊ
Slide 32
Slide 32 text
·ͱΊ 'JSFCBTFΛͬͯαʔϏεΛ࡞Δͱ͘͢࡞ΕΔ 'JSFTUPSF)PTUJOH'VODUJPOT͕Ϛδศར "OESPJEΞϓϦΛ࡞ΔͷϥΠϒϥϦ͕͋ΔͷͰศར εϓϨουγʔτܦ༝ͰσʔλΛೖΕΔͷϚδศར 'JSFTUPSF(PPHMF"QQT4DSJQUಡΊΔίʔυͷྔͳͷͰಡΉͱྑ 3FGFSFODFϊϦͰ͏ͱ௧͍ΛݟΔ