MVVM as good (anti)pattern in iOS
summary
Argues that MVVM on iOS often breaks SRP by stuffing networking, formatting, delegates and persistence into view models, gives concrete metrics from a real app: 255,000 LOC, 6,000 Swift files, 8,200 unit tests, 204 view controllers, 99.2% coverage, average file 37 lines, only 88 files >100 lines, demonstrates splitting into many small view controllers and services, shows bindings versus closure pitfalls and a demo app where sharing a view model caused retain bugs, recommends using view models as simple dump struct and separate services.
AI-written summary · about
chapters (17)
- 0:00Intro
- 1:49WHY anti pattern? What's wrong with MVVM?
- 3:07Let's start from the beginning
- 4:30Windows Presentation Foundation is a graphical subsystem created by Microsoft for rendering user Interfaces in Windows-based applications.
- 4:40Basic approach of MVVM in WPF
- 7:402 different definitions
- 9:39What is wrong with it?
- 11:36View model is a model for a view, isn't it?
- 12:29What about those action methods?
- 13:12MVC - Many View Controllers
- 15:17Real life bugs
- 19:54How many view controllers are there?
- 21:43"Get rid of Massive ViewController"
- 22:00small View Controller + ...
- 23:06"MVVM makes my apps more testable"
- 24:11"Because it's so popular and it's a perfect solution with RxSwift"
- 25:16Disadvantages
related talks
34mMVWTF: Demystifying Architecture Patterns
22mBloated ViewModels? What Next
35mBreaking Up with Big ViewModels
35mModel View Intent, Embracing Reactive UI's
30mArchitecting an app with MVP and ViewModels
18mMVVM architecture with Data Bindings
41mBreaking ViewModels into smaller self-contained UI models
40mI Wrote an App Using Architecture Components… And Here’s How It Turned Out
