Refactoring Ruby Code: From Service Objects to Object Designby@aleksandrov

Refactoring Ruby Code: From Service Objects to Object Design

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Service objects were discussed many times by several authors. Usually, they are a code smell, and I will not try to explain why again. I will show a practical example of refactoring a service object into an object-orientated code. I will not try to blame anybody; probably, it was me who clicked the “Approve” button on the PR that introduced the code listed below. Anyway, I believe it is always better to return and work on your mistakes.

Company Mentioned

Mention Thumbnail
featured image - Refactoring Ruby Code: From Service Objects to Object Design
Igor Alexandrov HackerNoon profile picture

@aleksandrov

Igor Alexandrov

Ruby/Crystal developer, JetRockets and OneTribe CTO and co-founder


Receive Stories from @aleksandrov

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!