iOSアプリのアーキテクチャについて考える

 iOSアプリのアーキテクチャについて考える

MVC, MVVM, ReactorKitで構築できるThe Reactive Architecture(Reactive Programming + Flux)について

iPhone Dev Sapporo勉強会 May, 2017
https://devsap.connpass.com/event/56182/

次: ReactorKitを実戦投入してみて
https://speakerdeck.com/yusuga/reactorkitwoshi-zhan-tou-ru-sitemite

Df8bc8c531e2c5c89c1a007db1cf79a3?s=128

Yu Sugawara

May 20, 2017
Tweet

Transcript

  1. iOSΞϓϦͷΞʔΩςΫνϟʹ͍ͭͯߟ͑Δ DevSapษڧձ 17/05/20

  2. ੁݪ ༞ @yusuga_

  3. ΞʔΩςΫνϟͱ͸ 4 ίϯϐϡʔλͷઃܭʹؔ͢Δ࢓༷·ͨ͸ߟ͑ํ ΢ΟζμϜӳ࿨ࣙయ

  4. ࠓ೔ͷςʔϚ 4 ϢʔβΠϯλʔϑΣʔεΛ࣋ͭΞϓϦέʔγϣϯΛ࣮૷͢ ΔͨΊͷΞʔΩςΫνϟ

  5. ԿΛղܾ͍ͨ͠ͷ͔ 4 ΞϓϦ಺ͷϩδοΫ΍Ϋϥεߏ଄Λ੔ཧ͍ͨ͠

  6. ԿΛղܾ͍ͨ͠ͷ͔ 4 ΞϓϦ಺ͷϩδοΫ΍Ϋϥεߏ଄Λ੔ཧ͍ͨ͠ 4 ίϯϙʔωϯτಉ͕࢜ૄ݁߹

  7. ԿΛղܾ͍ͨ͠ͷ͔ 4 ΞϓϦ಺ͷϩδοΫ΍Ϋϥεߏ଄Λ੔ཧ͍ͨ͠ 4 ίϯϙʔωϯτಉ͕࢜ૄ݁߹ 4 ֤੹຿͕໌֬ʹͳΔ

  8. ԿΛղܾ͍ͨ͠ͷ͔ 4 ΞϓϦ಺ͷϩδοΫ΍Ϋϥεߏ଄Λ੔ཧ͍ͨ͠ 4 ίϯϙʔωϯτಉ͕࢜ૄ݁߹ 4 ֤੹຿͕໌֬ʹͳΔ 4 ࠶ར༻ੑɺอकੑɺ֦ுੑ͕ߴ·Δ

  9. ԿΛղܾ͍ͨ͠ͷ͔ 4 ΞϓϦ಺ͷϩδοΫ΍Ϋϥεߏ଄Λ੔ཧ͍ͨ͠ 4 ίϯϙʔωϯτಉ͕࢜ૄ݁߹ 4 ֤੹຿͕໌֬ʹͳΔ 4 ࠶ར༻ੑɺอकੑɺ֦ுੑ͕ߴ·Δ 4

    ςετ͠΍͍͢
  10. ୅දతͳΞʔΩςΫνϟ

  11. ୅දతͳΞʔΩςΫνϟ 4 MVC 4 MVC2 / Model 2 (MVC) Architecture

    4 MVP 4 MVVM 4 Clean Architecture
  12. ୅දతͳΞʔΩςΫνϟ 4 MVC 4 MVC2 / Model 2 (MVC) Architecture

    4 AppleͷϑϨʔϜϫʔΫͰ࠾༻͞Ε͍ͯΔ 4 MVP 4 MVVM 4 Clean Architecture
  13. MVC2 https://etolstoy.gitbooks.io/the-book-of-viper/content/путь-от-massive-viewcontroller-до-viper.html

  14. None
  15. MVC2 https://etolstoy.gitbooks.io/the-book-of-viper/content/путь-от-massive-viewcontroller-до-viper.html

  16. MVC2 https://etolstoy.gitbooks.io/the-book-of-viper/content/путь-от-massive-viewcontroller-до-viper.html

  17. MVC2 https://etolstoy.gitbooks.io/the-book-of-viper/content/путь-от-massive-viewcontroller-до-viper.html

  18. MVC2 https://etolstoy.gitbooks.io/the-book-of-viper/content/путь-от-massive-viewcontroller-до-viper.html

  19. MVC2 https://etolstoy.gitbooks.io/the-book-of-viper/content/путь-от-massive-viewcontroller-до-viper.html

  20. MVC2 https://etolstoy.gitbooks.io/the-book-of-viper/content/путь-от-massive-viewcontroller-до-viper.html

  21. MVC2ͷ໰୊

  22. https://www.slideshare.net/Rambler-iOS/massive-view-controller

  23. Massive View Controllerͱ͸ 4 ControllerͰ༷ʑͳॲཧΛߦ͏͜ͱʹͳΓڊେԽͨ͠ঢ়ଶ

  24. Massive View Controllerͱ͸ 4 ControllerͰ༷ʑͳॲཧΛߦ͏͜ͱʹͳΓڊେԽͨ͠ঢ়ଶ 4 Viewͷੜ੒΍؅ཧ

  25. Massive View Controllerͱ͸ 4 ControllerͰ༷ʑͳॲཧΛߦ͏͜ͱʹͳΓڊେԽͨ͠ঢ়ଶ 4 Viewͷੜ੒΍؅ཧ 4 I/Oॲཧ

  26. Massive View Controllerͱ͸ 4 ControllerͰ༷ʑͳॲཧΛߦ͏͜ͱʹͳΓڊେԽͨ͠ঢ়ଶ 4 Viewͷੜ੒΍؅ཧ 4 I/Oॲཧ 4

    σʔλͷม׵
  27. Massive View Controllerͱ͸ 4 ControllerͰ༷ʑͳॲཧΛߦ͏͜ͱʹͳΓڊେԽͨ͠ঢ়ଶ 4 Viewͷੜ੒΍؅ཧ 4 I/Oॲཧ 4

    σʔλͷม׵ 4 ΩʔϘʔυͷ؅ཧ
  28. Massive View Controllerͱ͸ 4 ControllerͰ༷ʑͳॲཧΛߦ͏͜ͱʹͳΓڊେԽͨ͠ঢ়ଶ 4 Viewͷੜ੒΍؅ཧ 4 I/Oॲཧ 4

    σʔλͷม׵ 4 ΩʔϘʔυͷ؅ཧ 4 DelegateͳͲͰҠৡ͞Εͨॲཧ
  29. Massive View Controllerͱ͸ 4 ControllerͰ༷ʑͳॲཧΛߦ͏͜ͱʹͳΓڊେԽͨ͠ঢ়ଶ 4 Viewͷੜ੒΍؅ཧ 4 I/Oॲཧ 4

    σʔλͷม׵ 4 ΩʔϘʔυͷ؅ཧ 4 DelegateͳͲͰҠৡ͞Εͨॲཧ 4 ը໘ભҠ
  30. Massive View ControllerͷݪҼͱվળ 4 ༷ʑͳϏδωεϩδοΫΛControllerʹॻ͖͕ͪ

  31. Massive View ControllerͷݪҼͱվળ 4 ༷ʑͳϏδωεϩδοΫΛControllerʹॻ͖͕ͪ 4 ϏδωεϩδοΫ == ॲཧ

  32. Massive View ControllerͷݪҼͱվળ 4 ༷ʑͳϏδωεϩδοΫΛControllerʹॻ͖͕ͪ 4 ϏδωεϩδοΫ == ॲཧ 4

    ͨͩ͢͠΂ͯͷॲཧͰ͸ͳ͍
  33. Massive View ControllerͷݪҼͱվળ 4 ༷ʑͳϏδωεϩδοΫΛControllerʹॻ͖͕ͪ 4 ϏδωεϩδοΫ == ॲཧ 4

    ͨͩ͢͠΂ͯͷॲཧͰ͸ͳ͍ 4 ControllerͰ΍Δ΂͖ॲཧ΋͋Δ
  34. Massive View ControllerͷݪҼͱվળ 4 ༷ʑͳϏδωεϩδοΫΛControllerʹॻ͖͕ͪ 4 ϏδωεϩδοΫ == ॲཧ 4

    ͨͩ͢͠΂ͯͷॲཧͰ͸ͳ͍ 4 ControllerͰ΍Δ΂͖ॲཧ΋͋Δ 4 جຊ͸Ϟσϧ͕ϏδωεϩδοΫΛߦ͏
  35. Massive View ControllerͷݪҼͱվળ 4 ༷ʑͳϏδωεϩδοΫΛControllerʹॻ͖͕ͪ 4 ϏδωεϩδοΫ == ॲཧ 4

    ͨͩ͢͠΂ͯͷॲཧͰ͸ͳ͍ 4 ControllerͰ΍Δ΂͖ॲཧ΋͋Δ 4 جຊ͸Ϟσϧ͕ϏδωεϩδοΫΛߦ͏ 4 ߏ଄Խ/ந৅Խ͔͗ͯ͑ͬͯ͢͠ಡΈͮΒ͘ͳΔ৔߹΋
  36. Massive View ControllerͷݪҼͱվળ 4 ༷ʑͳϏδωεϩδοΫΛControllerʹॻ͖͕ͪ 4 ϏδωεϩδοΫ == ॲཧ 4

    ͨͩ͢͠΂ͯͷॲཧͰ͸ͳ͍ 4 ControllerͰ΍Δ΂͖ॲཧ΋͋Δ 4 جຊ͸Ϟσϧ͕ϏδωεϩδοΫΛߦ͏ 4 ߏ଄Խ/ந৅Խ͔͗ͯ͑ͬͯ͢͠ಡΈͮΒ͘ͳΔ৔߹΋ 4 ϥϏΦϦίʔυ
  37. Ͳͷఔ౓ϦϑΝΫλϦϯά͢Δ͔͸ ॏେͳ໰୊ͰɺόϥϯεΛݟ͚ͭΔ ͷ͸ࢸ೉ͷۀͰ͢ɻ by Andy Matuschak (ݩAppleͷ։ൃऀͰUIKitΛ୲౰) Let's Play: ڊେϏϡʔίϯτϩʔϥΛϦϑΝΫλϦϯά͠Α͏ʂ

  38. ΞʔΩςΫνϟͰͷվળҊ

  39. Reactive Programming + MVVM

  40. https://aymen.co/javascript/what-is-reactive-programming/

  41. Reactive Programmingͱ͸ 4 ඇಉظσʔλετϦʔϜΛ༻͍ΔϓϩάϥϛϯάύϥμΠ Ϝ(ཧ࿦త࿮૊Έ)

  42. Reactive Programmingͱ͸ 4 ඇಉظσʔλετϦʔϜΛ༻͍ΔϓϩάϥϛϯάύϥμΠ Ϝ(ཧ࿦త࿮૊Έ) 4 σʔλʹ”࣌ؒͱ͍͏࣍ݩ”͕ՃΘΔ

  43. Reactive Programmingͱ͸ 4 ඇಉظσʔλετϦʔϜΛ༻͍ΔϓϩάϥϛϯάύϥμΠ Ϝ(ཧ࿦త࿮૊Έ) 4 σʔλʹ”࣌ؒͱ͍͏࣍ݩ”͕ՃΘΔ 4 ୯Ұґଘʹͳͬͯ͠·͏୅ΘΓʹɺେ͖ͳ໰୊ΛΫϦΞʹ ղܾ

  44. Reactive ProgrammingͰԿ͕Ͱ͖Δͷ͔ 4 ಉظ/ඇಉظʹؔΘΒͣઢܗతʹৼΔ෣͍Λهड़Ͱ͖ɺίʔ υྔΛݮΒ͢͜ͱ͕Ͱ͖Δ

  45. None
  46. query.rx_text // 1. 3จࣈҎ্ .filter {string in return string.characters.count >

    3 } // 2. ࠷ޙͷೖྗ͔Β0.51ඵܦա .debounce(0.51, scheduler: MainScheduler.instance) // 3. ϦΫΤετΛੜ੒ .map {string in let apiURL = NSURL(string: "https://api.github.com/q?=" + string)! return NSURLRequest(URL: apiURL) } // 4. ϦΫΤετΛ࣮ߦʢඇಉظ௨৴ʣ .flatMapLatest { request in return NSURLSession.sharedSession().rx_data(request) } // 5. ϦΫΤετ݁ՌΛJSONΦϒδΣΫτʹม׵ .map { data —> Array<AnyObject> in let json = try NSJSONSerialization.JSONObjectWithData( data, options: []) return json as! Array<AnyObject> } // 6. RepoΦϒδΣΫτʹม׵ .map {object in return Repo(object: object) } // 7. RepoΦϒδΣΫτΛTableViewʹ൓ө .bindTo(tableView.rx_itemsWithCellIdentifier("Cell")) iOSΞϓϦ։ൃʹ͓͚ΔRxSwiftͷ׆༻ (※ ίʔυ͸rxswift-2.0)
  47. iOSͰReactive Programming

  48. iOSͰReactive Programming 4 ReactiveCocoa ⭐ 17,222 4 Objective-C࣌୅͔Β͋Δݹג 4 RxSwift

    ⭐ 9,244 4 ReactiveX(Reactive Extensions)ϑΝϛϦʔ
  49. iOSͰReactive Programming 4 ReactiveCocoa ⭐ 17,222 4 Objective-C࣌୅͔Β͋Δݹג 4 RxSwift

    ⭐ 9,244 4 ReactiveX(Reactive Extensions)ϑΝϛϦʔ 4 Rx.NET͔Β࢝·Γ༷ʑͳݴޠʹҠ২
  50. iOSͰReactive Programming 4 ReactiveCocoa ⭐ 17,222 4 Objective-C࣌୅͔Β͋Δݹג 4 RxSwift

    ⭐ 9,244 4 ReactiveX(Reactive Extensions)ϑΝϛϦʔ 4 Rx.NET͔Β࢝·Γ༷ʑͳݴޠʹҠ২ 4 ଞͷRxJava, RxJSͳͲͱ֓೦͕౷Ұ͞Ε͍ͯΔͷͰ Web্ͷ৘ใ͕๛෋
  51. iOSͰReactive Programming 4 ReactiveCocoa ⭐ 17,222 4 Objective-C࣌୅͔Β͋Δݹג 4 RxSwift

    ⭐ 9,244 4 ReactiveX(Reactive Extensions)ϑΝϛϦʔ 4 Rx.NET͔Β࢝·Γ༷ʑͳݴޠʹҠ২ 4 ଞͷRxJava, RxJSͳͲͱ֓೦͕౷Ұ͞Ε͍ͯΔͷͰ Web্ͷ৘ใ͕๛෋
  52. Reactive Programmingͷ ݕࡧ࣌ͷ஫ҙ

  53. ·͗ΒΘ໊͍͠শ

  54. ·͗ΒΘ໊͍͠শ 4 React / React.js / ReactJS 4 React Native

    4 Reactive Programming
  55. ·͗ΒΘ໊͍͠শ 4 React (௨শ React.js/ReactJS) 4 Facebook੡ͷJavaScriptϥΠϒϥϦ 4 React Native

    4 ReactͰiOS/Android։ൃ͕Ͱ͖ΔFacebook੡ͷϑϨ ʔϜϫʔΫ 4 Reactive Programming 4 ඇಉظσʔλετϦʔϜΛ༻͍Δϓϩάϥϛϯάύϥμ
  56. React͸Reactive ProgrammingͰ͸ͳ͍ Reactive Programming͸େଟ਺ͷਓֶ͕Ϳʹ͸େม͔ͩ ΒɺReactͰ͸࠾༻͍ͯ͠ͳ͍ — by Sebastian (Reactͷ։ൃऀ) React͸ϦΞΫςΟϒϓϩάϥϛϯάͳͷ͔?

  57. http://rehansaeed.com/model-view-viewmodel-mvvm-part1-overview/

  58. MVVM 4 MicrosoftൃͷΞʔΩςΫνϟ WebΞϓϦέʔγϣϯ։ൃऀ͔ΒݟͨɺMVCͱMVPɺͦͯ͠MVVMͷҧ͍

  59. MVVM 4 MicrosoftൃͷΞʔΩςΫνϟ 4 ίΞίϯηϓτ͸ɺσʔλόΠϯσ Οϯά WebΞϓϦέʔγϣϯ։ൃऀ͔ΒݟͨɺMVCͱMVPɺͦͯ͠MVVMͷҧ͍

  60. MVVM 4 MicrosoftൃͷΞʔΩςΫνϟ 4 ίΞίϯηϓτ͸ɺσʔλόΠϯσ Οϯά 4 ViewModelͱ͍͏Modelͷσʔλ ΛViewͰѻ͍΍͘͢͢Δ΋ͷΛઃ ͚Δɻ

    WebΞϓϦέʔγϣϯ։ൃऀ͔ΒݟͨɺMVCͱMVPɺͦͯ͠MVVMͷҧ͍
  61. MVVM 4 MicrosoftൃͷΞʔΩςΫνϟ 4 ίΞίϯηϓτ͸ɺσʔλόΠϯσ Οϯά 4 ViewModelͱ͍͏Modelͷσʔλ ΛViewͰѻ͍΍͘͢͢Δ΋ͷΛઃ ͚Δɻ

    4 ViewͱViewModelؒ͸σʔλόΠ ϯσΟϯάͱ͍͏ػೳΛ࢖͍ɺσ ʔλͦͷ΋ͷΛڞ༗ͯ͠औΓѻ͏ WebΞϓϦέʔγϣϯ։ൃऀ͔ΒݟͨɺMVCͱMVPɺͦͯ͠MVVMͷҧ͍
  62. MVC ↓ Reactive Programming + MVVM

  63. Reactive Programming + MVVM 4 Massive View Controller͸վળ͞Εͨɻ

  64. Reactive Programming + MVVM 4 Massive View Controller͸վળ͞Εͨɻ 4 ...͔͠͠ɺ৽ͨʹผͷෳࡶ͕͞ൃੜͨ͠ɻ

  65. Reactive Programming + MVVM 4 Massive View Controller͸վળ͞Εͨɻ 4 ...͔͠͠ɺ৽ͨʹผͷෳࡶ͕͞ൃੜͨ͠ɻ

    4 ControllerͰߦͳ͍ͬͯͨॲཧ͕ViewModelʹҠΓɺ ͦΕͰMasassive View Controller͕վળ͞Ε͚ͨͩ
  66. Reactive Programming + MVVM 4 Massive View Controller͸վળ͞Εͨɻ 4 ...͔͠͠ɺ৽ͨʹผͷෳࡶ͕͞ൃੜͨ͠ɻ

    4 ControllerͰߦͳ͍ͬͯͨॲཧ͕ViewModelʹҠΓɺ ͦΕͰMasassive View Controller͕վળ͞Ε͚ͨͩ 4 ͜Ε͸ઃܭ͚ͩͰͲ͏ʹ͔Ͱ͖Δ໰୊͡Όͳ͍ͷͰ͠ΐ ͏͕ͳ͍
  67. Reactive Programming + MVVM 4 Massive View Controller͸վળ͞Εͨɻ 4 ...͔͠͠ɺ৽ͨʹผͷෳࡶ͕͞ൃੜͨ͠ɻ

    4 ControllerͰߦͳ͍ͬͯͨॲཧ͕ViewModelʹҠΓɺ ͦΕͰMasassive View Controller͕վળ͞Ε͚ͨͩ 4 ͜Ε͸ઃܭ͚ͩͰͲ͏ʹ͔Ͱ͖Δ໰୊͡Όͳ͍ͷͰ͠ΐ ͏͕ͳ͍ 4 Reactive ProgrammingͰίʔυྔ͸ݮΒͤΔ
  68. Reactive Programmingͷॴײ

  69. Reactive Programmingͷॴײ 4 ࢓૊Έ͕ෳࡶͰɺ֮͑Δͷ͕େม

  70. Reactive Programmingͷॴײ 4 ࢓૊Έ͕ෳࡶͰɺ֮͑Δͷ͕େม 4 ֮͑ͨޙ΋ɺ࢖͏ͷ͕େม

  71. Reactive Programmingͷॴײ 4 ࢓૊Έ͕ෳࡶͰɺ֮͑Δͷ͕େม 4 ֮͑ͨޙ΋ɺ࢖͏ͷ͕େม 4 ͍ΘΏΔֶशίετ͕ߴ͍

  72. RxSwiftͷॴײ

  73. RxSwiftͷॴײ 4 ૒ํ޲όΠϯσΟϯά

  74. RxSwiftͷॴײ 4 ૒ํ޲όΠϯσΟϯά 4 ୯ํ޲όΠϯσΟϯάΛ͓ޓ͍ʹߦ͑͹૒ํ޲όΠϯσ ΟϯάͩΑͶ! - by RxSwiftͷIssueʹͯ ReactiveX/RxSwift

    - two-way binding #152
  75. RxSwiftͷॴײ 4 ૒ํ޲όΠϯσΟϯά 4 ୯ํ޲όΠϯσΟϯάΛ͓ޓ͍ʹߦ͑͹૒ํ޲όΠϯσ ΟϯάͩΑͶ! - by RxSwiftͷIssueʹͯ 4

    ୯७ʹσʔλ͕ಉظ͞ΕΔΑ͏ͳ࢓૊ΈͰ͸ͳ͍ ReactiveX/RxSwift - two-way binding #152
  76. RxSwiftͷॴײ 4 ૒ํ޲όΠϯσΟϯά 4 ୯ํ޲όΠϯσΟϯάΛ͓ޓ͍ʹߦ͑͹૒ํ޲όΠϯσ ΟϯάͩΑͶ! - by RxSwiftͷIssueʹͯ 4

    ୯७ʹσʔλ͕ಉظ͞ΕΔΑ͏ͳ࢓૊ΈͰ͸ͳ͍ 4 ߏจ͸ॻ͖΍͘͢ɺDelegateɺClosureɺCocoaͷ KVOΑΓ͸ॊೈͰ࣮૷΋ָ ReactiveX/RxSwift - two-way binding #152
  77. MVVM + RxSwiftͷॴײ

  78. MVVM + RxSwiftͷॴײ 4 ΞϓϦͷن໛͕େ͖͘ͳΔͱViewModelͷॳظԽɺ ObservableετϦʔϜ͕ෳࡶʹͳΔ

  79. MVVM + RxSwiftͷॴײ 4 ΞϓϦͷن໛͕େ͖͘ͳΔͱViewModelͷॳظԽɺ ObservableετϦʔϜ͕ෳࡶʹͳΔ 4 Massive View ControllerΛղܾ͢Δํ๏ͱ͸ҟͳΔछ

    ྨͷෳࡶ͞
  80. ͱ͸ݴͬͯ΋

  81. ͱ͸ݴͬͯ΋ 4 MVC2ΑΓReactive Programming + MVVMͷํ͕͍͍

  82. ͱ͸ݴͬͯ΋ 4 MVC2ΑΓReactive Programming + MVVMͷํ͕͍͍ 4 ͨͩɺ͜ΕͰ໰୊͕ղܾͨ͠ͱ͸ࢥ͑ͳ͔ͬͨ...

  83. ࣍ͷվળҊ

  84. The Reactive Architecture

  85. https://github.com/ReactorKit/ReactorKit

  86. ReactorKit 4 Reactive Programming + Flux

  87. ReactorKit 4 Reactive Programming + Flux 4 RxSwiftʹґଘ͢ΔܰྔͳϑϨʔϜϫʔΫ

  88. ReactorKit 4 Reactive Programming + Flux 4 RxSwiftʹґଘ͢ΔܰྔͳϑϨʔϜϫʔΫ 4 2017/1/7

    ެ։
  89. ReactorKit 4 Reactive Programming + Flux 4 RxSwiftʹґଘ͢ΔܰྔͳϑϨʔϜϫʔΫ 4 2017/1/7

    ެ։ 4 2017/5/20 Github ⭐ 512
  90. ReactorKit 4 ։ൃऀ @devxoul 4 Then ⭐ 1,616 4 URLNavigator

    ⭐ 1,076 4 Toaster ⭐ 722 4 SwiftyImage ⭐ 612 4 UITextView+Placeholder ⭐ 572 4 RxKeyboard ⭐ 444
  91. Flux

  92. Flux 4 Facebook੡ͷΞʔΩςΫνϟ

  93. Flux 4 Facebook੡ͷΞʔΩςΫνϟ 4 ಉ໊ͷJavaScriptͷϑϨʔϜϫʔΫ΋͋Δ

  94. Flux 4 Facebook੡ͷΞʔΩςΫνϟ 4 ಉ໊ͷJavaScriptͷϑϨʔϜϫʔΫ΋͋Δ 4 ୯ํ޲σʔλϑϩʔ https://github.com/facebook/flux/tree/master/examples/flux-concepts

  95. Flux 4 Actions: View౳͔ΒൃՐ͞Εͯ࡞ ΒΕΔΠϕϯτ Fluxͱ͸ͳΜͳͷ͔

  96. Flux 4 Actions: View౳͔ΒൃՐ͞Εͯ࡞ ΒΕΔΠϕϯτ 4 Dispatcher: શͯͷΞΫγϣϯΛ ड͚ͯStoreʹΠϕϯτΛൃՐ͢Δ Fluxͱ͸ͳΜͳͷ͔

  97. Flux 4 Actions: View౳͔ΒൃՐ͞Εͯ࡞ ΒΕΔΠϕϯτ 4 Dispatcher: શͯͷΞΫγϣϯΛ ड͚ͯStoreʹΠϕϯτΛൃՐ͢Δ 4

    Stores: ΞϓϦέʔγϣϯશମͷ σʔλͱϏδωεϩδοΫ(ඞͣ ActionʹΑͬͯσʔλΛߋ৽͢Δ) Fluxͱ͸ͳΜͳͷ͔
  98. The Reactive Architecture https://github.com/ReactorKit/ReactorKit

  99. The Reactive Architecture 4 MVVMͷVM͕Reactorʹஔ͖׵ ͑ΒΕͨ https://github.com/ReactorKit/ReactorKit

  100. The Reactive Architecture 4 MVVMͷVM͕Reactorʹஔ͖׵ ͑ΒΕͨ 4 View͕ΞΫγϣϯΛग़ྗ͠ɺ Reactor͕ঢ়ଶ(State)Λग़ྗ͢Δ https://github.com/ReactorKit/ReactorKit

  101. The Reactive Architecture 4 MVVMͷVM͕Reactorʹஔ͖׵ ͑ΒΕͨ 4 View͕ΞΫγϣϯΛग़ྗ͠ɺ Reactor͕ঢ়ଶ(State)Λग़ྗ͢Δ 4

    ୯ํ޲ͷσʔλϑϩʔ(Flux) https://github.com/ReactorKit/ReactorKit
  102. The Reactive Architecture 4 MVVMͷVM͕Reactorʹஔ͖׵ ͑ΒΕͨ 4 View͕ΞΫγϣϯΛग़ྗ͠ɺ Reactor͕ঢ়ଶ(State)Λग़ྗ͢Δ 4

    ୯ํ޲ͷσʔλϑϩʔ(Flux) 4 Reactor͸Reactive ProgrammingͰ୯ํ޲ͷσʔλε τϦʔϜΛߏங͍ͯ͠Δ https://github.com/ReactorKit/ReactorKit
  103. MVVMͷԿ͕վળ͞Εͨ ͷ͔

  104. MVVMͷ໰୊

  105. MVVMͷ໰୊ 4 ΞϓϦͷن໛͕େ͖͘ͳΔͱViewModelͷॳظԽɺ ObservableετϦʔϜ͕ෳࡶʹͳΔ

  106. MVVMͷ໰୊ 4 ΞϓϦͷن໛͕େ͖͘ͳΔͱViewModelͷॳظԽɺ ObservableετϦʔϜ͕ෳࡶʹͳΔ ղܾ 4 ReactorKit͕୯ํ޲ͷσʔλετϦʔϜΛߏங

  107. ReactorKitͷ୯ํ޲ͷσʔλετϦʔϜ 4 Action, Mutation, StateΛఆٛ https://github.com/ReactorKit/ReactorKit

  108. ReactorKitͷ୯ํ޲ͷσʔλετϦʔϜ 4 Action, Mutation, StateΛఆٛ 4 mutate(), reduce()Ͱ্هΛมԽ https://github.com/ReactorKit/ReactorKit

  109. ReactorKitͷ୯ํ޲ͷσʔλετϦʔϜ 4 Action, Mutation, StateΛఆٛ 4 mutate(), reduce()Ͱ্هΛมԽ 4 Service૚ͰϏδωεϩδοΫΛ࣮

    ߦ https://github.com/ReactorKit/ReactorKit
  110. ReactorKitͷ୯ํ޲ͷσʔλετϦʔϜ 4 MVVMͰߦͳ͍ͬͯͨ͜ͱΛ Reactor͕ߏ଄Λߏங https://github.com/ReactorKit/ReactorKit

  111. ReactorKitͷ୯ํ޲ͷσʔλετϦʔϜ 4 MVVMͰߦͳ͍ͬͯͨ͜ͱΛ Reactor͕ߏ଄Λߏங 4 ViewModelͷॳظԽɺ ObservableετϦʔϜͷෳࡶ ͞Λ؇࿨ https://github.com/ReactorKit/ReactorKit

  112. ReactorKitͷ୯ํ޲ͷσʔλετϦʔϜ 4 MVVMͰߦͳ͍ͬͯͨ͜ͱΛ Reactor͕ߏ଄Λߏங 4 ViewModelͷॳظԽɺ ObservableετϦʔϜͷෳࡶ ͞Λ؇࿨ 4 ߏ଄ͱϑϩʔ͕ܾ·ͬͯΔ͔Β

    ֤੹຿͕ΑΓ໌֬ʹͳΔ https://github.com/ReactorKit/ReactorKit
  113. MVVMͷ໰୊ʢRxSwiftͷ໰୊ʁʣ 4 scan()ͱVariableΛ࢖Θ͟ΔΛಘͳ͍ RxSwiftͷreactorkitνϟϯωϧʹͯ

  114. MVVMͷ໰୊ʢRxSwiftͷ໰୊ʁʣ 4 scan()ͱVariableΛ࢖Θ͟ΔΛಘͳ͍ 4 scan()Ͱ͸ෆे෼ͳέʔε͕͋Δ RxSwiftͷreactorkitνϟϯωϧʹͯ

  115. MVVMͷ໰୊ʢRxSwiftͷ໰୊ʁʣ 4 scan()ͱVariableΛ࢖Θ͟ΔΛಘͳ͍ 4 scan()Ͱ͸ෆे෼ͳέʔε͕͋Δ 4 ReactorKitͰ͸վળ RxSwiftͷreactorkitνϟϯωϧʹͯ

  116. MVVMͷ໰୊ʢRxSwiftͷ໰୊ʁʣ 4 scan()ͱVariableΛ࢖Θ͟ΔΛಘͳ͍ 4 scan()Ͱ͸ෆे෼ͳέʔε͕͋Δ 4 ReactorKitͰ͸վળ ※ ۩ମతʹͲͷΑ͏ͳ໰୊ͳͷ͔͕Θ͔Βͳ͍! RxSwiftͷreactorkitνϟϯωϧʹͯ

  117. MVVMͷ໰୊ʢRxSwiftͷ໰୊ʁʣ 4 ৄ͘͠͸ɺSwiftMvvmTodoListΛࢀর 4 Microsoftܥͷ։ൃऀͰɺC#ͰͷMVVMͷܦݧऀ͕ RxSwiftͰMVVMΛ࣮૷ RxSwiftͷreactorkitνϟϯωϧʹͯ

  118. ReactorKit͸࣮༻తͳα ϯϓϧ͕ἧ͍ͬͯΔͷͰ ֶͼ΍͍͢

  119. ReactorKitͷαϯϓϧ(READMEʹهࡌ) 4 Counter 4 ࠷খݶͷ࣮૷ 4 GitHubSearch 4 γϯϓϧͳඇಉظॲཧͷ࣮૷

  120. ReactorKitͷαϯϓϧ(READMEʹهࡌ) 4 RxTodo 4 Service૚ͰTableViewͷॲཧΛ࣮૷ 4 Cleverbot 4 Service૚ͰAPIϦΫΤετΛ࣮૷ 4

    Drrrible 4 App StoreʹϦϦʔεࡁΈͷΞϓϦͰɺΑΓ࣮ફతͳ࣮ ૷͕֬ೝͰ͖Δ
  121. The Reactive Architecture ͱ MVVMͷൺֱ

  122. The Reactive ArchitectureͱMVVMͷൺֱ 4 The Reactive Architecture 4 RxTodo 4

    Reactive Programming + MVVM 4 RxTodo / mvvm branch
  123. The Reactive ArchitectureͱMVVMͷൺֱ 4 ReactorKitͷ࠷ॳͷΞʔΩςΫνϟ໊͸RxMVVMͩͬͨ

  124. The Reactive ArchitectureͱMVVMͷൺֱ 4 ReactorKitͷ࠷ॳͷΞʔΩςΫνϟ໊͸RxMVVMͩͬͨ 4 ͦͷޙViewModel͕Reactorʹஔ͖׵ΘΓɺΞʔΩς Ϋνϟ໊΋The Reactive Architectureʹมߋ͞Εͨ

  125. ։ൃޮ཰ΞοϓͷΩʔϫʔυ Reactive Programming

  126. ։ൃޮ཰ΞοϓͷΩʔϫʔυ 4 Reactive Programming

  127. ։ൃޮ཰ΞοϓͷΩʔϫʔυ 4 Reactive Programming 4 ಉظ/ඇಉظ໰ΘͣઢܗతʹৼΔ෣͍Λهड़

  128. ։ൃޮ཰ΞοϓͷΩʔϫʔυ 4 Reactive Programming 4 ಉظ/ඇಉظ໰ΘͣઢܗతʹৼΔ෣͍Λهड़ 4 ίʔυྔ͕ݮΔ

  129. ։ൃޮ཰ΞοϓͷΩʔϫʔυ 4 Reactive Programming 4 ಉظ/ඇಉظ໰ΘͣઢܗతʹৼΔ෣͍Λهड़ 4 ίʔυྔ͕ݮΔ 4 ͨͩ͠ɺֶशίετ͸ߴ͍

  130. ։ൃޮ཰ΞοϓͷΩʔϫʔυ 4 Reactive Programming 4 ಉظ/ඇಉظ໰ΘͣઢܗతʹৼΔ෣͍Λهड़ 4 ίʔυྔ͕ݮΔ 4 ͨͩ͠ɺֶशίετ͸ߴ͍

    4 ୯Ұґଘʹͳͬͯ͠·͏ϦεΫ
  131. खΛग़͢΂͖͔ʁ

  132. RxSwiftͷSlackʹͯ 4 ʮRxSwiftΛֶͿҙຯ͸͋Δͷʁʯ

  133. RxSwiftͷSlackʹͯ 4 ʮRxSwiftΛֶͿҙຯ͸͋Δͷʁʯ 4 ʮԶ͸લ·ͰϏϯͰఝΛୟ͍͚ͯͨͲɺϋϯϚʔΛखʹ͠ ͔ͯΒ؆୯ʹఝΛୟ͚ΔΑ͏ʹͳͬͨΑɻʯ

  134. RxSwiftͷSlackʹͯ 4 ʮRxSwiftΛֶͿҙຯ͸͋Δͷʁʯ 4 ʮԶ͸લ·ͰϏϯͰఝΛୟ͍͚ͯͨͲɺϋϯϚʔΛखʹ͠ ͔ͯΒ؆୯ʹఝΛୟ͚ΔΑ͏ʹͳͬͨΑɻʯ 4 ʮ(ผͷਓ)ͨͩεϨοδϋϯϚʔͰఝଧͪ͢Δͱ΋ͬͱେ ͖ͳ໰୊ʹͳΔ͜ͱ΋͋ΔΑͶɻʯ

  135. ϋϯϚʔΛ࣋ͭਓʹ͸ɺ ͢΂͕ͯఝʹݟ͑Δɻ -৺ཧֶऀ ΞϒϥϋϜɾϚζϩʔ meeting_hammer illustration ⡥ Frits Ahlefeldt Hiking.org

    - May 16, 2011
  136. εϨοδϋϯϚʔ North Carolina National Guard (cc-by-2.0) The National Guard -

    1 June 2009, 15:34
  137. Reactive ProgrammingͰ͢ ΂ͯͷ໰୊Λղܾ͠Α͏ ͱ͢ΔͱͭΒ͍

  138. RxSwift͸ֶͿҙຯ͋Δͷʁ 4 RxSwift͸͋Δ໰୊Λղܾ͢Δͷʹదͨ͠πʔϧ RxSwiftͷSlackʹͯ

  139. RxSwift͸ֶͿҙຯ͋Δͷʁ 4 RxSwift͸͋Δ໰୊Λղܾ͢Δͷʹదͨ͠πʔϧ 4 ΋ͪΖΜͦΕ͸RxSwiftͰͳͯ͘΋ղܾՄೳͳ໰୊ RxSwiftͷSlackʹͯ

  140. RxSwift͸ֶͿҙຯ͋Δͷʁ 4 RxSwift͸͋Δ໰୊Λղܾ͢Δͷʹదͨ͠πʔϧ 4 ΋ͪΖΜͦΕ͸RxSwiftͰͳͯ͘΋ղܾՄೳͳ໰୊ 4 RxSwift͸ͨͩͷπʔϧ͔ͩΒɺඞཁͩͱࢥͬͨΒ࢖͑͹ ͍͍ RxSwiftͷSlackʹͯ

  141. RxSwift͸ֶͿҙຯ͋Δͷʁ 4 RxSwift͸͋Δ໰୊Λղܾ͢Δͷʹదͨ͠πʔϧ 4 ΋ͪΖΜͦΕ͸RxSwiftͰͳͯ͘΋ղܾՄೳͳ໰୊ 4 RxSwift͸ͨͩͷπʔϧ͔ͩΒɺඞཁͩͱࢥͬͨΒ࢖͑͹ ͍͍ 4 ͨͩ͠RxSwift͸εϨοδϋϯϚʔͷΑ͏ʹڊେ͔ͩΒɺ

    ΑΓͦͷϓϩδΣΫτʹϑΟοτͯ͠Δඞཁ͕͋Δ RxSwiftͷSlackʹͯ
  142. ·ͱΊ

  143. ·ͱΊ 4 Reactive Programming (RxSwift)

  144. ·ͱΊ 4 Reactive Programming (RxSwift) 4 ཁॴཁॴͷ։ൃޮ཰Ξοϓ

  145. ·ͱΊ 4 Reactive Programming (RxSwift) 4 ཁॴཁॴͷ։ൃޮ཰Ξοϓ 4 MVVM

  146. ·ͱΊ 4 Reactive Programming (RxSwift) 4 ཁॴཁॴͷ։ൃޮ཰Ξοϓ 4 MVVM 4

    Massive View ControllerΛվળ
  147. ·ͱΊ 4 Reactive Programming (RxSwift) 4 ཁॴཁॴͷ։ൃޮ཰Ξοϓ 4 MVVM 4

    Massive View ControllerΛվળ 4 The Reactive Architecture (ReactorKit)
  148. ·ͱΊ 4 Reactive Programming (RxSwift) 4 ཁॴཁॴͷ։ൃޮ཰Ξοϓ 4 MVVM 4

    Massive View ControllerΛվળ 4 The Reactive Architecture (ReactorKit) 4 MVVMΛΑΓѻ͍΍͍͢ߏ଄ʹվળ
  149. None
  150. ReactorKit 4 2017/5/20 v0.4.3

  151. ReactorKit 4 2017/5/20 v0.4.3 4 جຊઃܭ͸Ͱ͖͍ͯΔΑ͏ʹݟ͑Δ͕ɺ·ͩv1.0ʹୡ͠ ͍ͯͳ͍

  152. ReactorKit 4 2017/5/20 v0.4.3 4 جຊઃܭ͸Ͱ͖͍ͯΔΑ͏ʹݟ͑Δ͕ɺ·ͩv1.0ʹୡ͠ ͍ͯͳ͍ 4 RxSwift +

    MVVMΑΓ͸؆୯͔ͩΒྲྀߦΔ͔ͳʁ
  153. ReactorKit 4 2017/5/20 v0.4.3 4 جຊઃܭ͸Ͱ͖͍ͯΔΑ͏ʹݟ͑Δ͕ɺ·ͩv1.0ʹୡ͠ ͍ͯͳ͍ 4 RxSwift +

    MVVMΑΓ͸؆୯͔ͩΒྲྀߦΔ͔ͳʁ 4 ݸਓతʹ͸޷͖ͳઃܭࢥ૝
  154. ReactorKit 4 2017/5/20 v0.4.3 4 جຊઃܭ͸Ͱ͖͍ͯΔΑ͏ʹݟ͑Δ͕ɺ·ͩv1.0ʹୡ͠ ͍ͯͳ͍ 4 RxSwift +

    MVVMΑΓ͸؆୯͔ͩΒྲྀߦΔ͔ͳʁ 4 ݸਓతʹ͸޷͖ͳઃܭࢥ૝ 4 ڵຯ͕ଓ͍͍ͯͨΒɺ࣍ճͷษڧձͰReactorKitͷ࿩͕Ͱ ͖Ε͹ͱࢥ͍·͢ɻ
  155. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠

  156. ࢀߟ 4 Разбираем Massive View Controller 4 Massive View Controller

    4 8 Patterns to Help You Destroy Massive View Controller 4 Let's Play: ڊେϏϡʔίϯτϩʔϥΛϦϑΝΫλϦϯά͠ Α͏ʂ 4 iOSΞϓϦ։ൃʹ͓͚ΔRxSwiftͷ׆༻ 4 React͸ϦΞΫςΟϒϓϩάϥϛϯάͳͷ͔?
  157. ࢀߟ 4 Fluxͱ͸ͳΜͳͷ͔ 4 MVVM΍FRPʹऔΓ૊Έ΍͘͢͢ΔͨΊʹ 4 WebΞϓϦέʔγϣϯ։ൃऀ͔ΒݟͨɺMVCͱMVPɺͦ ͯ͠MVVMͷҧ͍