Swift
All about Concurrency in Swift
Let's start off with the best article I've read about concurrency on any Apple platform or language in a long, long time! Umberto Raimondi explains in depth what are the means through Swift, or better, Foundation and Grand Central Dispatch, offer us to write concurrent operations. I just wish he also mentioned some third-party solutions or what other languages offer in comparison, but we'll remedy that!
What in the World is an “Escaping Closure” in Swift?
Talking about concurrency, you may have noticed the Swift keyword @escaping
already. Andrew Bancroft explains all you need to know about it. It's funny how Swift 3 changed the behavior of closures passed as a parameter from 'escaping' by default to 'non-escaping.' Do you think that was the right move? I do!
Tools
PromiseKit
The only thing I felt missing from the fantastic article Umberto Raimondi put together (see above) are promises and futures. PromiseKit
provides a clean implementation of these concepts for a better asynchronous programming experience.
Hydra
We are web developers, aren't we? So let's talk about async
and await
, two keywords that some of you may know about from the most recent versions of JavaScript. This library, while offering an implementation of promises and futures similar to PromiseKit
, also implements functions to mimic the two keywords above so that you can write asynchronous operations without any callback nesting!
Code
Picking the right way of failing in Swift
So many ways to handle failures and so little time! How do we choose what's best for us? John Sundell examines all available options and their best usage.
Building a command line tool using the Swift Package Manager
John Sundell, again, on how to build command line tools with Swift. A few issues back we saw some excellent libraries making this task easy for us, but what does it take to create a command line program from scratch?
Developing and Testing Microservices With Docker
The best way to introduce Swift as a server language in your organization is probably to start by implementing a microservice. By how do you test and deploy that? And how do you make sure it's resilient to the environment the rest of your backend is on? You use Docker, of course! Michael Herman explains how to test your microservice. The example uses NodeJS, I'm afraid, but it doesn't really matter for what he talks about.
Five things we’ve learned about monitoring containers and their orchestrators
If you're using Docker, you might want to check this out. As you scale your app, you'll want to pay more attention to your infrastructure as well.
Video / Podcasts / Books
Building a Swift Web API
Kyle Fuller shares his experience building a simple backend of his iOS app.
This week let's enjoy some great articles and about writing concurrent applications in Swift. This issue comes in a bit later than usual, however, have a wonderful rest of the week! 😊
Gianluca Tranchedone