In this short article, I’ve listed five things I believe will help you become a better developer in 2022. Or rather, the first half of 2022. I fully expect Apple to announce some cool new interesting stuff at this year’s WWDC worthy of your attention in the second half of the year.
That said, if you focus on the five things listed in this post, I’m sure you’ll be a stronger developer by the end of the year.
Note that this list should not be considered the “ultimate” guide to becoming a good developer in 2022. Nor is it on the list of the most important topics for every iOS developer.
This is a list of topics that I think are important and that will take up a lot of my time this year. If you disagree with this list, that’s absolutely fine; your priorities don’t have to align with mine.
By the way, let’s get to the first topic on my list.
1. SwiftUI works with UIKit (and vice versa)
Perhaps one of the most polarizing questions I’ll see in 2021 is whether SwiftUI is “production ready.” In my opinion, the question is too vague because the answer depends on what the individual’s definition of production ready is in their context. What’s more important, in my opinion, is that SwiftUI works well for your application. Whether you want to go all-in or not, it’s your choice. Even in some cases, going all-in on SwiftUI is unlikely for a variety of reasons.
The vast majority of apps I’ve seen and developed over the past year can go a long way with simple SwiftUI, but there’s almost always some edge that needs to be downgraded to UIKit. Alternatively, I’ve seen existing production apps want to start integrating SwiftUI without having to rewrite everything at once, which is perfectly reasonable.
Fortunately, we can use both SwiftUI and UIKit in our projects, and I strongly encourage people to do so. Make sure you dive in and understand how to mix SwiftUI into UIKit apps, or how you can fall back to UIKit in your SwiftUI apps if you find that pure SwiftUI runs into limitations.
Knowing how to do this will enable you to adopt SwiftUI features where possible and speed up your software development company process because writing UIs with SwiftUI is much faster than UIKit (when it suits your needs). On top of that, it takes a while for companies to get all of their apps written entirely in SwiftUI, so knowing how to gradually introduce it is an asset as employees are even looking for their next (or their first job).
2. Application Architecture
No, I don’t mean “learn VIPER” or “learn all architectures”. In fact, I’m not saying that you should learn any application architecture in particular.
In my opinion, it’s more valuable to understand the principles upon which almost all architectures are built; separation of concerns. When you want to write code that is easy to reason about, easy to refactor, and easy to test, it’s important to know how and when to split your application’s functionality into different components and to understand how those components are structured.
Try and learn about topics like the Single Responsibility Principle, Dependency Injection, Abstraction, Protocols, Generics, and more. Once you understand these topics, you will find that many architectural patterns are just different applications of the same principles. In other words, many architectures provide you and your team with a framework to reason about different layers in your codebase, rather than a completely unique way of working.
A less obvious reason to learn more about app architecture is that it will help you write code that works in both the SwiftUI world and the UIKit world, which is very useful given what I explained in the first point of this list . The ability to build codebases for both SwiftUI and UIKit is very useful and will definitely help you enjoy more of your hybrid UI framework experience.
3. Asynchronous wait
If there’s one topic I can’t remove from this list, it’s async-await. Or rather, Swift’s new concurrency model. With the introduction of async-await, Apple not only introduced some syntactic sugar (like async-await is essentially sugar for promises in JavaScript). Apple has introduced a new modern concurrency system that we can leverage in our applications.
It was useful to learn topics like structured concurrency, actors, task groups, etc. this year. Especially since Apple managed to backport Swift Concurrency all the way to iOS 13. If you want to use Swift Concurrency in your app targeting iOS 13.0 and higher, make sure you’re using Xcode 13.2 or higher and you should be good to go.
If you want to learn more about Swift Concurrency, there are already several blog posts on my blog. Click here to go to the Swift Concurrency category.
4. Core Data
Yes. It’s a fairly old framework, and its Objective-C roots aren’t well hidden. Regardless, Apple is clearly still interested in getting people to use and adopt Core Data, as they’ve added new features to Core Data + SwiftUI in iOS 15, and previous iOS developer versions received various Core Data updates as well.
Will Apple replace Core Data with a more Swift-friendly alternative anytime soon? Honestly I don’t know. I don’t think Apple will make a full replacement anytime soon. It seems more likely that Apple will keep the core bits of Core Data and give us a more Swift-friendly API on top of that.
This allows for a gradual transition from the current API to the updated API, and our applications won’t have to go through some major migrations if we want to take advantage of the latest and greatest APIs. Very similar to how Apple introduced SwiftUI.
Is Core Data the absolute best way to save data in all situations? maybe not. Is it extremely difficult and burdensome to implement for most applications? not at all. Core Data is really not that scary and it integrates really well with SwiftUI. For example, check out my video of using Core Data in a SwiftUI app.
If you want to learn more about Core Data this year, I highly recommend picking up my Practical Core Data book. It teaches you everything you need to do to effectively use Core Data in SwiftUI and UIKit applications.
5. Accessibility
Last but not least there are topics that I should know more about myself. Accessibility is often considered optional, “feature” or the last thing you do during development. Or let’s be honest, it’s not uncommon for accessibility not to be considered on the roadmap at all.
When you think about accessibility like this, there’s a good chance your app won’t be accessible at all because you never did the job. I’m not entirely sure where I first heard about this, but if you’re not sure your app is accessible, it’s not.
Accessibility is something we should actively focus on to ensure that our apps are available to everyone. Apple’s tools for implementing and testing accessibility are so good, I have to admit I know very little about them. So for 2022, accessibility is definitely on my list of things to focus on.
Author Bio
Santhosh is a Digital Marketing Executive. He designs marketing strategies with the intention of using high-quality content to educate and engage audiences. His specialties include social media marketing specialist, SEO, and he works closely with B2B and B2C businesses, providing digital marketing strategies that gain social media attention and increases your search engine visibility