Software Dev

The Elm Architecture

I’ve been trying to understand the Elm Architecture for a new iOS project. I kept reading over this article and thinking, “Wait a minute…. What’s the catch here? This seems too simple.” ๐Ÿง

๐Ÿ‘‰ The Elm Architecture: Simple, yet powerful โ€“ An overview by example

I like that this architecture can be explained in a very short post with examples.

The beauty of The Elm Architecture lies in its simplicity.

That article is simple but assumes a web UI and explicit mentions HTML ๐Ÿ™„. Here is a funnier and more useful article about Elm for iOS. ๐Ÿ˜‚

๐Ÿ‘‰ Elm architecture in iOS: Why you donโ€™t need shit like RxSwift or MVVM

Elm architecture can be described as follows

msg -> Model -> View -> msg

I even made my own diagram just to make sure I “got” it. The devil is in the details, but I think this is right. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ It definitely seems simpler than VIPER.

Software Dev

What Adding Dependencies Will Do To Your App in 2020

I like the title of this article because it recognizes that pulling third-party dependencies into your app has a cost.

๐Ÿ‘‰ What Adding Dependencies Will Do To Your App in 2020

And yet we all do it because it also has its benefits. ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ๐Ÿ˜‚

That article is a realistic and practical look how the dependencies affect your app in terms of app launch times, app size, and build times. It compares Swift Package Manager ๐Ÿค“, Carthage ๐Ÿคท๐Ÿปโ€โ™‚๏ธ, CocoaPods ๐Ÿ˜ฌ, manual dependency management ๐Ÿฅบ, and Git Submodules ๐Ÿคฎ.

I still have a dream of zero dependencies ๐Ÿคฉ, but I know it’s not realistic in a complex app. ๐Ÿ˜‘

Via iOS Dev Weekly.

Software Dev

Reducing Your Appโ€™s Memory Footprint

Retain cycles, timers, big images, caching. These are a few reasons why your app might be using more memory than it should.

It might be a good time to audit your app and see how much memory it’s really using.

Lazy loading, implementing memory warning methods, using NSCache, autorelease pools. These are a few ways to deal with it.

Also, let’s say, just make a clean, focused software design. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

๐Ÿ‘‰ How To Reduce Your Appโ€™s Memory Footprint

Software Dev

iOS Development Class at Stanford ๐ŸŽ“

It’s looking easier than ever to learn from Stanford University. The Computer Science department has posted their latest class on Developing Apps for iOS online. ๐Ÿคฏ.

It’s free. It has lecture videos, handouts, and assignments. As far as I can tell, you get everything but grades and a diploma. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ. But feel free to make an app!

๐Ÿ‘‰ CS193p – Developing Apps for iOS at Stanford

It currently covers SwiftUI, MVVM and the Swift Type System, Reactive UI Protocols Layout, and Grid enum Optionals.

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. ๐Ÿ˜†