AzamSharp

Is MVVM Dead in SwiftUI?

A few weeks ago, I came across an interesting tweet on Twitter (or perhaps I should say X). The tweet originated from Thomas Ricouard, the creator of IceCubes, the famous Mastodon client for iOS. Here’s a screenshot of the tweet.

Thomas Tweet about View Models

In the tweet, Thomas mentioned that he has abandoned view models when developing SwiftUI applications. Instead, he exclusively uses views wherein the logic is contained within each view itself.

This shift isn’t an isolated incident. I’ve heard from numerous top developers that they’re transitioning away from MVVM towards simpler patterns like the Container Pattern, MV Pattern, and others. Personally, I moved away from using classic MVVM last year and shared my thoughts about it on my blog and in my courses.

This post is a part of my weekly newsletter where I share concise, thought-provoking articles. If you’re someone interested in contemplating app architecture, testing, and design, I invite you to subscribe to my newsletter.

In summary, the shift away from traditional MVVM in SwiftUI, exemplified by leaders highlights a trend towards simpler patterns, advocating for logic embedded within views. This trend prompts reflection on whether these alternative approaches better suit individual development needs. Adapting to these changing paradigms is crucial in navigating the evolving landscape of app development.

What are your thoughts on this? Do you believe MVVM in SwiftUI meets your needs, or do you think it needlessly complicates things?

Feel free to let me know.

Thanks,

Azam

PS: I recently published a course on MV Design Pattern with SwiftUI. This course covers Apple’s approach for building SwiftUI Apps. You are more than welcome to check it out and see if this pattern fits your needs.