Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7646525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:13:54+00:00 2026-05-31T10:13:54+00:00

A recent debate with a co-worker about different approaches to design and code the

  • 0

A recent debate with a co-worker about different approaches to design and code the models in a Rails application brought me across DCI in the context of Rails.

However, I just can’t seem to wrap my head around that entire concept, even after going over this example application.

Currently, I tend to just go more or less “by the book” when writing a Rails app.

So there are a few things I’d like to ask —

  • What is DCI and what are its advantages when implemented alongside MVC over plain old MVC (and vanilla ActiveRecord in Rails) ?
  • And how can it be implemented in Rails (or in other words, what’s with all the modules) ?

Edit

I’d like to even further expand my question in the context of RoR – is another level of abstraction between the models and the controllers in Rails recommended? How widespread is it in different-scale applications?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:13:56+00:00Added an answer on May 31, 2026 at 10:13 am

    DCI is a paradigm and hence much more than a way to design an application. It’s a way to think about modelling as well as structuring code. One of the important parts of DCI is keeping what the system is (the domain model) and what the system does (functionality) apart. DCI is not a different approach to solving the same problem as MVC so your first question can’t really be answered. You can use MVC and DCI simultaneously which is no coincidence since Trygve Renskaug is the father of both MVC and DCI. He recently answered a similar question to this on the google group ‘object-composition’.

    The example you’ve linked to violates some of the basic ideas such as keeping roles private to the contexts and I couldn’t actually find a single context either but that could be due to spending only a short time browsing the code.

    I don’t know RoR my self so I can’t give you an RoR example but if you go to fullOO you’ll find examples written in different languages including both Ruby and Marvin the first language designed for DCI.

    EDIT There’s no simply answer to the question “What is DCI” DCI is a paradigm, just like OOP is a paradigm. They both have the same roots and answering the above question is as complicated as answering “What is object orientented programming”. Things are even more complicated by the fact that DCI is object oriented and OOP in all the major OO languages is actually class oriented and not object oriented. DCI aims at producing code where the interaction between objects at run time is visible in the code at compile time and in more general terms tries to mkae it easier to reason about the run time behavior from reading the code. The site I’ve linked to above is devoted to explaining what DCI is all about and also lists examples in a number of languages. Ruby being one of them

    EDIT There’s a book on ruby and DCI on it’s way. The author is pretty active on object-composition and insightfull

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A recent question about string literals in .NET caught my eye. I know that
A recent question came up about using String.Format(). Part of my answer included a
A recent question about StyleCop alerted me to the use of tools to enforce
This recent question about sorting randomly using C# got me thinking about the way
The recent article of steve jobs link made me think about the future of
In several recent answers I see this code given as the way to retrieve
Inspired by the recent question about 2d grids in Haskell, I'm wondering if it
I recent came across Javascript templates and have become quite intrigued. I am building
In a very recent questions I was having problems with this. My code was:
A recent question contains a problem that I many times used to think about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.