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
72
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
180
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
200
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
生成AI_その前_に_マルチクラウド時代の信頼できるデータを支えるSnowflakeメタデータ活用術.pdf
cm_mikami
0
120
生成AIで「お客様の声」を ストーリーに変える 新潮流「Generative ETL」
ishikawa_satoru
1
340
LLM時代にデータエンジニアの役割はどう変わるか?
ikkimiyazaki
4
980
How to achieve interoperable digital identity across Asian countries
fujie
0
120
PLaMo2シリーズのvLLM実装 / PFN LLM セミナー
pfn
PRO
2
1k
スタートアップにおけるこれからの「データ整備」
shomaekawa
1
260
Function calling機能をPLaMo2に実装するには / PFN LLMセミナー
pfn
PRO
0
970
OpenAI gpt-oss ファインチューニング入門
kmotohas
2
1.1k
自作LLM Native GORM Pluginで実現する AI Agentバックテスト基盤構築
po3rin
2
290
Goにおける 生成AIによるコード生成の ベンチマーク評価入門
daisuketakeda
2
110
VCC 2025 Write-up
bata_24
0
180
成長自己責任時代のあるきかた/How to navigate the era of personal responsibility for growth
kwappa
3
290
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Mobile First: as difficult as doing things right
swwweet
224
10k
It's Worth the Effort
3n
187
28k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
51k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
960
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