DEV Community

Cover image for Inversion Of Control: Pt 0 - Introduction
Mike Talbot ⭐
Mike Talbot ⭐

Posted on • Updated on

Inversion Of Control: Pt 0 - Introduction

I've been wanting to write an article about using "Inversion of Control" for a while. Inversion of Control is a very powerful technique that:

  • Deals well with shifting requirements
  • Handles customised versions of software for different clients (including in multi-tenant systems)
  • Works brilliantly with distributed teams working on the same code base
  • Reduces the amount of time spent testing core components and checking whether you broke one
  • Is not something in any way specific to games

Alt Text

IoC has been a core part of my architectural toolbox for many years, but here's the rub, with simple examples it's just too easy to say "Oh that just makes it complicated".

To address this I've decided to make a project that is not totally trivial. In this case a game. I intend to write a few articles discussing how IoC works in this context.

The game uses js-coroutines for animation and a new event bus that I will go through in detail.

For now I thought I'd just show off the project. A simple game with an annoying control system! You push floating apples around (and have to master the technique for doing it). Pop some bubbles along the way.

Oldest comments (1)

Collapse
 
miketalbot profile image
Mike Talbot ⭐

That's great, I will be sure to be referring to SOLID given that nudge!