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
6
920
A use case of Firebase in Komerco.
sgrksmt
13
9.9k
Firebase Dynamic Link あれこれ
sgrksmt
1
640
Improve Event log using Sourcery in iOS
sgrksmt
6
750
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.3k
Other Decks in Technology
See All in Technology
ABEMA スマートテレビアプリケーションのパフォーマンス改善 〜業界トップクラスを目指して〜 / Performance Improvements on ABEMA Smart TV App
nodaguti
0
260
AIのコンプラは何故しんどい?
shujisado
1
110
2024年のModern Data Stackを振り返ろう~分野別の目玉アップデート情報まとめ~
sagara
0
540
Kubernetesトラフィックルーティング徹底解説/Kubernetes-traffic-deep-dive
oracle4engineer
PRO
5
920
Ruby on Browser - RubyWorld Conference 2024
tmtms
1
130
イノベーショントークから見るクラウド運用の未来を振り返ってみた
nyankotaro
0
420
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
2
220
JAWS-UG 横浜支部 #76 AWS re:Invent 2024 宇宙一早い Recap LT3Amazon EKS Auto Modeと遊び(パーティ)の話
tjotjo
0
170
GitHub Actions의 다양한 기능 활용하기 - GitHub Universe '24 Recap
outsider
0
570
PR TIMESにおけるNext.jsとcacheの付き合い方
apple_yagi
3
330
Kubeshark で Kubernetes の Traffic を眺めてみよう/Let's Look at k8s Traffic with Kubeshark
kota2and3kan
2
310
振る舞い駆動開発(BDD)における、テスト自動化の前に大切にしていること #stac2024 / BDD formulation
nihonbuson
3
1.2k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Speed Design
sergeychernyshev
25
650
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Optimising Largest Contentful Paint
csswizardry
33
3k
Code Reviewing Like a Champion
maltzj
520
39k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
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ɻ ͕ྲྀΕͯ͘Δͱɺࣗ৴ʹొ͞Εͨ0CTFSWFSʹΛ௨͢Δ w0CTFSWFSA؍ଌ͢ΔͷAɻ0CTFSWBCMFͰྲྀΕ͍ͯΔΛड͚औ
ΔͨΊʹɺ0CTFSWBCMFʹࣗΛొͨ͠ΓɺෆཁʹͳͬͨΒղআ ͨ͠Γ͢Δ
Cookpad Inc. All Rights Reserved. Ҿ༻IUUQTRJJUBDPN.BTBOPCV"LJCBJUFNTBCEDDFF
Cookpad Inc. All Rights Reserved. 0CTFSWBCMF0CTFSWFS w0CTFSWBCMF 5ZQF Ͱ͋Δͷ A0CTFSWBCMF&A
A4JOHMF&A A.BZCF&A A$PNQMFUBCMFA A̋̋4VCKFDU&A A̋̋3FMBZ&A ݫີʹҧ͏͚ͲɺA%SJWFS&A A4JHOBM&A w0CTFSWFS 5ZQF Ͱ͋Δͷ A̋̋4VCKFDU&A A"OZ0CTFSWFS&A A"OPOZNPVT0CTFSWFS&A
Cookpad Inc. All Rights Reserved. 0CTFSWBCMF0CTFSWFS w0CTFSWFS 5ZQF গͳ͘ͳ͍ʁͦͯ͋͠·Γఆٛ͢Δ͜ͱͳ͍Μ͚ͩ Ͳʜ
ˠීஈATVCTDSJCF PO/FYUPO&SSPS Aͱ͔ͰΫϩʔδϟ͍ͯ͠Δ ͷͰࣗͰ0CTFSWFSΛੜ͢Δ͜ͱগͳ͍͕ɺཪͰ࡞ΒΕͯ ͍Δ
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved.
Cookpad Inc. All Rights Reserved. 4VCKFDU3FMBZ w4VCKFDU0CTFSWBCMF5ZQF 0CTFSWFS5ZQF ࣗͰΛྲྀ͢͜ͱͰ͖Δ͠ɺ0CTFSWBCMFʹొͯ͠Λड͚ औΔ͜ͱͰ͖Δ
w1VCMJTI4VCKFDUɺ#FIBWJPS4VCKFDUɺ3FQMBZ4VCKFDU͕͋Δ w7BSJBCMFˠ 3Y4XJGUW͔Βඇਪ
Cookpad Inc. All Rights Reserved. 4VCKFDU3FMBZ w3FMBZ4VCKFDUͷϥούʔ 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