
· rails · 2 min read
The Rails philosophy explained with drawings
It's not easy to understand why Rails was built like this, especially for beginners. I hope my little SVG drawings will help
In the NextJS era, there’s a lot of difficulty for junior developers to understand the MVC model, so plain old Rails, Laravel or Django may looks weird.
Rails itself has a special doctrine, that I would advise to read before to dive into the framework, because you may not understand the design choice along the way if you don’t deeply understand its philosophy.
Now here how I would draw it.
Rails values on deep integrated system, so your codebase may look like this :
- gray zone = energy spend to write code
- circle = one layer of your app (M, V or C for example)
As you can see, each circle is not completely independant of each other.
That means less code written at the end of the journey.
A cleaner architecture would be as follow :
- gray zone = energy spend to write code
- circle = one layer of your app (M, V or C for example)
- green zone = energy spend to write boundaries code
Which leads to
- more time spend on the gray zone
- new time dedicated to write an maintain boundaries between zone
So is Rails 100% “clean” ? Maybe not for everybody.
Is Rails less energy spent? Less money spent? Less mental workload?
Yes.