The other day while preparing a presentation on architecture in Rails applications I tried to gather the links that have been influential for me on the topic.
These were things that I discovered across a period of months (and a lot of them are quite old) so I figured they could be helpful to others embarking on this path. I also tried to trim the amount of links to the bare minimum. There are other examples of great content out there, but I found these links to represent the 80-20.
Below you can find the list of links:
-
The Secret to Rails OO Design – http://blog.steveklabnik.com/posts/2011-09-06-the-secret-to-rails-oo-design
-
Anatomy of a Rails Service Object – http://multithreaded.stitchfix.com/blog/2015/06/02/anatomy-of-service-objects-in-rails/
-
Matt Wynne – Hexagonal Rails – https://vimeo.com/44807822
-
Rails Does Not Define Your Application Architecture – http://naildrivin5.com/blog/2014/05/27/rails-does-not-define-your-application-architecture.html
-
Single Responsibility Principle on Rails Explained – http://solnic.eu/2012/07/09/single-responsibility-principle-on-rails-explained.html
-
Single Responsibility Principle and Rails – http://naildrivin5.com/blog/2012/06/10/single-responsibility-principle-and-rails.html
-
7 Patterns to Refactor Fat ActiveRecord Models – http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/
-
OOD Design in Rails, Yehuda Katz SO answer – http://stackoverflow.com/questions/1068558/oo-design-in-rails-where-to-put-stuff/1071510#1071510
-
Skinny Controllers, Skinny Models – https://robots.thoughtbot.com/skinny-controllers-skinny-models
-
How much should I refactor – https://robots.thoughtbot.com/how-much-should-i-refactor
-
Ruby Tapas – is a great screencast about Ruby by Avdi. The episodes on OO design that I can remember are: #329, #331, #332, #333, #335, #346.
-
Upcase – a learning service by thoughbot, has its repository open for subscribers. By checking their source code you can see a lot of the practices explained in the links above being used in a real application in a sensible and pragmatic way. Additionally, their videos on SOLID principles, OO patterns are also very good.
P.S.
If you know any resources that have been valuable to you, I’d be curious to know them as well.