• Syntactically, Ruby is quite distinctive and bears little resemblance to other programming languages. It's a little annoying at first, but over time you realize that this was done for a reason, and if everything were different, there would be internal contradictions in Ruby.

     

    The language closest in spirit is Python, and version 3. Next come PHP and Perl, and in general all interpreted dynamic programming languages that are popular in web development.

     

    However, when switching from another language, in any case, you will have to rethink each syntactic construction.


    votre commentaire
  • There are dozens of such rules - some are even difficult to keep in mind, so the RuboCop Ruby Style Guide gem was developed and even automated in the form of a gem. The rules in this guide are intended to make the code as readable and as compact as possible from the point of view of the Ruby community.

     

    At first, ignorance of the community conventions can be difficult for the developer, and code reviews are initially required to achieve good style.


    votre commentaire
  • A common problem in many projects is the inability to control the structure of the database using understandable means and tools. Changes to the structure are often made manually and directly into the database. Because of this, numerous incomprehensible fields and tables appear in the project, about which no one remembers anything. Ruby on Rails has standard database tools - "migrations". The database structure is stored in the application code and configured from the project. Your structure will always be in the repository, any change in the structure will be documented and linked to a specific commit in the repository.

     

    Safety

     

    Ruby on Rails is heavily tuned for project security by default. When using RoR tools, SQL injections and XSS attacks are excluded. All input parameters are escaped by default. Inferred variables in templates are also escaped unless you specify the reverse option. There is no chance for a developer to make security mistakes (not without exceptions, of course).


    votre commentaire
  •  

     

    Ruby on rails has some great tools that allow you to validate incoming data. Your users are filling out forms and you need to check if they entered the correct email address, if they have a password, or if they need a minimum login length—the Rails tools will help you with this.

     

    Routing (beautiful urls or CNC)

     

    Often in many PHP projects, we can see a picture when the address of a certain page is huge and incomprehensible. Ruby on Rails has a regular ability to flexibly customize your routing, address type, and the names of the main sections. It is possible to quickly change addresses in one place without having to change that address throughout the project. The REST ideology is actively used in the RoR developer community. Page addresses in Ruby on Rails projects are always clear, beautiful, perfectly understood by search engines, and simple.


    votre commentaire



    Suivre le flux RSS des articles
    Suivre le flux RSS des commentaires