Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DCI Like a BOSS - BostonRB lightning talk
Search
Patrick Robertson
September 20, 2012
Technology
0
74
DCI Like a BOSS - BostonRB lightning talk
quick talk on DCI for BostonRB lightning talk night.
Patrick Robertson
September 20, 2012
Tweet
Share
More Decks by Patrick Robertson
See All by Patrick Robertson
CORS + EmberJS
patricksroberts
0
190
Building Extractable Libraries in Rail - Railsconf
patricksroberts
8
590
Five Gems - BostonRB lightning talk
patricksroberts
2
460
Building Extractable Libraries in Rails - BostonRB
patricksroberts
1
270
This Month in Ruby - December 2012
patricksroberts
0
210
BostonRB Intro - November 2012
patricksroberts
0
240
Building Extractable Libraries in Rails - DCRUG
patricksroberts
2
200
Building Extractable Libraries in Rails
patricksroberts
15
1.8k
Hitch - BostonRB Lighting talk
patricksroberts
1
130
Other Decks in Technology
See All in Technology
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
1
210
Security Hub と出会ってから 1年半が過ぎました
rch850
0
170
これまでのネットワーク運用を変えるかもしれないアプデをおさらい
hatahata021
4
260
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
Agentic Coding 実践ワークショップ
watany
32
23k
BPaaSオペレーション・kubell社内 n8n活用による効率化検証事例紹介
kentarofujii
0
250
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
Proxmoxで作る自宅クラウド入門
koinunopochi
0
180
Data Intelligence on Lakehouse Paradigm
scotthsieh825
0
190
なぜCREを8年間続けているのか / cre-camp-4-2026-01-21
missasan
0
1k
re:Inventで見つけた「運用を捨てる」技術。
ezaki
1
100
Databricks Free Edition講座 データエンジニアリング編
taka_aki
0
2.7k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
66k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
150
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
100
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
180
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
61
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
110
The Language of Interfaces
destraynor
162
26k
Test your architecture with Archunit
thirion
1
2.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
100k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
85
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Believing is Seeing
oripsolob
1
33
Transcript
DCI
Hello There! I’m @patricksroberts. I work at @iorahealth. I co-organize
@bostonrb.
DATA CONTEXT INTERACTION
DCI is a strategy to separate what your system does
from what your system is.
The Old and Busted Way
# app/models/user.rb class User < ActiveRecord::Base validates_presence_of :twitter_handle def tweet
TwitterWrangler.add_to_queue twitter_handle, twitter message end private def twitter_message “Today my BMI is #{body_mass_index} and I’m #{percent_of_body_mass_index_goal} from my goal of #{body_mass_index_goal}!” end end
THE NEW HOTNESS
DATA
# app/models/user.rb class User < ActiveRecord::Base validates_presence_of :twitter_handle end
ROLE
# app/roles/twit_user.rb module TwitUser def twitter_message “Today my BMI is
#{body_mass_index} and I’m #{percent_of_body_mass_index_goal} from my goal of #{body_mass_index_goal}!” end end
CONTEXT
# app/contexts/bmi_update_tweet.rb class BmiUpdateTweet attr_reader :user def initialize(user) @user =
user @user.extend TwitUser end def call TwitterWrangler.add_to_queue @user.twitter_handle, @user.twitter_message end end
INTERACTION
# app/controllers/tweets_controller.rb class TweetsController < ApplicationController def update user =
User.find(params[:id]) BmiUpdateTweet.new(user).call respond_with :ok end end