ViewModel - MVVM
See original GitHub issueWe should support MVVM pattern as well (as addition to MVP - not replacement). The main question is, whether we should use new Android’s data binding API or RxAndroid. We can expect that RxAndroid will make some big progress next weeks https://github.com/ReactiveX/RxAndroid/issues/172
I guess waiting until a stable databinding 1.0 and RxAndroid 1.0 version is available is a good idea to make a final discussion which way to go. Probably, we could implement ViewModel
genericly so that we can use is for both frameworks.
also MVVMC seems to be a valid pattern, but that may not belong in this library: http://skimp-blog.blogspot.de/2012/02/mvvm-is-dead-long-live-mvvmc.html
Further discussion with other devs (please don’t comment on google+ , use github this issue here for suggestions, recommandations and so on) https://plus.google.com/+HannesDorfmann/posts/DsukugwZsbG
Handling screen orientation changes is a MUST HAVE
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
Hello, not a user of mosby yet. But, if it counts, I would vote for mosby to leverage the new Google’s databinding
I would say that as far as functional intent, and original sockeqwe question – I feel that Google’s databinding is more analogous to Jake Wharton’s RxBinding http://github.com/JakeWharton/RxBinding
To expand a bit more, I am not sure that Google’s databinding is flexible enough (or intended to) bind/observe IO completion events (eg http fetches, or SQLLite query completion) to Mosby’s MvpPresenter.
In fact, in an app I am building – I intend to leverage, in some activities, React-Native as well.
So I am basically ending up with the following scheme Model<–rxAndroid–>Presenter<–G.Databiding–>NativeUI(layout/xyz.xml) Model<–rxAndroid–>Presenter<–ReactNativeBridge—>ReactUI (abc.js) So I am ending up with 2 binding tools for the UI layer, while with sticking with rxAndroid for non-UI stuff. There is also a new library that hides underneath ReactNativeBridge stuff, and I might end up leveraging that (still learning though) http://github.com/Kudo/RxRNBridge
Ditched MVVM in favor of Model-View-Intent; sample is available. Pre release (alpha release of Mosby
3.0.0-alpha1
) coming soon.