The Ruby Blend

Episode 20: The Service Object Show


Listen Later

The Ruby Blend - Episode 20

Welcome to The Ruby Blend! It's been awhile and it sure feels good to back in the swing of things! Today, we have a new panelist with us, Dave Kimura, who's been doing Ruby for quite some time, as well as doing the Drifting Ruby screencast for over five years now. On this episode, we dive into the topic of Service Object, where do they belong in your app and how do you name it in Ruby on Rails. We discuss namespacing and how to name interactors the correct way. Dave elaborates on Active Storage since he did an episode on Drifting Ruby about it. Have you heard of Backblaze and Digital Ocean? Download this episode now to find out more!


Sponsored by:

  • Honeybadger

Panelists:

  • Andrew Mason
  • Ron Cooke
  • Dave Kimura

Guests:

  • None

Show Notes:

[00:00:54] Dave gives us an introduction of himself and what he does.

[00:02:49] Andrew gives an update on what's been happening in his job
 life.

[00:03:58] On the code front, Ron wants to talk about Service Object
 and where do they belong in your app as far as file structure goes.
 Also, how do you name a Service Object in Ruby, and Rails specifically.
 The guys all give their opinions.

[00:17:45] The topic of namespacing service objects in Rails is
 discussed.

[00:24:56] Andrew talks about adding comments to the top of the class
 and doing something is better than doing nothing.

[00:29:24] Andrew makes a great point about keeping your services as
 focused as possible and then call out to other services as needed.

[00:32:57] Andrew is working in a Legacy Rails for code base and he
 wonders how he can take some of the ideas about single responsibility
 pattern and apply these principles in a Legacy App.

[00:36:02] Andrew and Dave talk about naming interactors and the
 importance of the actual method that you're calling it. Also, having a
 conversation with your team and reaching a consensus before you start
 doing stuff.

[00:38:46] Dave just released a Drifting Ruby episode called, "Bulk
Uploads with Active Storage," and he tells us about it.

[00:42:28] Andrew asks Dave to elaborate on Active Storage feeling
 very flushed down, because Andrew doesn't feel like it is.

[00:46:33] Dave tells Andrew about Backblaze B2 Cloud storage and
 Andrew mentions Digital Ocean. Here is Dave's actual configuration and
 his storage YAMIL file for Backblaze that he's using on Rubidium:

service: S3
access_key_id: <%= ENV['S3_ACCESS_KEY'] %>
secret_access_key: <%= ENV['S3_SECRET_KEY'] %>
region: us-east-1
bucket: myapp-production
endpoint: <%= ENV['S3_ENDPOINT'] %>
force_path_style: true

[00:49:34] Dave tells us where we can find him online.


Links:

  • Dave Kimura Twitter
  • Drifting Ruby
  • "Bulk Upload with Active Storage" by Dave Kimura-Drifting Ruby
  • Backblaze B2 Cloud Storage
  • Rubidium
  • Digital Ocean
  • Active Storage

Credits:

  • Edited by Paul M. Bahr at Peachtree Sound
  • Show notes by DeAnn Bahr at Peachtree Sound
  • Ad Sales by Eric Berry

Follow Us:

  • Our Website
  • Twitter
  • Dev.to

Transistor.fm is now hosting an archive of the podcast for us. Learn how to start your own podcast!

...more
View all episodesView all episodes
Download on the App Store

The Ruby BlendBy Rebase FM

  • 5
  • 5
  • 5
  • 5
  • 5

5

8 ratings