DEV Community

David Boureau
David Boureau

Posted on • Originally published at alsohelp.com

Rails philosophy explained with drawings

Article originally published here : https://alsohelp.com/blog/rails-philosophy-explained-with-drawings

The SVGs do not appear correctly here on dev.to, so I suggest the article above.

Text below :


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.

Top comments (0)