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>
<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>
</div>