DEV Community

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

Posted on • Edited on

10 3

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.

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (1)

Collapse
 
miketalbot profile image
Mike Talbot ⭐

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

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay