I wanted to bring up some discussion I encountered surrounding architecture discussed within:
https://azamsharp.com/2022/07/17/2022-swiftui-and-mvvm.html
It looks like there is a lot to be said about how MVVM is interpreted in SwiftUI/Swift.
In the link above, there is a lot of advocacy toward a pure MV approach (technically it is still MVVM because the SwiftUI Views are effectively doubling as the ViewModel AND the View). However, in practice, the MV approach is named such because you don't end up writing lots of ViewModel objects.
I see that there is evidence supporting an MV approach can yield both cleaner code, and even improved runtime performance.
This does beg the question for me though, why is there so much literature, examples, and support covering the tried & true MVVM approach even if there are performance risks? Is this because the MVVM approach where you instantiate and manage ViewModel objects is just easier to write, and easier to validate the separation of concerns? Did we fall into a bad habit?
If the more purist MV approach is much better - why don't I see more of it? I'm aware this paradigm does get covered in Apple videos, like their WWDC examples, but I do feel the discussion is glossed over in the mainstream world of iOS.
To be clear, the two design paradigms I am talking about are BOTH technically MVVM in a nut-shell. It just so happens that one tries to eliminate a ViewModel object management layer that greatly simplifies design (due to a combination of business logic and model data managed in a single Struct, for example) and improves performance of applications at scale.
Do you see a world where apps should be made without ViewModel objects taking reign? Do you think apps should use ViewModel objects? Personally, I see the benefits of the pure MV approach, but I am deeply weary of migrating to it in a foul-swoop because ViewModel objects treat me so so well...