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
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
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
Claude Codeを使った情報整理術
knishioka
15
11k
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
3
230
「駆動」って言葉、なんかカッコイイ_Mitz
comucal
PRO
0
130
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
130
20251222_サンフランシスコサバイバル術
ponponmikankan
2
150
さくらのクラウド開発ふりかえり2025
kazeburo
2
1.3k
[Neurogica] 採用ポジション/ Recruitment Position
neurogica
1
140
_第4回__AIxIoTビジネス共創ラボ紹介資料_20251203.pdf
iotcomjpadmin
0
160
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
430
Snowflake Industry Days 2025 Nowcast
takumimukaiyama
0
150
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
19
3.3k
Claude Skillsの テスト業務での活用事例
moritamasami
1
120
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
81
Everyday Curiosity
cassininazir
0
110
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
120
Typedesign – Prime Four
hannesfritz
42
2.9k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
530
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
140
Paper Plane (Part 1)
katiecoart
PRO
0
2.5k
A Soul's Torment
seathinner
1
2.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Building Applications with DynamoDB
mza
96
6.9k
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