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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Patrick Robertson
September 20, 2012
Technology
88
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
200
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
220
BostonRB Intro - November 2012
patricksroberts
0
250
Building Extractable Libraries in Rails - DCRUG
patricksroberts
2
210
Building Extractable Libraries in Rails
patricksroberts
15
1.8k
Hitch - BostonRB Lighting talk
patricksroberts
1
140
Other Decks in Technology
See All in Technology
スキルと MCP ツール、責務をどう分けるか? AI が迷わないインターフェース設計の戦略
cdataj
1
910
NAB Show 2026 動画技術関連レポート / NAB Show 2026 Report
cyberagentdevelopers
PRO
0
160
AWSシリコン最前線 〜AI時代のチップ選択を読み解く〜
htokoyo
2
390
Building applications in the Gemini API family.
line_developers_tw
PRO
0
2.8k
脆弱性対応、どこで線を引くか
rymiyamoto
0
350
チームで進めるAI駆動アジャイル×ウォーターフォール
kumaiu
0
150
AIソロプレナー時代に2ヶ月で20人増員した事業創造会社の開発組織の話
miyatakoji
0
570
新規事業を牽引する技術選定 〜フルスタックTypeScript開発の実践事例〜
nullnull
3
380
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
19
6.4k
AAIFに入ってみた ~内から見えるコミュニティ動向~
sato4
0
130
2026TECHFRESH畢業分享會 - Lightning Talk - 打造精準高效的 MCP 設計模式與測試實務
line_developers_tw
PRO
0
680
作って終わりにしない タイミーのセマンティックレイヤー育成の現在地
chanyou0311
3
2.1k
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
330
Producing Creativity
orderedlist
PRO
348
40k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
410
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
A designer walks into a library…
pauljervisheath
211
24k
Facilitating Awesome Meetings
lara
57
7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
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