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
90
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DCI Like a BOSS - BostonRB lightning talk
quick talk on DCI for BostonRB lightning talk night.
Patrick Robertson
September 20, 2012
More Decks by Patrick Robertson
See All by Patrick Robertson
CORS + EmberJS
patricksroberts
0
210
Building Extractable Libraries in Rail - Railsconf
patricksroberts
8
610
Five Gems - BostonRB lightning talk
patricksroberts
2
470
Building Extractable Libraries in Rails - BostonRB
patricksroberts
1
280
This Month in Ruby - December 2012
patricksroberts
0
230
BostonRB Intro - November 2012
patricksroberts
0
260
Building Extractable Libraries in Rails - DCRUG
patricksroberts
2
220
Building Extractable Libraries in Rails
patricksroberts
15
1.8k
Hitch - BostonRB Lighting talk
patricksroberts
1
160
Other Decks in Technology
See All in Technology
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
130
Reference-Free Image Quality Assessment for Virtual Try-On via Human Feedback
zozotech
PRO
0
170
強化学習「理論」入門
enakai00
3
3.6k
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
Digitization部 紹介資料
sansan33
PRO
2
7.7k
【CEDEC2026】次世代デジタルカードゲームのサーバー設計と運用 〜『Shadowverse: Worlds Beyond』の舞台裏~
cygames
PRO
1
1.3k
AI-DLC実践録_フルサイクル開発への挑戦
miyuc
0
150
MIRU 2026 チュートリアル
keisuke198619
0
940
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.4k
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.3k
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
9k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
For a Future-Friendly Web
brad_frost
183
10k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
340
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
470
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Prompt Engineering for Job Search
mfonobong
0
400
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
580
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
790
How to Think Like a Performance Engineer
csswizardry
28
2.7k
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