The Ruby Unbundled Series: Services vs. Objects - The Battle for Decomposition and Reuse

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • PopRuby - Clothing and Accessories for Ruby Developers
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • Light Service

    Series of Actions with an emphasis on simplicity.

    You can implement the service pattern as a PORO, but it helps to use one of the gems available to aid in code structure, orchestration, and error handling. The LightService gem provides a nice implementation without adding hardly any overhead. It’s design is very simple, as shown in the diagram below. An organizer is used to define the sequential workflow, which is made up of one or more actions. An error in any of the actions will short-circuit the entire workflow.

  • eyk-app-templates

    A set of basic templates to use as a starting point for EYK applications

    Consider the following organizer code from my sample news application. It has no comments, but it's pretty clear from the code what is happening.

  • PopRuby

    PopRuby: Clothing and Accessories for Ruby Developers. Fashion meets Ruby! Shop our fun Ruby-inspired apparel and accessories designed to celebrate the joy and diversity of the Ruby community.

  • textmood

    Simple and powerful Ruby sentiment analyzer

    The context serves as a bag of attributes that is passed between actions. Each action specifies what attributes it expects as inputs, and what it promises to populate as outputs (if any). The context also includes success indicators and error messages. The code below is used to implement the AnalyzeSentimentAction using the TextMood gem to perform the actual analysis.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts