[LRUG] Objects and on Hexagonal Rails
Tom Cartwright
tecartwright at gmail.com
Tue Jul 23 06:26:29 PDT 2013
Afternoon all,
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.
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.
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.
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.
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?
Thanks in advance for your brain thoughts.
Tom
--
Tom Cartwright
tecartwright at gmail.com Portfolio <http://www.tomcartwright.net> ·
GitHub<http://github.com/tomcartwrightuk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20130723/e5cdcb6a/attachment-0003.html>
More information about the Chat
mailing list