#7 Untangle your code with MORE than service objects! Meet Dry::Monads! | Hanami Mastery - a knowledge base to hanami framework

submited by
Style Pass
2021-07-24 02:30:03

Recently I've written an article, where I've told about the decision process behind my attempt to replace Rails with Hanami in our microservices ecosystem and why I decided not to do it just yet.

The important part was, that rewriting my Hanami application to Rails took me less than a day - and I was able to do so, because of how I and my team tend to structure code in our web applications for the recent years.

Then I've gone through this great article about using Service Objects in Rails applications and It plucked my heartstring. At first, I thought: Another article about Service objects, which I personally HATE.

But almost instantly, a second thought came to my mind, revealing, that I am actually a super fan of service objects. I just only don't name them this way, I use more abstractions and extract dependencies out for better clarity.

So in this episode, I'll show you my version of service objects that allowed me to replace one ruby web framework with another in a complete service in less than a day.

Leave a Comment
Related Posts