[LRUG] Hexagonal Architecture Guidelines For Rails

Mike Kelly mikekelly321 at gmail.com
Tue Mar 18 08:50:49 PDT 2014


On Tue, Mar 18, 2014 at 3:42 PM, Andrew Premdas <apremdas at gmail.com> wrote:

> Some questions/points:
>
> 1. Why can't the controllers be the RailsAdapter?
>

The main reason I've found this doesn't work is because Rails controllers
tend to be responsible for handling many different CRUD actions over a
collection. If you're adhering to tell don't ask this leads to controllers
that have a huge public interface, because they need to have a callback
method for handling each potential outcome for every action. By breaking
out the callback methods for each action into decorators, you avoid this
problem and group each action's callbacks together.

Cheers,
M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140318/97e69211/attachment.html>


More information about the Chat mailing list