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

Recent State of ReactiveCocoa

Recent State of ReactiveCocoa

関西モバイルアプリ研究会 #13での発表資料です #関モバ

http://kanmoba.connpass.com/event/28416/

7ddcca09c00a2744b983974225447d19?s=128

Sho Ikeda

April 26, 2016
Tweet

Transcript

  1. Recent State of ReactiveCocoa @ikesyo ؔ੢ϞόΠϧΞϓϦݚڀձ #13, 2016-04-26 Tue #ؔϞό

  2. @ikesyo • ͍͚͠ΐʔʗ஑ా ᠳ • Reactiveਓࡐ • ͸ͯͳ@ژ౎ • https://twitter.com/ikesyo

    • https://github.com/ikesyo
  3. ✨ Contributions ✨ • ReactiveCocoa • Carthage (Commandant, ReactiveTask) •

    Result • Himotoki • APIKit
  4. None
  5. Reactive Swift Meetup • ReactiveCocoaೖ໳ by @Nirma • Getting Started

    with ReactiveCocoa v4.1.0 by @inamiy • Carthage and ReactiveCocoa by @ikesyo
  6. None
  7. None
  8. None
  9. None
  10. Recent State of ReactiveCocoa

  11. New Member • @RuiAAPeres Issues • Reduced from around 250

    to 80+ (as of 2016-04-26)
  12. None
  13. Moving Rex to the ReactiveCocoa org #2790 1. Discoverability 2.

    Credibility 3. Expansion 4. Easier to manage
  14. Split Objective-C and Swift APIs going forward #2807 Correct me

    if I'm wrong, but maintaining both an Objective-C and Swift API for RAC is a bit of a burden, right? Perhaps going forward it's worth thinking about slimming ReactiveCocoa down to just support Swift. I'm sure you guys feel the pull of writing things in Swift as much as I do ! Obviously there's a lot of people reliant on the Objective-C APIs (myself included, for some rather large projects) but if there's support for this idea, splitting the language support up into separate repos/projects might be a good first step? What do you think?
  15. Utilities / Examples • MailOnline/Reactor • RuiAAPeres/RACNest • inamiy/ReactiveCocoaCatalog •

    Carthage/Carthage !
  16. None
  17. ඇಉظॲཧͷఆܕԽ • APIຖʹελΠϧ͕ҟͳͬͯ໎Θͳ͍Α͏ʹ͢Δ • delegate, target-action, callback(Ҿ਺΋༷ʑ), ... • ඇಉظॲཧͷνΣʔϯ

    • ! Callback Hell • flatMap • flatten ίʔυϕʔεશମͰ࢖͏ͷ͕ޮՌతʢϩοΫΠϯ !ʣ
  18. ඇಉظॲཧͷఆܕԽ • ಉظతAPI • ςετɺCLIϓϩάϥϜ • RxSwift: RxBlocking // SignalProducer

    func first() -> Result<Value, Error>? func single() -> Result<Value, Error>? func last() -> Result<Value, Error>? func wait() -> Result<(), Error>
  19. ಉظॲཧͷϥοϓ • ಉظॲཧ݁ՌͷϋϯυϦϯά΋ඇಉظॲཧͷ৔߹ͱڞ௨Խ • ಉظͱඇಉظΛҙࣝ͠ͳ͍ • ಺෦ॲཧ͕ಉظ͔ΒඇಉظʹมΘͬͯ΋ݺͼग़͠ଆʹ͸Ө ڹ͕ͳ͍ • ඇಉظॲཧͱͷ߹੒

  20. ܕ෇͚͞ΕͨΤϥʔ • Signal<Value, Error>, SignalProducer<Value, Error> • Result<Value, Error> ͔Βͷੜ੒:

    attempt, attemptMap • throwsΛѻ͏࣌͸໌നͳܕ΁ͷΩϟετɺ΋͘͠͸NSErrorͱ ͯ͠ѻ͏ʢResultͷAPIʣ • RAC: Atomic, MutablePropertyΛআ͍ͯthrows͸࢖ΘΕ͍ͯͳ ͍ • Carthage: throws͸࢖ΘΕ͍ͯͳ͍
  21. ܕ෇͚͞ΕͨΤϥʔ • Result.NoError: Πϯελϯεੜ੒Ͱ͖ͳ͍Τϥʔܕ • ࣦഊ͢ΔՄೳੑ͕ͳ͍͜ͱΛAPIͷγάωνϟʔͱͯ͠දݱͰ͖ Δ • <~ΦϖϨʔλʔʹΑΔMutableProperty΁ͷSignal, SignalProducerͷόΠϯσΟϯάͷͨΊʹ͸NoErrorͰͳ͚Ε

    ͹ͳΒͳ͍ 1 1 https://github.com/ReactiveCocoa/ReactiveCocoa/blob/v4.1.0/ReactiveCocoa/Swift/Property.swift#L241-L302
  22. !" Happy RAC Coding!! "!

  23. Thank you❗"