[LRUG] Hexagonal Architecture Guidelines For Rails

Stephen Best bestie at gmail.com
Tue Mar 18 11:13:36 PDT 2014


@andrew to answer your questions:

1) A Rails controller's public API should be only action methods therefore
defining extra public methods is a bad idea as they become routable. Not to
mention interface segregation is always a good thing and as I mentioned
Forwardable and SimpleDelegator let you whip up adapter objects very easily.

2 and 3) Good code samples are *hard* to write, I'm working on some but
this post is my MVP based on conversations I've had with various people. I
will endeavour to provide some ASAP.

On the point of "considering other Rails users" I feel that why and how of
clean architecture are two different but related arguments, I only really
wanted to have to latter today :)

Bestie.

On 18 March 2014 15:42, Andrew Premdas <apremdas at gmail.com> wrote:

> Some questions/points:
>
> 1. Why can't the controllers be the RailsAdapter?
>
> 2. The article needs to show app_of_things. It isn't clear for example
> that when you write a foo controller there will be an app_of_foo. Also
> see 1
>
> 3. The article needs to show rails_adapter, and show the mechanism
> used for it to make sense in the controller.
>
> I think you need to consider other rails users when you go so far from
> the norm. In particular the code in the controller should guide the
> programmer to the correct place. I'm not convinced that a variable
> does this. That single line of controller code is how you introduce
> this new hexagonal world it deserves more attention.
>
> All best
>
> Andrew
>
> On 18 March 2014 11:15, Stephen Best <bestie at gmail.com> wrote:
> > I have a blog post that is currently enjoying a fleeting moment of
> exposure
> > via a questionable "news" for "hackers" outlet. Would love to hear LRUG's
> > feedback.
> >
> > https://news.ycombinator.com/item?id=7421018
> >
> >
> > Stephen Best
> >
> > theaudaciouscodeexpiment.com
> > github.com/bestie
> > @thebestie
> >
> > _______________________________________________
> > Chat mailing list
> > Chat at lists.lrug.org
> > http://lists.lrug.org/listinfo.cgi/chat-lrug.org
> >
>
>
>
> --
> ------------------------
> Andrew Premdas
> blog.andrew.premdas.org
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140318/33546161/attachment.html>


More information about the Chat mailing list