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
600
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
Cosmos World Foundation Model Platform for Physical AI
takmin
0
860
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
640
配列に見る bash と zsh の違い
kazzpapa3
1
140
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
530
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
170
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
440
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
230
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.4k
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
140
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
150
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
180
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
First, design no harm
axbom
PRO
2
1.1k
Code Review Best Practice
trishagee
74
20k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
The agentic SEO stack - context over prompts
schlessera
0
630
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