SwiftUI: A Web Developer’s Perspective

Lately, I have been spending some of my time learning native iOS development. Generally, I focus on full-stack web development, but have always wanted to dive deeper into mobile applications. A startup idea formed, and it has given me a great excuse to jump right into the deep end. Here are some of my thoughts.

iOS Development is Great

Right off the bat, I have been enjoying iOS development a lot more than I thought I would. Many elements of native development are exceptional. The closed, opinionated system means that you don’t have to think about which package to system to use.

For example, when it comes to animation, SwiftUI makes it straightforward to get going. In “JavaScript Land”, there are many libraries that you can decide to use (Framer Motion is excellent), but the abundance of choices sometimes can be daunting. Having one proven and optimized solution makes it easier to learn a tool that will be around for the course of the platform you are developing on.

The title of the article is about SwiftUI, so I should talk about that specifically a bit. I tried to do more mobile app development in the past, but Objective-C and UIKit was a beast. Honestly, it still is, as I look at my learning path and know that it will go back through there eventually. SwiftUI is familiar enough to modern JavaScript libraries such as React that it was easy to grasp the declarative UI elements.

iOS Development is Different

Within iOS development, differences arise when compared to web development. The declarative syntax in SwiftUI is great, but there are times I miss the layout engines of CSS (mainly flex and grid). The application of styles to individual elements makes it easier to track down where visual changes are coming from, but making those reusable takes more boilerplate than using CSS classes.

Additionally, it takes more time to get to the point where you feel competent. There is a steep learning curve in iOS development (and mobile development as a whole) that is not as prominent on the web platform. Beginning learners could find it frustrating that they cannot achieve what they want as quickly. SwiftUI does help with the feedback process as you have playgrounds and previews, but sometimes even getting that setup can be a pain.

The final difference is one that can be seen as good and bad. The closed ecosystem of native mobile platforms allow for opinionated, optimized solutions, but also means that you are relying on the first party company to provide those services to you. The web platform, messy as it is sometimes, is incredible in the way that it is open to build literally anything on top of it.

Moving Forward

Overall, my experience with iOS development has been positive. There are more details, such as learning object-oriented programming in greater depth, that I could go into (and will), but these are some of the initial reactions I have when working on two very different systems. It makes me excited as the progress in each continues to blaze forward, and I can’t wait to see not only where the platforms go, but the potential applications that will be built because of them.