<div dir="ltr"><div>I often get involved at the early stages of building a prototype, then an MVP, and handing over to an internal team.</div><div><br></div><div style>If I were planning to build and lead a team for a number of years my approach would be different.</div>

<div style><br></div><div style>But if you plan to hand over a project you need to be able to explain succinctly the design principles you've used.</div><div style><br></div><div style>For the last couple of years I've always said;</div>

<div style>"I built this according to the patterns described in Ryan Bigg's Rails 3 in Action"</div><div style><br></div><div style>That's worked very well. If its a newbie, or an experienced developer, we can all read that one book and understand the approach.</div>

<div style><br></div><div style>I think that "Objects on Rails" describes some great patterns, but isn't complete enough as an introduction to rails to give to a newbie.</div><div style><br></div><div style>

I'm waiting for Steve Klabnik to finish his rewrite as "Rails 4 in Action",</div><div style>but I'm reconsidering what approach I'd use for a new "rails project".</div><div style><br></div>

<div style>(I started building an Ember app (+ Rails API) this week, and that's pretty fun)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 July 2013 14:26, Tom Cartwright <span dir="ltr"><<a href="mailto:tecartwright@gmail.com" target="_blank">tecartwright@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Afternoon all,<div><br></div><div><div>I am about to start a new rails project. I have read objects-on-rails and watched the Hexagonal rails talk and the techniques make a lot of sense. "Great!" thought I, I can build this new app with lots of those patterns (service layers, decorators, publish/subscribe (announcer/listener) pattern, logic living in a classes with a single responsibility etc). Everything will be easier to test and easier to change and develop. Winner.</div>


<div>However, when I asked a colleague what they thought of these techniques, they had concerns about moving away from the rails conventions as it would take time to get developers up to speed with the techniques.</div><div>


One reason (and I can definitely see their point here) is that intentions can get obfuscated when using lots of loosely coupled objects and this can lead to confusion. Given lots of developers will be working on the app, onboard time is something I need to consider.</div>


<div>One way to strike a balance would be to develop the app in the canonical fashion and then use these techniques as and when. E.g. Use the publish subscribe pattern when controllers/models start to get bloated. However, by that point it could be a bit too late and I might be reluctant to make changes that major. My integration tests would catch most stuff, but I will have to be confident that they will catch all the edge cases.</div>


<div><br></div><div>So my question is: Should you strike a balance? If so, how do you strike a good balance? What has been your experience of introducing these techniques bit-by-bit?</div><div>Thanks in advance for your brain thoughts.</div>

<span class="HOEnZb"><font color="#888888">
<div><br></div><div>Tom</div><div><br></div>-- <br><div dir="ltr"><font face="arial, helvetica, sans-serif">Tom Cartwright</font><div><font face="arial, helvetica, sans-serif"><a href="http://tecartwright@gmail.com/" style="line-height:18px;white-space:pre-wrap;text-decoration:initial" target="_blank">tecartwright@gmail.com</a><span style="line-height:18px;color:rgb(71,71,71);white-space:pre-wrap">
<a href="http://www.tomcartwright.net" target="_blank">Portfolio</a> </span><font color="#474747"><span style="line-height:18px;white-space:pre-wrap">ยท </span></font><span style="line-height:18px;color:rgb(71,71,71);white-space:pre-wrap"><a href="http://github.com/tomcartwrightuk" target="_blank">GitHub</a></span></font></div>



</div>
</font></span></div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>