UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Is MVVM still a good fit for SwiftUI? What is the general consensus?

Forums > SwiftUI

Now that everyone has had some experience working with SwiftUI, what is the general consensus in regards to whether or not MVVM is a good fit for SwiftUI? Are people in general content with this pattern? Just curious.

Thanks

Samuel

1      

Is it still good? Yes

Is it always the best? No

Depends on your use case and app. If it's an app with only two views and/or not very complicated business logic, perhaps you don't need it.

1      

I've seen a lot of post on the web lately stating it isn't. I use it in the app I am working on and I honestly don't see how to do without it if indeed you have quite a lot of business logic. Simple views can do without, sure, but complex views benefit by it. I use Paul's approach from the Ultimate Portfolio App and it has helped me a great deal!

1      

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.