Hello,

In the DCI principle, I like the Roles. It enable to have a skinny model
with a single responsability (the persistence of the data).

I don't like the context. It can be useful for some specific cases like in
this article :
http://mikepackdev.com/blog_posts/24-the-right-way-to-code-dci-in-ruby. But
I don't want to have something like this :
https://github.com/randx/rails-dci-example/blob/master/app/controllers/documents_controller.rb.
It's too complicated for nothing.

I have an alternative here : https://gist.github.com/GCorbel/5699834. It
use service objects with roles. I think it's the best of both worlds.

What do you think?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CABfX5PbfeiSrvdN0O3uczXh%2BBxsX2HBFx7pdc%3DTDxxcA%2BVchtA%40mail.gmail.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to