Masterclass of Decoupling: Diablo II Resurrected

Decoupling is hard work, especially when taken to extremes – as the team of Diablo II did when they decoupled the whole rendering stack of the original game from the rest of the engine to reuse both independently. Today I learned that Diablo II Resurrected is a true remaster: new 3D graphics, but the engine hasn’t changed. In an interview with Eurogamer, Rob Gallerani pointed out that

Continue reading …

Lock App Features Behind a Paywall and Enforce the Lock in Code

Teaser image

I stumbled upon an interesting coding problem in a recent macOS project related to in-app purchases. IAP can be represented by a feature option set in code. How do you secure UserDefaults access in such a way that accessing values can be locked via the IAP available feature options? (This also applies to tiered licenses, like a “Basic” and a “Pro” feature set.)

Continue reading …

FourLayerArchitecture Is Still Under-Appreciated

I was recently following a link to The Wiki, the original c2.com wiki by Cunningham & Cunningham, Inc. It was a link to the FourLayerArchitecture page. At the very bottom, it currently says “Last edit August 25, 2006”. In the early 2000s, the wiki had to be closed for editing by the general public because of abuse, and this page seemingly lays dormant ever since.

Continue reading …

How I Avoided Over-Architecting a Simple Event Handler with ReSwift, Cheating with Existing Reactive Code

I am using ReSwift in my app. I like ReSwift because I can create a representation of my app in a “State” Swift module without any UIKit/AppKit dependency. There, I put all the data that the app is supposed to represent at any given moment in time. To get a feeling for this, have a look at two apps of mine:

Continue reading …

How to Refactor Messy Apps for a New Architecture?

When facing a legacy code base, changing the mess to an orderly architecture can cause confusion: where to start? What to do? An exemplary question: How do I refactor a Big Ball of Mud into layered architecture? Refactoring the existing code base seems like a logical step; after all, refactorings are designed to improve existing code, and improvement is what you’re up to.

Continue reading …

MVVM's Place in Your App

Picking up on my post “MVVM Is Quite Okay at What It Is Supposed to Do”, here’s a few images which illustrate the problem of mistaking MVVM for a solution to a structural problem. It’s the whole post in 2 images. Model–View–View-Model helps with the view layer. It can be a tool to break up a view controller into smaller things. But it’s still only a refactoring of view components into more objects.

Continue reading …