Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
DCI and Ruby
Search
Fabio Kuhn
January 31, 2012
Programming
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DCI and Ruby
What is DCI and how can we use it with Ruby?
Fabio Kuhn
January 31, 2012
More Decks by Fabio Kuhn
See All by Fabio Kuhn
RubyMotion
mordaroso
1
220
Other Decks in Programming
See All in Programming
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
160
Modernizing iOS Apps
seyfoyun
0
150
AI Augmentation Techniques with Liberty
ivargrimstad
1
320
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
No More NoSuchMethodError
exoego
1
120
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
460
Next.js: The final boss of Web Performance
guaca
0
380
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
150
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
400
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
220
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
320
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
270
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
830
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
60k
Navigating Team Friction
lara
192
16k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Git: the NoSQL Database
bkeepers
PRO
433
67k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
4 Signs Your Business is Dying
shpigford
187
23k
30 Presentation Tips
portentint
PRO
1
460
Transcript
DCI and Ruby
What is DCI? Trygve Reenskaug (MVC, UML) Data, context and
interaction OOP paradigm Goals Improve readability Separation of code System state instead of object state End user style of thinking
None
Theatre Director Actors Scene Roles
Data “What the system is” - Actor Simple object Basic
functionality / no interaction with other objects Object thinking instead of class thinking
Context “How the system looks and starts” - Director Represents
one or more use cases Identify objects and assign them roles at runtime Use case functionality = data objects with assigned roles combined
Interaction “What the system does” - Role Roles played by
objects Stateless call methods on self (= playing object) Interactions are generic
None
Example Waitress Complex Model (my waitress, employee, person in restaurant)
Placing an order CustomerOrdersMeal Object Actors: Customer, Waitress Extend Customer with Consumer and Waitress with MenuCard and OrderManager Call waitress.order_meal(customer, meal)
Conflict or Complementary? Fat Model? MVC / Model2? REST? Ruby?
Rails?
DCI in Rails Data => ActiveRecord Model Context => Controller
action or separate workflow class Roles => Module to mix in
Sources http://en.wikipedia.org/wiki/Data,_Context,_and_Interaction http://andrzejonsoftware.blogspot.com http://nicksda.apotomo.de/2011/12/ruby-on-rest-2- representers-and-the-dci-pattern/ http://mikepackdev.com/blog_posts/24-the-right-way-to- code-dci-in-ruby
Learn more... http://www.leansoftwarearchitecture.com/ http://vimeo.com/8235394