Here’s a great article from Kodeco | High quality programming tutorials: iOS, Android, Swift, Kotlin, Unity, and more
<h2>Learn all about declarative asynchronous programming with Swift using the Combine framework!</h2>
<p>Writing asynchronous code can be challenging, with a variety of possible interfaces to represent, perform, and consume asynchronous work — delegates, notification center, KVO, closures, etc. Juggling all of these different mechanisms can be somewhat overwhelming. Does it really have to be this hard? Not anymore!</p>
<p>With Apple’s introduction of the Combine framework in WWDC 2019, declarative and reactive programming in Swift have become a meaningful aspect of the language and a game-changer in how developers perform and compose pieces of asynchronous work, making it a must-have tool at your disposal.</p>
<p>The introduction of Combine as a built-in framework in Apple’s ecosystem is promising news to developers who were interested in frameworks such as RxSwift or ReactiveSwift, but didn’t want the overhead of a third-party dependency. And while experience with either of the above is useful, it’s not a prerequisite for this book. You’ll learn everything from the ground up to become a true Combine master.</p>
<h2>What Is Combine?</h2>
<p>Combine is Apple’s framework to work with asynchronous events in a unified and reactive way that ensures your app is always up to date based on the latest state of its data.</p>
<p>What are these asynchronous events, you might ask? Anything that happens over time in your application can be represented by what is known as a Combine <em>Publisher</em> — network requests, user input, notifications, KVO, and much more. And since Combine unifies all of these different mechanisms under a single interface, this opens the door to interesting and powerful ways of composing logic and work in a declarative and universal way.</p>
Source link