Better code with an inversion of control container

Last week we walked through the steps required to set up dry-container as an inversion of control container to manage our application’s objects and to make dependency injection easy and practical with dry-auto_inject.


Effective Ruby dependency injection at scale

Last week we found a pattern for functional command objects that uses dependency injection to make it possible to decompose things into small, reusable pieces. Our example was also small: it showed just three objects working together. This has long…


Functional command objects in Ruby

In our last visit we discussed the benefits that immutable value objects bring to your Ruby web app. Today, we’ll look at actually making some changes. If our entities are immutable, how do we do this? We use command objects!