@davemark I would start with UIKit (and Catalyst on macOS).
SwiftUI is great, but I think knowing what itās (mainly) built in top of will make understanding easier in the future.
@davemark if there's a ton of data to be displayed, then use UIKit Collection Views and Core Data Fetched Results Controllers. If there is NOT a ton of data, SwiftU (and Core Data @FetchedResults)I is the future. One day, SwiftUI will expose all the performance benefits of collection views, but lazy V isn't there yet. imho fwiw.
@davemark Ah, ok. I won't be any help then. I have heard people point out the argument that there's a bigger job potential with UIKit because of how many existing apps are out there. I never did any research into that so take it with a grain of salt. I focus on SwiftUI as a hobby.
@MuseumShuffle Iāll watch the video, Chris. Appreciate the share, valuable for me to hear a range of views, helps me stay current. Cheers!
@davemark no problem! If she does decide to go with SwiftUI, I would highly recommend the hundred days of SwiftUI by Paul Hudson. Itās completely free and you learn so much from it. I loved it.
@MuseumShuffle Funny. I was just thinking 100 days of Swift UIKit for her. Either way Paul is a great teacher. Good call.
@davemark good point! I forget about that one because I didnāt take it.
@thomashanning great read, Thomas. Thanks. Interesting to be in the crossing points like this.
@davemark @MuseumShuffle in the intro to that course, he links to this article, which I think would be helpful. He explains pretty clearly why he recommends starting with SwiftUI and then doing UIKit later. https://www.hackingwithswift.com/articles/230/how-to-become-an-ios-developer
Also, @twostraws is Paulās Mastodon account.
@jmuscara @MuseumShuffle @twostraws Followed him. Paul, been talking about whether a new dev should start with SwiftUI or UIKit. And singing the praises of 100 Days of Swift. Cheers!
@jmuscara @davemark @twostraws Thanks Joe! I took the course in 2020 so that didn't exist then. Interesting reading!
@davemark All my iOS code is in the context of hobby projects, so take with however much salt you deem appropriate.
There's a lot of UIKit code out there, so for a job, I assume there's a good legacy reason to learn it.
That said, there's also lots of Obj-C code out there and I'm not sure I'd recommend going down that path.
SwiftUI isn't a complete replacement for UIKit, but it's definitely where the puck is going.
I think starting with SwiftUI and back-filling where needed is the way to go.
@bennomatic Appreciate that take, will def pass it along. Cheers!
@f Thanks, Fahim. If you were going to build, say, a macOS Mastodon client from scratch, would you use AppKit? Or SwiftUI with some sync stuff for the URL session work in AppKit? Easy to mix the two?
@davemark I would recommend SwiftUI. In my company, all new projects have been SwiftUI for 2+ years, and all our clients are using more and more SwiftUI all the time. There are still times you need to embed UIKit views, but once you learn the pattern for doing so, itās straightforward. And Apple is providing built-in SwiftUI support for more and more ālegacyā UIKit views every year.
@davemark As you know, I spent over 25 years building apps primarily with AppKit and UIKit. IMHO the layer of abstraction that SwiftUI lays on top of those is simply a ābetterā abstraction, and is clearly improving every year. Personally, as much as I love and admire the work that has gone into the old frameworks, I hope to never go back to using them directly.
BTW, Appleās SwiftUI tutorials are a great starting point!
@davemark Is your friend building apps for personal satisfaction, hobby, indie dev? Or is your friend hoping to get a job at a company doing mobile development? For the former, SwiftUI in a heartbeat, but for the latter, I have to recommend UIKit, as most companies are still predominantly using it and/or have tons and tons of legacy code in it that needs to be maintained.
@davemark I think it depends on the end goal. Get a job building iOS apps? Indie dev?
For an experienced dev trying to work on iOS full time it still makes sense to start with UIKit. Itās not going anywhere and most jobs will value that experience even if they are primarily SwiftUI.
If itās for fun - Iād go SwiftUI. When you can make iOS 16 your target itās a pretty good time. Of course, if sheās got a preference for declarative or imperative programming that comes into play too.