Learn Backend Development Part-Time, Online
2,000+ Free Courses with Certificates: Coding, AI, SQL, and More
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This talk surveys approaches to structuring Rails service objects, handling errors, reusing code, and organizing directories. It compares object-oriented and functional patterns and their tradeoffs.
Syllabus
Introduction
Service Objects
Rails
What are Service Objects
Object Oriented Patterns vs Functional Patterns
Functional Programming in Ruby
LightService
Handling Errors
Nested Conditionals
Dont do this
Raising exceptions
Throwing errors
Return values
True false
Openstructs
Custom Classes
Where to put the code
Outro
Taught by
Ruby Central