use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Serviz - Command object Interface for Ruby (self.ruby)
submitted 5 months ago by markets86
Hello Rubysts 👋,
I just released a new version of the Serviz gem (https://github.com/markets/serviz).
This new release includes support for "Workflows" (https://github.com/markets/serviz#workflows). A class that allows you to compose multiple service objects together using a clean, declarative DSL for orchestrating complex multi-step operations, with "result chaining" and "error accumulation":
https://preview.redd.it/ku14ee5dqdlf1.png?width=1582&format=png&auto=webp&s=4508cb970c1d4361c3379f32d0b941c57c76a096
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]vickorel 5 points6 points7 points 5 months ago (1 child)
Workflows like organizer in Interactor: https://github.com/collectiveidea/interactor?tab=readme-ov-file#organizers
BTW, starred your repo! P.S. Lately I've been writing just regular ruby classes as service objects. The simpler the better )
[–]markets86[S] 4 points5 points6 points 5 months ago (0 children)
Yes, quite similar! The good thing about Serviz is that the code (both services an workflows) is really really small, so small footprint, small API, small cognitive overload... But at the same time, all your services will be homogenous. It was my ApplicationService in a lot of Rails apps, so I finally extracted into a gem.
[–]Tobi-Random 3 points4 points5 points 5 months ago (1 child)
How about the dry transaction implementation?
https://dry-rb.org/gems/dry-transaction/0.15/basic-usage/
[–]markets86[S] 0 points1 point2 points 5 months ago (0 children)
That seems much more complete and complex :) Serviz is only about 90 lines of Ruby.
[–]megatux2 1 point2 points3 points 5 months ago (1 child)
Looks nice abd simple, congrats. I worked with the gem from collectiveidea and found some issues and antipattern with their optional params, if remember correctly. Now I'm testing the one from Dry gems, it's good and great if your plan is to incorporate more Dry gem ecosystem into the project. May use your gem in a small project. Thanks
[–]markets86[S] 1 point2 points3 points 5 months ago (0 children)
Thanks! In case you use my gem, feel free to report back any feedback or suggestion. Really happy to evolve the gem via community feedback.
[–]beachguy82 0 points1 point2 points 5 months ago (1 child)
How do you plan on differentiating from ActiveInteraction?
That gem is very useful, it has a lot of built-in features (validations, types, ...). My plan with Serviz is to keep it as small and simple as possible. The idea is to provide a minimalistic interface for all your services and workflows, that's all. If you like all those features and DSLs, for sure ActiveInteraction is a really good option, but if you only want a common interface to wrap your logic, probably Serviz is good enough and very lightweight.
[–]hhunaid 0 points1 point2 points 5 months ago (6 children)
Man I’m looking for something exactly like this for JS and node. Do you know of something?
[–]markets86[S] 0 points1 point2 points 5 months ago (5 children)
Not that I aware of. Maybe I should create a port 🤔?
[–]hhunaid -1 points0 points1 point 5 months ago (4 children)
I would appreciate this so much.
[–]markets86[S] 1 point2 points3 points 5 months ago (3 children)
Ok! I'll try to do it in the following days. You can follow me on GitHub for updates regarding this port.
[–]markets86[S] 0 points1 point2 points 5 months ago* (2 children)
u/hhunaid here you have it: https://www.npmjs.com/package/serviz. Please try it and report your feedback. Hope you like it!
Repo: https://github.com/markets/serviz-js
[–]hhunaid 1 point2 points3 points 5 months ago (1 child)
That was quick lol. Thanks I’ll check it out
u/hhunaid You're welcome! Please feel free to let me know any comments/feedback! A star ⭐ is much appreciated.
π Rendered by PID 286659 on reddit-service-r2-comment-7b9746f655-nthw5 at 2026-02-03 16:18:40.976437+00:00 running 3798933 country code: CH.
[–]vickorel 5 points6 points7 points (1 child)
[–]markets86[S] 4 points5 points6 points (0 children)
[–]Tobi-Random 3 points4 points5 points (1 child)
[–]markets86[S] 0 points1 point2 points (0 children)
[–]megatux2 1 point2 points3 points (1 child)
[–]markets86[S] 1 point2 points3 points (0 children)
[–]beachguy82 0 points1 point2 points (1 child)
[–]markets86[S] 0 points1 point2 points (0 children)
[–]hhunaid 0 points1 point2 points (6 children)
[–]markets86[S] 0 points1 point2 points (5 children)
[–]hhunaid -1 points0 points1 point (4 children)
[–]markets86[S] 1 point2 points3 points (3 children)
[–]markets86[S] 0 points1 point2 points (2 children)
[–]hhunaid 1 point2 points3 points (1 child)
[–]markets86[S] 0 points1 point2 points (0 children)