New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible wrong use of MVVM pattern #15
Comments
Hi, @stefanomondino Thanks for rising this issue :) As a reference to MVVM I like to use msdn post. I would agree here that we are doing data formatting on a binding layer is wrong, effectively leaking the But I think you are right and we should be precise! As some people out there could be confused (a specially people new to iOS development), thinking this the right way to do it. I'll try to find some time and address it. Or if you want to do it yourself I would be more then happy to see your approach. |
I've forked your repo, I'll try to work something out. I'll let you know! |
@sergdort here it is. It's really a simple approach, in a real project i usually create a little bit more of structure inside the view model layer. |
I guess we can close this one :) Feel free to reopen if you think there are thing that can be improved |
Hi guys,
first of all, let me thank you for your work, which is really great and inspiring!
I've been using MVVM in iOS since 4 years now and I've learned that everyone has its personal way to implement things with this pattern and, most of all, everyone intend a "View Model" in different way.
However, there seems to be 2 things that almost everyone agrees upon:
Taking a look at your example, in the PostsViewController, you're fetching the UITableView with the
.rx
extension: inside the closure, you're directly referencing the UITableViewCells IBOutlets and directly populating with model properties, which (in my opinion) totally breaks the MVVM pattern for different reasons :Does it make sense to you? Am I being too "strict to the pattern" for your scenario?
Thanks in advance :)
The text was updated successfully, but these errors were encountered: