H
H
HaruAtari2015-04-18 22:11:15
Ruby on Rails
HaruAtari, 2015-04-18 22:11:15

What is the convenience of developing on ROR?

Good afternoon.
I constantly hear that developing on rails is a pleasure. Like fast, beautiful, convenient. For the sake of interest at the weekend, I read the docks on ruby ​​and rails. I sat down and wrote a simple application - a standard blog (articles + sections + comments).
To be honest, I did not notice anything pleasant. I got the impression that the whole language is tied to strings. Symbols are used around and a lot of magic. The same links in AR are indicated simply by a symbol. I understand that there are a lot of ready-made solutions for all occasions in the form of gems. There are cool generators. But there are no elementary things: type checks, auto-completion of fields in models due to the fact that they are simply not indicated there.
Apparently, I just don't know how to cook it. Either I'm trying to use it for other purposes, or the wrong approach.
Please tell me what am I doing wrong? Where can I find a sensible explanation of the philosophy of working with this language/framework? I would like to have a list of what needs to be dealt with in order to understand the beauty of this tool.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
J
Jeiwan, 2015-04-19
@HaruAtari

First, Rails is just Ruby. All the virtues of Rails flow from the virtues of Rubey. Ruby has a pretty good API, which contains solutions for most routine programming tasks - this is very convenient.
Secondly, Rails is a set of well designed gems. Don't like something? You can discard or replace. No one is forcing you to use all Rails components.
Thirdly, Rails is a good example of Ruby's OOP capabilities.
Fourth, convention over configuration. Beginners call it magic, but for a more or less experienced ruby ​​programmer, there is no magic in it. And thanks to this approach, again, it was possible to save the programmer from the constant routine performance of the same "operational" tasks. Another example that demonstrates this principle is Backbone and Angular: in Backbone you need to solve a lot of routine tasks (not even solve them, since these are primitive tasks, but simply prescribe them each time) yourself, and in Angular these tasks have already been solved.
Fifth, Rails is a mature tool for solving web development problems. It has long since left the hipster stage, and with it a large number of people who are attracted only by fashionable, well-known technologies have left. Rails (like Ruby) is still evolving and is not going to die.
Sixth, the aesthetics and conciseness of Ruby. Personally, I don't see any point in extra quotes, parentheses, semicolons. There is no reason to visually clog the code with minor elements. Programming languages ​​are gradually becoming more social, more accessible to people - and rightly so.
But it's all a matter of taste, to a greater extent. You have already developed your own vision of programming languages, now it seems to you that the absence of types is a drawback. Personally, I think this is wrong. This is the same situation as when you start doing something (play the guitar, for example) and initially do something wrong (setting fingers), then this bad habit is fixed in you and then prevents you from further developing. It becomes difficult for you to relearn something else, since you are already very used to this, the wrong way. I'm not saying that strong typing is wrong, no, it's something else. There are different programming paradigms, there are different approaches to programming, and a good programmer should master them (well, strive to do so) and not put any of them at the forefront. The main thing is not what language, but what can be done in it,

M
Maxim Kudryavtsev, 2015-04-18
@kumaxim

First and most importantly, Ruby code is much easier to read, compared to the same PHP.
Second , in Ruby everything, everything in general, is an object, hence the advanced polyformism.
Thirdly , some of the GoF patterns are already implemented at the language level, for example, the same procedures (proc) and lambdas (the Template Method pattern, if it is for them)
And then there are a lot of little things that just make it easier to read the code. From the examples " if(a !== b) { ... } " vs. " unless a == b { ... } " The first snippet is in php, the second is in ruby. They do the same thing - they perform the operation if "a" is not equal to "b", but the second case is easier to read, in my opinion. And there are a lot of such little things in the language ...
which I think is pretty good. Good for learning the language. It was enough for me to fall in love with Ruby. Compared to PHP, I think that Ruby is more convenient and prefer it.

V
Viktor Vsk, 2015-04-18
@viktorvsk

Convenience is expressed in the presence of a standard solution for almost all occasions with good documentation. Due to, as you have already noticed: conventions, gems and standard workflow (generators, assets, deploy, migrations, console...)
But, of course, you need to understand that each tool is for its own task. Make a Blozhik in PHP, a warehouse accounting system in Java, face recognition for academic purposes - in python, in industrial ones - in pluses.
And all this stuff about characters, strings and syntax is all irrelevant bullshit.
Want to see rail convenience? Find a start-up with investments and flexible requirements at the initial stage, where significant work is needed on the back-end and front-end at the same time.

C
caution, 2015-04-19
@caution

It is not very clear what confuses you with the symbols in the links? You need to understand that relationships are primarily implemented at the database level, and symbols in models are ORM elements, and why type validation in a language with dynamic typing?
1) you should understand what, what is ORM.
2) understand how Ruby works.
3) understand how MVC frameworks work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question