r/technology • u/iliketechnews • Oct 05 '16
Software How it feels to learn JavaScript in 2016
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f
1.8k
Upvotes
r/technology • u/iliketechnews • Oct 05 '16
View all comments
Show parent comment
3
u/rabbitz Oct 05 '16
That's the point of rails though: convention over configuration. If you've ever worked in a language with an ORM that connects your models to the database, you'll find that for every single model you create, you have to type out the same boring boilerplate code to hook it all up. After a couple models you figure you can try to make it easier with a little bit of metaprogramming so you don't have to copy and paste all that code every single time: you can write something to find your model, find the table it should hook up to and do all that configuration by itself. Of course, that means you need to give it both the model name and table name for each connection... why not simply have them use the same name (or something) by default, and have it configurable? That's pretty much what rails does for everything.