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
450
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
190
Building Extractable Libraries in Rails
patricksroberts
15
1.8k
Hitch - BostonRB Lighting talk
patricksroberts
1
130
Other Decks in Technology
See All in Technology
ウォンテッドリーのアラート設計と Datadog 移行での知見
donkomura
0
280
あとはAIに任せて人間は自由に生きる
kentaro
3
1.1k
サービスロボット最前線:ugoが挑むPhysical AI活用
kmatsuiugo
0
180
Exadata Database Service on Dedicated Infrastructure セキュリティ、ネットワーク、および管理について
oracle4engineer
PRO
1
350
いま、あらためて考えてみるアカウント管理 with IaC / Account management with IaC
kohbis
2
590
Preferred Networks (PFN) とLLM Post-Training チームの紹介 / 第4回 関東Kaggler会 スポンサーセッション
pfn
PRO
1
130
Amazon Bedrock AgentCore でプロモーション用動画生成エージェントを開発する
nasuvitz
6
370
結局QUICで通信は速くなるの?
kota_yata
9
7.5k
広島銀行におけるAWS活用の取り組みについて
masakimori
0
110
Claude Code x Androidアプリ 開発
kgmyshin
1
500
LLMエージェント時代に適応した開発フロー
hiragram
1
350
我々は雰囲気で仕事をしている / How can we do vibe coding as well
naospon
2
200
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
4 Signs Your Business is Dying
shpigford
184
22k
How STYLIGHT went responsive
nonsquared
100
5.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
Six Lessons from altMBA
skipperchong
28
4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Why Our Code Smells
bkeepers
PRO
338
57k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
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