Go Pro with POROs
summary
Provides concrete, actionable patterns: Service objects that expose a single run/call method and return errors, API wrappers that hide HTTParty‑style requests (examples include a MyRun fetcher and a Twitter poster used end‑to‑end), and a Heroku Connect + Salesforce ActiveRecord wrapper. Shows virtual domain models that capture API results and solved a tricky finance projection dependency, form objects using ActiveModel, Draper/ViewComponent presenters, FastJsonAPI serializers, and a Decanter transformer for strong params and coercion.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 4:20Database wrappers foundation
- 8:53Modules for organization
- 14:53What is a PORO
- 15:35Business logic services
- 20:09API wrappers for services
- 22:38Virtual domain models
- 26:50Request and presentation objects
- 34:38Summary
related talks
39mPlain, Old, but Mighty: Leveraging POROs in Greenfield and...
33mRails APIs: The Next Generation
39mPlain, Old, but Mighty: Leveraging POROs in Greenfield and...
30mStructure and Chain your Poros
22mNitty Gritty Service Building
44mReal-World Functional Ruby
37mRails as an SOA Client
23mAbstracting a Service - A Case Study in Forward Thinking with SOA
