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
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
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
220
BostonRB Intro - November 2012
patricksroberts
0
260
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
AWS Blocks を触ってみた/first-tach-aws-blocks
fossamagna
2
140
從觀望到全公司落地:AI Agentic Coding 導入實戰 — 流程整合與安全治理
appleboy
1
730
MySQL & MySQL HeatWave Report - June 2026
freshdaz
0
300
背中から、背中へ /paying forward to community
naitosatoshi
0
220
CSに"SLO"は要らない、経営層に"99.9%"は伝わらない - SREを全社に"翻訳"する3原則
cscengineer
PRO
0
140
初めてのDatabricks勉強会
taka_aki
2
230
金融の未来を考える / Thinking About the Future of Finance
ks91
PRO
0
150
本当の”仕事”を手放せる未来が見えた
mu7889yoon
0
220
製造現場での生成AIの活用、およびエージェントAIの実装のあり方、AVEVAの取り組み
iotcomjpadmin
0
220
Mastraエージェント、どのクラウドにデプロイする?
minorun365
PRO
2
150
AIに「使われる」時代のSaaS戦略 〜既存WebAPIのMCPサーバー化における開発ノウハウ〜
ekispert_api
0
290
テスト設計の本質を改めて考えてみる~生成AIを活用する時代だからこそ、作ったテストの説明性を高めよう~
yamasaki696
1
290
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
GitHub's CSS Performance
jonrohan
1033
470k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
ラッコキーワード サービス紹介資料
rakko
1
3.8M
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
640
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
GraphQLとの向き合い方2022年版
quramy
50
15k
Documentation Writing (for coders)
carmenintech
77
5.4k
How to build a perfect <img>
jonoalderson
1
5.8k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
340
Balancing Empowerment & Direction
lara
6
1.2k
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