Software Dev

We All Hate Error Handling. Here Are Some Tips.

Error handling makes everything more complicated. Ugh! What do you do if a network call times out (pretty common)? Or you’re trying to save an image and there is no disk space (less common but can happen)? Or that thing that’s never supposed to happen happens (occasionally happens)?

I mean, you have to do something, right? Ugh. πŸ€¦πŸ»β€β™‚οΈ

Here are some tips. Thanks to Swift By Sundell for giving this topic some attention.

πŸ‘‰ Propagating user-facing errors in Swift

Via iOS Dev Weekly.

Software Dev

Point-Free Composable Architecture

A new software architecture! Hurray! πŸ™ŒπŸ€·πŸ»β€β™‚οΈ

I’m filing this away as an idea to try on my next app because all other architectures are still just annoying in some way, and this one has a good name. πŸ˜†

This architecture is designed to work with SwiftUI and UIKit on any Apple platform (iOS, macOS, tvOS, and watchOS).

πŸ‘‰Composable Architecture, the library

Via iOS Dev Weekly.

Software Dev

The Big Facebook Crash and Third-Party SDK Vulnerabilities

App users may not be aware — and app developers often forget — that favorite app of yours might be running native code from a third party such as Facebook. Besides making your app potentially way bigger to download, it can also cause instability. When Facebook screws up, suddenly you can’t run TikTok, Spotify, and countless others apps.

This actually happened recently. πŸ’₯

πŸ‘‰ The big Facebook crash of 2020 and the problem of third-party SDK creep

It was as if Facebook had an β€œapp kill switch” that they activated, and it brought down many of people’s favorite iOS apps.

For this and other reasons such as added integration complexity, when I’m making my next app, I am going to try to minimize third-party libraries.

It seems like software architecture often focuses on theoretical concepts and cool ideas, but we should look at things like this that can impact millions of real users. IMHO we developers need to consider third-party libraries as a liability to be weighed against the vulnerabilities they open up. πŸ’₯

Via iOS Dev Weekly.

Also, a shout out to the “App-ocalypse” video from this article. πŸ˜†

Software Dev

App Rewrite: Faster, Smaller, and Simpler

I’m a bit of a Facebook skeptic, but it’s really amazing that they had the guts to actually completely rewrite their Messenger app for iOS. That is such a gigantic effort that it basically doesn’t ever happen with popular apps at big companies. So kudos to Facebook for actually making that happen. πŸ‘‰ Yay, Facebook! πŸ€·πŸ»β€β™‚οΈ

πŸ‘‰ Project LightSpeed: Rewriting the Messenger codebase for a faster, smaller, and simpler messaging app

This post explains some of the design and architecture decisions they made. It’s interesting that Facebook, the company that invented the cross-platform React Native framework, went full native when rewriting their own app. In fact, one of their key principals in the rewrite was “Use the OS”.

While UI frameworks can be powerful and increase developer productivity, they require constant upkeep and maintenance to keep up with the ever-changing mobile OS landscape. Rather than reinventing the wheel, we used the UI framework available on the device’s native OS to support a wider variety of application feature needs.

They also use SQLite to create a sort of table-driven local business logic layer a custom platform “to orchestrate all access to the database, including queued changes, deferred or retriable tasks, and for data sync support.”

This is an example that all of us mobile engineers can take to our managers and demand a rewrite now! (Kidding / not kidding πŸ€“)

Via iOS Dev Weekly.