Search code examples
ruby-on-railsdjangoblack-box

Is it fair to accuse Rails of "magic"?


When I first started looking into Rails and Django I was steered away from Rails by Django developers who felt that Rails was a black box which uses an excess of "magic" (leaky abstractions). Upon exploring Rails further I wonder whether this is an uninformed assumption based on not knowing how to achieve customization in Rails without the use of scaffolding. Scaffolding by itself can seem to hide a lot but once you understand how to create a project without it, Rails seems to be as highly customizable as Django. Is this a misunderstanding on my part or on the part of Rails' 'magic' critics?


Solution

  • Rails makes extensive use of Ruby's metaprogramming facilities to do a lot of the grunt work for you, but there's no magic—in the end it's all just code and can be understood given enough time and effort.

    Scaffolding was always intended just as a way of getting up and running with performing CRUD operations on your models quickly. The intention was always that scaffolding should be replaced with your real production code.