Created
August 18, 2012 03:44
-
-
Save khoan/3384201 to your computer and use it in GitHub Desktop.
Data Context Interaction in a minute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Caveat: I have not read James Coplien book about DCI. | |
But to put simply: Data Context Interaction (Roles) is a technique to capture the run-time behavior of your system. I'll leave the benefits to your imagination, and gleaning from further reading of numerous sources about the subject. | |
How do we apply DCI to Rails? Here's one proposed folder structure: | |
app/contexts/ | |
app/roles/ | |
app/models/ | |
app/contexts/ holds your contexts. app/roles/ holds your roles. app/models holds your dump data. When viewing app/contexts/ each file reflects a use case of your application, and taken as a whole screams what your application is all about. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment