Is RxSwift a must in MVVM?

I think it is really an overwhelm for iOS beginner…

@hawk This tutorial implements MVVM without RxSwift:

https://www.raywenderlich.com/34-design-patterns-by-tutorials-mvvm

I hope it helps!

1 Like

@hawk Thanks very much for your question!

In all honesty, topics like design patterns, and advanced app architecture are not meant for beginners. What I would recommend for any beginner starting out in iOS development is to focus on the following:

  1. Have a solid foundation in Swift
  2. Learn how to use Auto Layout
  3. Learn how to connect your app to the network via a REST API, and parse the JSON response
  4. Get a strong understanding of UITableViews. Know this backwards.
  5. Spend some time learning how to do concurrent programming using GCD and Operations.

Only after getting a good understanding of the above concepts would I then recommend you to venture out and begin learning Design Patterns and App Architecture. That being said, by no means is what I’m saying something written in stone or “gospel”. RxSwift is something relatively new, and if you’re able to pick it up, and understand it, then more power to you. However, trying to learn these concepts without having a strong foundation in concepts like the above will only make your progress even more difficult.

I hope this helps!

All the best!

6 Likes

Thank you! but which technology for binding data is widely used in mvvm?

Thank you very much!

@hawk You can read more about KVO and the Observer pattern in our design patterns book:

https://store.raywenderlich.com/products/design-patterns-by-tutorials

I hope it helps!

This might be true, but I hope RW adds MVVM to this book without RxSwift.
MVVM isn’t a design pattern that’s dependent on Reactive Programming.
It can even be argued that MVVM alleviates some of the need of Reactive Programming with data binding.
Will this be added or should I refund this book?
I have already read RxSwift by RW and the MVVM section in it was quite comprehensive.

Is there going to be a chapter on MVVM without RxSwift?

Extremely disappointed that RxSwift is being used. I personally think it is completely unnecessary. Will not buy this book now. This should be mentioned in the description as I think most people will be put off by this.

2 Likes

@darren102 Can you please help with this when you get a chance? Thank you - much appreciated! :]

@tedbrosby @swiftlearnerforlife Thanks for your feedback. I agree that there are many ways to do data binding in iOS apps built using Swift. When writing the example app for the book we had to make a decision on how we would bind view state to view model state and vice versa. We chose RxSwift because other architectures (e.g. Redux) that we cover in the book depend on reactive programming. We kept the set of libraries as consistent as possible across all architectures so that folks can easily compare one architecture implementation to another.

I’m working on adding an example here of one of the view models from the book using a different binding method. I’ll also add some commentary about what we wanted folks to get out of the chapter to help detach the binding library choice from the concepts we wanted to focus on such as small composable view models. The binding methods I’m aware of are: KVO, Swift Bond, RxSwift, and roll your own. Is there a particular library or method that you all would like to see an example for? Cheers.

1 Like

Would it be possible for you guys to credit my account and remove this book so I can pick something else? I honestly feel a little bit cheated out of the book cost.
This book is basically an architecture extension of your book on RxSwift.
And given you guys are dedicating more resources toward your SwiftUI and Combine books, I have doubts you’ll write entire MVVM chapters based on pure UIKit/Foundation.

I paid early purchase price hoping to get a more meaningful approach to MVVM but this is basically just a very verbose RxSwift book.

To touch back on our previous conversation, you can do MVVM by using AnyObject or Class based protocols with completion blocks and returned properties.

For example,

Hi @tedbrosby,

I’m sorry you’ve not enjoyed this book - thanks for taking the time to let us know what it was about the book you didn’t like.

I’ve asked Paddle, our payment provider to refund you for this book, you should receive this shortly.

Please let me know if I can help with anything else.

Cheers,