SwiftUI Craftsmanship: Series Announcement
Introducing a new series that will take us on a voyage into the very depths of SwiftUI
Smooth. Elegant. Gorgeous. Attractive.
These are all ways to describe Captain SwiftUI.
They are also the ways we hope users describe our app’s user experience. SwiftUI provides many tools and components that can get us there. Knowing what those tools are and how best to use them is the key to taking things to the next level.
Wood You Consider This…
Consider carpentry. There are a million different ways to shape and mold a piece of wood. But there’s a difference between that solid piece of furniture that’s been passed down from generation to generation and the piece you got for cheap from some box store (the one that hits the curb on garbage day just a few months later because you bumped into it the wrong way).
One was most likely well thought out, had carefully selected materials, used more than a saw and drill, and took skilled hands to put it altogether. The other was a rushed design and manufactured cheaply just to get the job done and be marketable, at least on the surface and for a time.
Crafting great app experiences requires many of the same core principles that great carpentry requires: it takes time, practice, skill, discipline, and know-how in a variety of topics.
A New Series
To explore these principles in the world of SwiftUI, I’m kicking off a new series of posts entitled “SwiftUI Craftsmanship”. This ongoing series will group together posts that focus on SwiftUI as a (you guessed it) craft.
Some of my other posts have/will focus on a specific component/feature/concept. Craftsmanship posts will dig into the various approaches to composing experiences and (hopefully) develop skills that will help you discern the best ones to take for your specific use cases. There’s no real cadence for the series, but when a write a piece that falls under that category, I’ll be sure to mark it as such.
Sneak Peak
To kick things off, here are the first couple of topics we’ll be focusing on:
View Contracts: It’s where it all begins for a View, so why not begin our series here? It’s the area of SwiftUI code I’ve watched devs return to time and time again throughout development. We’ll explore the various ways to define a View’s interfaces, the benefits and detriments they bring to the table, and ultimately debate a code concept: flexibility.
ViewModifiers: Modifiers are the catalyst for making great SwiftUI experiences. Without it Text is just text, a margin impossible, and interactivity reduced to just a Button. We love to use them and, occasionally, make our own. But… do we do so effectively? First, a review of how modifiers work. Then, we’ll learn how to avoid making over-engineered modifiers that complicate things rather than simplify. Towards the end, we’ll get funky with modifiers to maximize their potential (one example is calling a modifier… from our modifier).
See You On Deck
Please join us as we embark on this new voyage through the depths of SwiftUI! As always, the Captain is here to guide you through.
I’ll see you on deck…