🎉 Black Friday Sale! Save 30% when you subscribe today.

Observation in Practice

Episode #256 • Nov 6, 2023 • Subscriber-Only

We take all we’ve learned about the Observation framework and apply it to a larger, more real world application: our rewrite of Apple’s Scrumdinger demo. We’ll see what changes are easy to make, what changes are a bit trickier, and encounter a bug that you’ll want to know about.

Previous episode
Observation in Practice
Next episode
Locked

Unlock This Episode

Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.

Sign in with GitHub

Introduction

Brandon

For the last four weeks we have gone deep into the new Observation framework in Swift 5.9. We’ve seen what it takes to use the tools, we’ve looked at the actual source code of the tools to roughly understand how they work, and we’ve even discussed a variety of gotchas and things to be aware of when using the tools.

But in those episodes we didn’t really build anything real world with the new tools. The little demo app we created served as a nice testbed for understanding observability, but in the real world we come across much different problems.

Stephen

So, it would be nice if we could see what it looks like to use these tools in a moderately complex, real world application. And luckily for us we actually built such an application over the course of 7 episodes where we discussed modern SwiftUI concepts. This included things like navigation, side effects, domain modeling, controlling dependencies and testing.

And to show off these techniques we re-built a fun application that Apple released as demo code a few years back called Scrumdinger. And after that series finished we even open sourced our version of the Scrumdinger so that we could show what we think goes into making a modern SwiftUI application.

Brandon

However, that series was done before we had these new observation tools, so perhaps we can take that code base and update it to use observability.

Let’s take a look.

SyncUps tour


References

  • Collection: Modern SwiftUI
    Brandon Williams & Stephen Celis • Nov 28, 2022

    The original series in which we build the application refactored in this episode.

    Note

    What does it take to build a vanilla SwiftUI application with best, modern practices? We rebuild Apple’s Scrumdinger code sample, a decently complex application that tackles real world problems, in a way that can be tested, modularized, and uses all of Swift’s powerful domain modeling tools.

Downloads

Get started with our free plan

Our free plan includes 1 subscriber-only episode of your choice, access to 64 free episodes with transcripts and code samples, and weekly updates from our newsletter.

View plans and pricing