Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rx分からんを解消する会
Search
Suguru Kishimoto
October 22, 2018
Technology
7
1.4k
Rx分からんを解消する会
社内勉強会での資料です。
RxSwiftについて開発メンバーから寄せられた質問に対して答える感じで用意した資料となります。
Suguru Kishimoto
October 22, 2018
Tweet
Share
More Decks by Suguru Kishimoto
See All by Suguru Kishimoto
Cookpad summer internship 2019 - iOS introduction
sgrksmt
0
9.8k
Improves service using Firebase A_B Testing
sgrksmt
7
910
A use case of Firebase in Komerco.
sgrksmt
13
9.9k
Firebase Dynamic Link あれこれ
sgrksmt
1
630
Improve Event log using Sourcery in iOS
sgrksmt
6
740
cloud_firestore_for_biginners
sgrksmt
2
2.3k
Effective Firestore Security
sgrksmt
4
5.5k
Try new Firebase AB testing
sgrksmt
2
4.8k
それでもぼくはAuto Incrementしたい
sgrksmt
1
1.2k
Other Decks in Technology
See All in Technology
カメラを用いた店内計測におけるオプトインの仕組みの実現 / ai-optin-camera
cyberagentdevelopers
PRO
1
120
Java x Spring Boot Warm up
kazu_kichi_67
2
490
ガバメントクラウド先行事業中間報告を読み解く
sugiim
1
1.1k
一休.comレストランにおけるRustの活用
kymmt90
3
580
Automated Promptingを目指すその前に / Before we can aim for Automated Prompting
rkaga
0
110
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
4
2.5k
Fargateを使った研修の話
takesection
0
110
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
320
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
210
独自ツール開発でスタジオ撮影をDX!「VLS(Virtual LED Studio)」 / dx-studio-vls
cyberagentdevelopers
PRO
1
170
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
10分でわかるfreeeのQA
freee
1
3.4k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Producing Creativity
orderedlist
PRO
341
39k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How GitHub (no longer) Works
holman
311
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.1k
Transcript
Komerco Div 2018.10.22(MON) Rx͔ΒΜΛղফ͢Δձ 3Y͔ΒΜΛղফ͢Δձ 4VHVSV,JTIJNPUP
Cookpad Inc. All Rights Reserved. ࣄͷൃ
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. ͻͬͦΓΔͭΓ͕ѹ͕͔͔ͬͨͷͰ ษڧձܗࣜͰΔ͜ͱʹ
Cookpad Inc. All Rights Reserved. ⚠ॾҙ⚠ wدͤΒΕ࣭ͨΛݩʹࢿྉ࡞ͬͯ·͢ wޙࣗ༝࣌ؒʹ͢ΔͷͰΘ͍Θ͍ٞͨ͠Γ͠·͠ΐ͏
Cookpad Inc. All Rights Reserved. ૣ
ʲQ1ʳ Observable,Observer,Subject,Relay,Signal,Driver… ͦΕͧΕͷׂͱ͔͍ಓ?
Cookpad Inc. All Rights Reserved. 0CTFSWBCMF0CTFSWFS w0CTFSWBCMFσʔλιʔεɺετϦʔϜͱ͔ݺΕΔɻ͕ྲྀΕͯ ΔɺA؍ଌͰ͖ΔͷAɻ ͕ྲྀΕͯ͘Δͱɺࣗ৴ʹొ͞Ε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VCKFDUͷϥούʔ w&SSPS $PNQMFUFE͕ྲྀΕͯ͜ͳ͍ w1VCMJTI3FMBZ1VCMJTI4VCKFDUɺ#FIBWJPS3FMBZ#FIBWJPS4VCKFDU
ͷϥούʔʹͳ͍ͬͯΔ w&SSPS $PNQMFUFE͕ྲྀΕͳ͍ͷͰɺ 1VCMJTI3FMBZˠ4JHOBM #FIBWJPS3FMBZˠ%SJWFS ʹ؆୯ʹมͰ͖Δ
Cookpad Inc. All Rights Reserved. 4JOHMF.BZCF$PNQMFUBCMF w3Y4XJGUW͔Βࡌ͞Εͨɺ0CTFSWBCMF&ͷᙱ͍ͱ͜ΖΛγʔϯ ผʹղܾͯ͘͠ΕΔͷɻͦΕͧΕFWFOUճ͔͠ྲྀΕͳ͍ wඞͣ&SSPS͔$PNQMFUFEͷͲͪΒ͔ͰऴΘΔ w/FYUͷྲྀΕΔճ͕ҧ͏
w4JOHMFճ w.BZCFճ͘͠ճ ྲྀΕͣʹ$PNQMFUFE͚ͩྲྀΕΔ͜ͱ͕͋Δ w$PNQMFUBCMFճ
Cookpad Inc. All Rights Reserved. %SJWFS4JHOBM w&SSPS͕ྲྀΕͳ͍ wϝΠϯεϨουͰ࣮ߦ͞ΕΔ͜ͱ͕อূ͞Ε͍ͯΔ w%SJWFS4VCTDSJCFͨ࣌͠ʹۙͷΛճྲྀ͢ ASFQMBZ
A w4JHOBM4VCTDSJCF͔ͯ͠ΒྲྀΕͯ͘Δ w6*ʹབྷΉ෦Ͱ͏ͷʹ͍ͬͯ͜ w1SFTFOUFSˠ7JFXɺ7JFX.PEFMˠ7JFXͰΑ͘͏
Cookpad Inc. All Rights Reserved. ࢀߟ w3Y$PDPBͷ4JHOBMͱ3FMBZͷ·ͱΊ wIUUQTUFDINFSDBSJDPNFOUSZ w3Y4XJGUͷ༻ޠ·ͱΊ wIUUQTRJJUBDPNNPSJTIJOJUFNTDEFCGF
w3Y4XJGUͷ0CTFSWBCMFͱԿ͔ wIUUQTRJJUBDPNHPNJ@OJOHFOJUFNTDDGFCFFDG w3Y4XJGUΛΔલʹͪΌΜͱ0CTFSWFSύλʔϯΛֶͿ wIUUQTTUBSIPTIJIBUFOBCMPHDPNFOUSZ 394XJGU@&&&#&%&"#&"&& &"@0CTFSWFS@&&#'&#$&#&&"%" &#
ʲQ2ʳ `subscribe`, `bind`, `drive`, `emit` ͷ͍͚?
Cookpad Inc. All Rights Reserved. ͲΕߪಡ͢Δ࣌ʹ͏ͷ͚ͩͲ ඍົʹੑ࣭͕ҟͳΔ
Cookpad Inc. All Rights Reserved. ATVCTDSJCF PO/FYUʜ A wOFYU FSSPS
DPNQMFUFE TVCTDSJCFE EJTQPTFEɺͦΕͧΕड͚औͬ ͨͱ͖ͷॲཧΛهड़Ͱ͖Δ w4JOHMF .BZCF $PNQMFUBCMFʹͳΔͱड͚औΕΔͷ͕มΘΔ
Cookpad Inc. All Rights Reserved. ACJOE UP A wྲྀΕΛଞͷετϦʔϜʹͭͳ͛Δ࣌ʹ͏ wҾʹ0CTFSWFS5ZQF͘͠3FMBZ͕ೖΔ
͕ɺϨγʔόͷ0CTFSWBCMF5ZQFʹΑͬͯएׯมΘΔ
Cookpad Inc. All Rights Reserved. ACJOE PO/FYU A wOFYUΛड͚औͬͨͱ͖ͷॲཧΛهड़Ͱ͖Δ ATVCTDSJCF
PO/FYU AͷΈͷ7FSͩͱࢥ͑ྑ͍ wFSSPS͕ྲྀΕͯ͜ͳ͍લఏʹͳ͍ͬͯΔͷͰɺ %FCVHڥͰ ྲྀΕ ͯ͘ΔͱΫϥογϡ͢Δ w3FMBZΛTVCTDSJCF͢Δͱ͖ͬͪ͜Ͱॻ͘΄͏͕ؾ͍࣋ͪͷͰ γϯϓϧʹॻ͚Δ
Cookpad Inc. All Rights Reserved. AESJWF @ A AFNJU UP
A wACJOE UP Aͷ%SJWFS4JHOBM൛ wESJWF0CTFSWFS5ZQFɺ#FIBWJPS3FMBZͱ wFNJU0CTFSWFS5ZQFɺ1VCMJTI3FMBZͱ
Cookpad Inc. All Rights Reserved. ESJWF FNJU AYY PO/FYU A
wESJWF%SJWFSʹରͯ͠ɺFNJU4JHOBMʹରͯ͠͏ wOFYU DPNQMFUFE EJTQPTFEΛड͚औΕΔ
ʲQ3ʳ ΞϓϦͰΑ͘ݟΔ࣮ύλʔϯΈ͍ͨͷ͕ ͋ΕΓ͍ͨͰ͢ɻ - MVVMͰUIͱVMΛόΠϯυ͢Δͱ͖ͱ͔ɻ - WebAPIୟ͍ͯUI·Ͱөͤ͞Δ·ͰͷྲྀΕͱ͔ɻ
Cookpad Inc. All Rights Reserved. ύλʔϯΛֶͿͷʹ͓͢͢Ίͪ͜Β
Cookpad Inc. All Rights Reserved. w3Y4XJGUͷ&YBNQMF wIUUQTHJUIVCDPN3FBDUJWF93Y4XJGUCMPCNBTUFS%PDVNFOUBUJPO &YBNQMFTNE w3Y1BHJOBUJPO wIUUQTHJUIVCDPNUSZTXJGU3Y1BHJOBUJPO
w3Y4XJGU "1*SFRVFTU .77. wIUUQTTQFBLFSEFDLDPNTMJHIUBJSSYTXJGUQMVTBQJSFRVFTUQMVTNWWN
Cookpad Inc. All Rights Reserved. .77.ͷྫΛऔΔͱʜ w7.ͷJOJUͰWJFXͷΠϕϯτΛ0CTFSWBCMFͱͯ͢͜͠ͱ͕ଟ͍ FHϘλϯͷλοϓɺϦϩʔυͷτϦΨʔʜ w"1*ୟ͘ͱ͜Ζ3YͰϥοϓͯ͠ετϦʔϜΛ࡞Δ
w7JFXͷΠϕϯτΛجʹɺ"1*ͷετϦʔϜΛܨ͍Ͱ͋͛ͯɺ݁Ռ ΤϥʔΛ%SJWFS4JHOBMΛͬͯͯ͋͛͠Δ w7JFXଆͰΛ͙͢ʹࢀর͍ͨ͠ͱ͖7.ʹ#FIBWJPS3FMBZΛ༻ҙ ͯ͠ɺASFMBZWBMVFAͰࢀর͢Δ
ʲQ4ʳ ΩϨΠʹετϦʔϜΛ࡞Δʹ?
Cookpad Inc. All Rights Reserved. ΩϨΠͳετϦʔϜΛΉʹɺ ετϦʔϜʹखΛՃ͑ΔΦϖϨʔλʔΛ ཧղ͢Δඞཁ͕͋Δ
Cookpad Inc. All Rights Reserved. KVTU FSSPS FNQUZ OFWFS DSFBUF
PG EFGFS GJMUFS NBQ [JQ DPNCJOF-BUFTU XJUI-BUFTU'SPN DPODBU NFSHF GMBU.BQ GMBU.BQ-BUFTU GMBU.BQ'JSTU UBLF TLJQ SFUSZ BNC DBUDI TXJUDI UISPUUMF EFCPVODF UJNFPVU CVGGFS XJOEPXʜ ˞ݴޠʹΑͬͯඍົʹΦϖϨʔλʔ໊͕ҟͳͬͨΓ͢Δ߹͋Γ
Cookpad Inc. All Rights Reserved. Ұʹ֮͑Δͷେม গͣͭ͠ಈ࡞Λཧղ͠ͳ͕ΒਂΊ͍ͯ͘
Cookpad Inc. All Rights Reserved. ʮͲ͔͜ʹ·ͱ·ͬͯͳ͍ͷʁʯ
Cookpad Inc. All Rights Reserved. 0QFSBUPSΛֶͿ w3FBDUJWF90QFSBUPST wIUUQSFBDUJWFYJPEPDVNFOUBUJPOPQFSBUPSTIUNM w3Y.BSCMFT 3Y+4
wIUUQSYNBSCMFTDPN w3Y.BSCMFTͷJ04"QQ͋Δ
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. ʮཧղ͢Δͱදݱͷ෯͕͕Δͷʁʯ
Cookpad Inc. All Rights Reserved. KVTU FSSPS FNQUZ OFWFS DSFBUF
PG EFGFS GJMUFS NBQ [JQ DPNCJOF-BUFTU XJUI-BUFTU'SPN DPODBU NFSHF GMBU.BQ GMBU.BQ-BUFTU GMBU.BQ'JSTU UBLF TLJQ SFUSZ BNC DBUDI TXJUDI UISPUUMF EFCPVODF UJNFPVU CVGGFS XJOEPXʜ
ࠓ͙͑͢ΔςΫχοΫ
Cookpad Inc. All Rights Reserved. ͦͷ̍ AXJUI-BUFTU'SPNA
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. TVCTDSJCFͷதͰTFMGࢀরͯ͠ ଞͷετϦʔϜͷΛͭͳ͛Δͷආ͚͍ͨ
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. ετϦʔϜͱɺࢦఆͨ͠ετϦʔϜͷۙͷΛ ͏·ͭ͘ͳ͛Δ͜ͱ͕Ͱ͖Δ
Cookpad Inc. All Rights Reserved. ͦͷ A[JQA
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. ࠩΛऔΔͷ͕؆୯ʹͳΔ
Cookpad Inc. All Rights Reserved. ͦͷ ATDBOA ATUBSU8JUIA
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. "1*ͰQBHFࢦఆͯ͠ಡΈࠐΜͰ݁ՌΛ ஷΊ͍ͯ͘ͷʹศར
Cookpad Inc. All Rights Reserved. ͦͷ "DUJPO IUUQTHJUIVCDPN3Y4XJGU$PNNVOJUZ"DUJPO
Cookpad Inc. All Rights Reserved. "DUJPO w3Y4XJGU$PNNVOJUZͰఏڙ͞Ε͍ͯΔ044 w*OQVUͱ0VUQVU͕ܾ·ͬͨετϦʔϜͷྲྀΕΛΞΫγϣϯͱͯ͠ఆ ٛ͢Δ wͦͷΞΫγϣϯͷ݁Ռ
FMFNFOU ɺΤϥʔ FSSPS ɺ࣮ߦத͔Ͳ͏͔ FYDVUJOH ͕ͦΕͧΕετϦʔϜͱͯ͠ఏڙ͞ΕΔ w"1*ͷ௨৴Կ͔͠ΒͷඇಉظॲཧΛଋͶΔͷʹศར wADBUDI&SSPSA AEPAͱA<XFBLTFMG>Aͷۤ͠Έ͔Βղ์ͯ͘͠ΕΔ
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. "DUJPOΛ͏ͱ͜͏ͳΔ
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. ͦͷଞ ͔ͨͬͨ͜͠ͱ w)PU$PME0CTFSWBCMF wTIBSF SFQMBZ
w4DIFEVMFS w#JOEFS
Cookpad Inc. All Rights Reserved. ͕ͬͭΓಡΈͳ͕ΒֶͿͳΒ w3Y4XJGU3FBDUJWF1SPHSBNNJOHXJUI4XJGU wIUUQTTUPSFSBZXFOEFSMJDIDPNQSPEVDUTSYTXJGUSFBDUJWF QSPHSBNNJOHXJUITXJGU
None