Paulo Andrade

Keeper of Secrets.

twitter github stackoverflow linkedin email
Thoughts on WWDC 19
Jun 7, 2019
4 minutes read

I’ve always enjoyed the days after a WWDC Keynote. It’s a mix of excitement and anxiety over the new refinements/features/frameworks and all the learning and work those entail. This year is no different… except those feelings are amped up to 11!

This year's "blow minds" artwork really seems on point

This year's "blow minds" artwork really seems on point

The keynote was pretty good over all with solid incremental updates on all platforms. Standalone watch apps, Dark Mode and the new Photos.app on iOS, “windows” and USB drive support on what’s now called iPadOS, sidecar and iTunes dismantling on macOS, etc.

And, of course, there’s the new Mac Pro. Everything about the Mac Pro sounds ridiculous… from the specs to the price. I’ve never owned a Mac Pro and never felt like I needed to. And although that certainly hasn’t changed, I view this announcement as Apple course-correcting on who the target audience of the Mac Pro really is – multi-media professionals and research. And I’m sure there are many developers out there wishing for a user upgradable/expandable machine… I’m just not one of them.

But enough about that. I want to talk about the star of the show: SwiftUI.

Going into this WWDC I was most eager to learn about Marzipan Project Catalyst and whether it would ever unify the UI frameworks on macOS and iOS. But after learning about SwiftUI… I couldn’t care less.

Surprisingly the SwiftUI announcement only took 10 minutes on a 2.25 hour keynote. To me, this should have been this year’s “one more thing”.

Throughout my career as a developer on Apple platforms there have been many important milestones that really changed how I did my job. I’m thinking about blocks, ARC, Auto Layout, Swift… and now SwiftUI.

SwiftUI

So what’s the big deal with SwiftUI? Well here’s why I think it’s great.

  1. One UI framework for all platforms

    It has always baffled me why Apple never made UIKit work on the Mac. If it worked for iOS and tvOS it could certainly also work on the Mac (which it does now thanks to Project Catalyst). For me this means having double the work on many parts of the UI on Secrets for Mac and iOS.

    Now and then, you would see rumours that would give you hope. “Maybe next year” you’d think… but the years passed and nothing. Looking back, I can’t help but wonder if this was Apple’s plan all along. SwiftUI is certainly a multi-year effort. The underpinnings of the combine framework are at least 5 years old:

    And although I haven’t played much with it yet certainly there’ll be lot of bugs/shortcomings to iron out for next few years.

  2. Declarative

    To put it succinctly, this means that instead of telling the framework what to do you tell it what you want. The framework then figures out how to achieve. And you’ve seen this style of coding already with Auto Layout. It offloads much of the complexity to the framework.

    By introducing this abstraction and letting the framework do the job of composing the UI for you we get:

    • Automatic support for many of the system features: dynamic type, accessibility, dark mode, etc;
    • Adaptive layouts on different platforms (a switch on the iPhone becomes a checkbox on the Mac);
    • Freedom from having to adapt our UI whenever Apple needs to evolve it (what SwiftUI uses to satisfy a Text element may change on the next release).

    I had a professor that used to say:

    All problems in CS can be solved with one more level of indirection.

    It still holds.

  3. Reactive

    I’ve never invested much time with any of the reactive frameworks out there. I definitely appreciated the principles behind them but I’ve always been very critical of frameworks1 or technologies2 that are too invasive.

    With what I’ve already seen on the sessions and demos, I’m just about ready to forgive Apple for abandoning development of the controversial Cocoa Bindings3.

    We write so much glue code that I’ve got no problems accepting the learning curve of all the new stuff that is driving this both in the Swift language and the new Combine framework.

I’m cautiously excited about SwiftUI and sincerely hope it will live up to expectations.


  1. Remember Three20? ↩︎

  2. I’ve also never used CocoaPods because of this. ↩︎

  3. Yes I think Cocoa Bindings are useful even with all the shortcomings. ↩︎



Back to posts