Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
72
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
200
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
AWS Bedrock AgentCoreで作る 1on1支援AIエージェント 〜Memory × Evaluationsによる実践開発〜
yusukeshimizu
5
360
法人支出管理領域におけるソフトウェアアーキテクチャに基づいたテスト戦略の実践
ogugu9
1
210
Security Diaries of an Open Source IAM
ahus1
0
130
グレートファイアウォールを自宅に建てよう
ctes091x
0
140
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
180
re:Inventで気になったサービスを10分でいけるところまでお話しします
yama3133
1
110
第4回 「メタデータ通り」 リアル開催
datayokocho
0
110
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
900
たかが特別な時間の終わり / It's Only the End of Special Time
watany
29
7.9k
Edge AI Performance on Zephyr Pico vs. Pico 2
iotengineer22
0
100
Noを伝える技術2025: 爆速合意形成のためのNICOフレームワーク速習 #pmconf2025
aki_iinuma
2
2k
【pmconf2025】PdMの「責任感」がチームを弱くする?「分業型」から全員がユーザー価値に本気で向き合う「共創型開発チーム」への変遷
toshimasa012345
0
240
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Why Our Code Smells
bkeepers
PRO
340
57k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
The Pragmatic Product Professional
lauravandoore
37
7.1k
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