How I code without service objects - Code with Jason
01-Apr-2021 1193
Service objects and Interactors are fashionable among Rails developers today. I can’t speak for everyone’s motives but the impression I get is that service objects are seen as a way to avoid the “fat models” you’re left with if you follow the “skinny controllers, fat models” guideline. If your models are too fat you can move some of their bulk to some service objects to thin them out.Unfortunately it’s not quite possible to say what service objects are because the term “service object” means different things to different people. To some developers, “service object” is just a synonym for plain old Ruby object (PORO). To other developers, a service object is more or less an implementation of the command pattern. Interactors are similarly close to the command pattern.
How I code without service objects - Code with Jason #ruby #rubydeveloper #rubyonrails #without #service #objects #Jason #code #service https://rubyonrails.ba/link/how-i-code-without-service-objects-code-with-jason