About Search Archive
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 1 2 3 4 5 6 7 8 9 Older →
  • Looking at Model-View-Controller in Cocoa

    Feb 28, 2017

    In this article, I’ll look at a little theory and history behind the primary application design pattern used in Cocoa. I’ll discuss the key shortcoming of Cocoa’s Model-View-Controller approach, Apple’s aborted efforts to address this shortcoming and wonder from where the next major improvements will come.
    Read more...
  • The weirdest subclass I've ever written

    Feb 26, 2017

    There's an industry-wide push for protocol-oriented programming where shared interfaces, behaviors and substitutability are provided through protocols rather than subclasses. In this article though, I'll look at a case where I chose to use a subclass, instead of a protocol, to take advantage of some specific differences between classes and protocols.
    Read more...
  • Using 'swift package fetch' in an Xcode project

    Jan 30, 2017

    I look at what's required to use the Swift Package Manager to transparently fetch dependencies during an Xcode build phase.
    Read more...
  • Compiling a Mac OS 8 application on macOS Sierra

    Jan 12, 2017

    A light hearted look back at my time programming in the 1990s as I try to get an old Minesweeper implementation of mine from 1999, written in C++ using PowerPlant for Mac OS 8, compiling in Xcode 8 and running on macOS Sierra.
    Read more...
  • A key-value observing wrapper

    Dec 31, 2016

    Just a little helper class that I use to round off the rough edges when dealing with Cocoa's key-value observing.
    Read more...
  • Reference counted releases in Swift

    Dec 27, 2016

    A discussion about reference counted lifetimes in Swift; how the lifetime of scope variables differs from C++ and Objective-C, how releases are reordered by the Swift compiler and the conventional use of withExtendedLifetime versus my unconventional usage.
    Read more...
  • What is reactive programming and why should I use it?

    Nov 28, 2016

    I'll explain why I consider reactive programming to be one of the most important design patterns for application programming by looking at three scenarios that are common in application development, yet are a drain on development time, lead to frequent bugs and make design and refactoring hard. I'll show how reactive programming addresses the verbosity, eliminates the unsafety and restructures the code to aid maintainability.
    Read more...
  • CwlSignal, a library for reactive programming

    Nov 28, 2016

    In this article, I'm presenting CwlSignal. It is the latest Swift iteration of a library that I've been using for reactive programming for the last few years. CwlSignal is simple, fast, threadsafe and full-featured while offering a number of unique abilities.
    Read more...
  • Testing actions over time

    Oct 25, 2016

    Testing that actions are scheduled correctly over time is a pain. I'll show a way to test events scheduled over time, threads and other execution contexts with a "Debug Context Coordinator" that functions as a basic task scheduler but operates over a simulated version of time so that testing of invocation times and task interaction can be precise and free from changes due to host activity.
    Read more...
  • Specifying function execution contexts

    Oct 14, 2016

    I take a look at what's involved in specifying the 'execution context' in which a function should be invoked. It's a complicated task due to how broad the term 'execution context' can be, as well as the fact that both function caller and function callee may have conflicting desires for how a function should be invoked.
    Read more...
← Newer 1 2 3 4 5 6 7 8 9 Older →
  • Subscribe: RSS or JSON
  • Mastodon: @cocoawithlove
  • Bluesky: @cocoawithlove
  • Github: mattgallagher

© 2008-2024 Matt Gallagher. All rights reserved.
Code may be used in accordance with license on About page.
If you need to contact me: