This Code Is Untestable! (Part 2, for Developers)

In my last post, I argued that “untestable code” is code that cannot be efficiently unit tested. Today I’d like to walk through my top five anti-patterns that make writing unit tests painful. If you aren’t in the habit of writing unit tests, hopefully these tips will help you build more testable code and see […]

Generating Files with JavaScript and Ember.js

My colleague Jason Porrit recently wrote about loading and processing files with Ember.js. Today, I’ll cover two techniques for going in the opposite direction: generating files with JavaScript in the browser. I used these techniques while working with Jason on an Ember.js app, so my examples are geared toward Ember.js, but the techniques themselves can […]

The Guava EventBus on Guice

Guava’s EventBus provides a publish-subscribe event mechanism which allows objects to communicate with each other via the Observer Pattern. The EventBus shies away from the traditional “Event Listener” pattern seen in Java where an object implements a particular interface and then explicitly subscribes itself with another object. In a recent project we chose to use […]

Meta Class Dependency Injection in Objective-C

In a previous post we announced Objection, a dependency injection framework created for Objective-C. Since then, we have been actively using Objection in our iOS projects and we have added a few new features: Protocol Bindings, Eager Singletons, and Meta Class bindings. Meta class bindings are useful when there is an external dependency that is […]

Objection: Dependency Injection in Objective-C

For those of you that are familiar with the how and why of dependency injection (DI), we’ve created a DI framework for Objective-C called Objection. Those familiar with Google’s Guice will feel right at home with Objection. We have long wanted DI for Objective-C. Objection was our answer. Why use this dependency injection stuff? DI […]