Point-Free is a video series exploring advanced topics in the Swift programming language, hosted by industry experts, Brandon and Stephen.
How does our SQL-based solution for persistence compare with modern SwiftData? We put things to the test by rebuilding our complex @FetchAll
query using @Model
and the @Query
macro!
We finish a sneak peek of our upcoming Structured Queries library by showing how queries built with the library can be reused and composed together, and how we can replace all of the raw queries in our application with simpler, safer query builders.
Last week we released SharingGRDB, an alternative to SwiftData powered by SQLite, but there are a few improvements we could make. Let’s take a look at some problems with the current tools before giving a sneak peek at the solution: a powerful new query building library that leverages many advanced Swift features that we will soon build from scratch.
How does our SQL-based solution for persistence compare with modern SwiftData? We put things to the test by rebuilding our complex @FetchAll
query using @Model
and the @Query
macro!
We begin building the “reminders” part of Apple’s Reminders app, including listing, creating, updating, and deleting them. We will also add persistent filters and sorts, per list, all powered by a complex, dynamic query.
We flesh out the reminders lists feature using advanced queries that aggregate reminders counts and bundle results up into a custom type via the @Selection
macro. And we show how “drafts”—a unique feature of StructuredQueries—allow us to create and update values using the same view, all without sacrificing the preciseness of our domain model.
We dissect some of the most important and interesting topics in Swift programming frequently, and deliver them straight to your inbox.
We cover both abstract ideas and practical concepts you can start using in your code base immediately.
Download a fully-functioning Swift playground from the episode so you can experiment with the concepts discussed.
We transcribe each video by hand so you can search and reference easily. Click on a timestamp to jump directly to that point in the video.
Swift 5.9 brings a powerful new feature to the language: macros. They allow you to implement new functionality into the language as if it was built directly in the language itself. However, they can be tricky to get right, and as such one needs to write an extensive test suite to make sure you have covered all of the subtle and nuanced edge cases that are possible.
SwiftUI is Apple’s declarative successor to UIKit and AppKit, and provides a wonderful set of tools for building applications quickly and effectively. It also provides a wonderful opportunity to explore problems around architecture and composition.
SQLite is one of the most well-crafted, battle-tested, widely-deployed pieces of software in history, and it’s a great fit for apps with more complex persistence needs than user defaults or a JSON file. This collection serves as an introduction to the basics of SQLite, as well as an exploration into more advanced topics and techniques for integrating SQLite into your applications.
If you have ever created a binding using the get:set:
initializer, you may want to reconsider. Doing so can hurt SwiftUI’s ability to animate your view. Luckily there is a better way. You can leverage @dynamicMemberLookup
and subscripts to derive new bindings in a way that allows SwiftUI to propertly track where the binding came from.
SwiftData is not capable of filtering and sorting by raw representable enum properties in models. Predicates and sort descriptors will compile just fine when referencing enum properties, but it will crash at runtime.
SwiftData is not capable of sorting by boolean properties in models. And if you try to trick SwiftData to allow it, you will encounter runtime crashes.
So many concepts presented at #WWDC19 reminded me of @pointfreeco video series. 👏👏 So happy I watched it before coming to San Jose.
Just finished the mini-series on enum properties by @pointfreeco! They pointed out what’s missing from enums in Swift and used SwiftSyntax to generate code to add the missing parts. Thanks for your work @stephencelis and @mbrandonw! #pointfree
I listened to the first two episodes of @pointfreeco this weekend and it was the best presentation of FP fundamentals I've seen. Very thoughtful layout and progression of the material and motivations behind each introduced concept. Looking forward to watching the rest!
Three recent @pointfreeco episodes were so interesting I stayed in the treadmill 3x as long as usual and watched them all in a row! Walking may be challenging later/tomorrow... 😮
I really love the dynamics of @pointfreeco. The dance of “this is super nice because…” “yes, BUT….”. they clearly show what’s good, what’s not so good and keep continuously improving.
Thanks @mbrandonw @stephencelis for the very pedagogical series with @pointfreeco Excited and looking forward to learn from the series
My new favourite morning routine is feeding 👶🏻 while watching @pointfreeco
Honestly, I'm an Android developer, I write applications in Kotlin. My colleague iOS developer told me about your course. And I liked it so I decided to buy a subscription.
Just became a subscriber! I'm binge watching episodes now! Great content! I'm learning so much from you guys. The repo for the site is the best go-to reference for a well done project and swift-web is something I am definitely going to use in my projects. Thanks for everything!
Our free plan includes 1 subscriber-only episode of your choice, access to 72 free episodes with transcripts and code samples, and weekly updates from our newsletter.