Category Archives: OOP

Garbage-collected Objective-C

When was a garbage collector added to Objective-C? If you follow Apple’s work with the language, you might be inclined to believe that it was in 2008 when AutoZone was added as part of Objective-C 2.0 (the AutoZone collector has … Continue reading

Posted in academia, architecture of sorts, gnustep, iPad, iPhone, Mac, OOP | Leave a comment

Separating user interface from work

Here’s a design I’ve had knocking around my head for a while, and between a discussion we had a few weeks ago at work and Saul Mora’s excellent design patterns talk at QCon I’ve built it. A quick heads-up: currently … Continue reading

Posted in code-level, OOP, performance, Talk | Comments Off on Separating user interface from work

Lighter UIViewControllers

The first issue of Objective-C periodical objc.io has just been announced: Issue #1 is about lighter view controllers. The introduction tells you a bit more about this issue and us. First, Chris writes about lighter view controllers. Florian expands on … Continue reading

Posted in iPad, iPhone, learning, OOP, software-engineering, TDD | Comments Off on Lighter UIViewControllers

enum class in C++11

I’ve opened the new edition of Cuboid Stroustrup exactly once, and I’ve already learned exactly one useful thing. Before going into what that thing was, a comment on the book: The C++ Programming Language is, along with Object-Oriented Software Construction … Continue reading

Posted in C++, OOP | Comments Off on enum class in C++11

On protocols that aren’t

There’s a common assumption when dealing with Objective-C protocols or Java interfaces (or abstract classes, I suppose): that you’re abstracting away the implementation of an object leaving just its interface. “Oh, don’t mind how I quack, all you need to … Continue reading

Posted in code-level, OOP | Leave a comment

Specifications for interchanging objects

One of the interesting aspects of Smalltalk and similar languages including Objective-C and Ruby is that while the object model exposes a hierarchy of classes, consumers of objects in these environments are free to ignore the position of the object … Continue reading

Posted in documentation, OOP, software-engineering, TDD, tool-support | 1 Comment

Can Objective-C be given safe categories?

That was the subject of this lunchtime’s vague thinking out loud. The problems with categories are well-known: you can override the methods already declared on a class, or the methods provided in another category (and therefore another category can replace … Continue reading

Posted in code-level, OOP | Comments Off on Can Objective-C be given safe categories?

As the Kaiser Chiefs might say: Ruby ruby ruby n00bie

Imagine someone took the training wheels off of Objective-C. That’s how I currently feel. I’ve actually had a long—erm, not quite “love-hate”, more “‘sup?-meh”—relationship with Ruby. I’ve long wanted to tinker but never really had a project where I could … Continue reading

Posted in OOP, ruby | Comments Off on As the Kaiser Chiefs might say: Ruby ruby ruby n00bie

On designing collections

Introduction This post explores the pros and the cons of following the design rule “Objects responsible for collections of other objects should expose an interface to the collection, not the collection itself”. Examples and other technical discussion is in Objective-C, … Continue reading

Posted in Foundation, OOP, software-engineering | Comments Off on On designing collections

Coupling in a Cocoa[ Touch] App

This is one of my occasional “problem looking for a solution” posts. It’d be great to discuss this over on App.net or G+ or somewhere. I don’t think, at the outset of writing this post, that the last sentence is … Continue reading

Posted in AAPL, code-level, OOP | Comments Off on Coupling in a Cocoa[ Touch] App