thoughtbot / CombineViewModel

An implementation of the Model-View-ViewModel (MVVM) pattern using Combine.
MIT License
59 stars 4 forks source link

Merge thoughtbot/Bindings as a subtree of CombineViewModel #8

Closed sharplet closed 4 years ago

sharplet commented 4 years ago

I propose we merge https://github.com/thoughtbot/Bindings directly into CombineViewModel, merging their histories. The benefits to reusing the BindingOwner protocol should be clearly illustrated in https://github.com/thoughtbot/CombineViewModel/pull/9.

Why combine the histories of these two repositories instead of simply depending on Bindings?

  1. In my mind the main benefit will be in maintenance. It's strictly simpler to maintain a single project instead of multiple.
  2. I think CombineViewModel is more likely to succeed as a holistic approach to implementing MVVM in UIKit. That holistic vision makes the role of Bindings itself much clearer in my mind: it's a pattern for triggering updates to your UI based on the output of reactive streams.
  3. A clearer vision will hopefully help to increase adoption — i.e., if it's easier to understand the purpose of the library and how to use it, and easier to get started, people are more likely to try!

You may be wondering, "What about SwiftUI?" I feel pretty confident it will be the future of app development on Apple platforms, but it's not there yet. However, one of my goals in building this package atop Combine's ObservableObject protocol is that view models you develop with CombineViewModel should slot directly into SwiftUI apps, potentially without even modifying the view model code. I'd love for this package to become a bridge to introducing SwiftUI in existing UIKit and AppKit codebases, be leveraging the same tools at the data and controller (a.k.a. view model) layers.