Ruby on Rails is a framework based on Ruby programming language, it is mainly used for web development. what do you need to know about it? Photo by on Helloquence Unsplash This framework uses model view controller architecture, which makes easy many aspects when developing the web, however, as many people know or if you do not know it, this architecture focuses the views on the front end development, the Html, CSS, JS, bootstrap, and preprocessors like SASS and CoffeeScript. The controllers focus on the website’s logic, interacting with views and models, and models focus on the data to be stored on the database. On rails, we can create controllers, models, and views with the command line or manually. The next two commands show how to create a model and a controller. $rails model model-name $rails controller controller-name generate generate When we create a controller, it automatically creates an empty view folder called the same way. It is possible to define or add methods in the same command as it is shown on the next command, where we create a controller called homes. . which creates the methods and in the controller’s class, at the same time it creates the routes, the views and in the folder . $rails generate controller Homes contact info contact info contact, info app/views/homes/ The second and third lines, on the picture above, are routes generated automatically, they are usually used on the browser, to tell the controller to do a specific task or to show us a specific view; there are some other ways to use them, but this article is not focused on routes. There is one important command, $rails scaffold name generate parameter this command is really useful to create a restful controller, it means it has the methods and At the same time, it creates the views, index, new, show, edit, the model, the migration with the parameters listed at the end of the command, and resources routes. index, new, edit, show, create, update, destroy. The example above generates the Posts controller, the Post model, the migration with the attributes string type, and text type. title body Migration Migration is a file that stores the tables information, parameters and associations to be migrated to the database. So it saves us time on creating and setting up a database with its tables. it does the dirty job for us. When the migration is ready and we want to migrate it, we just type db:migrate $rails One of the first things you want to do is to see how the app is working on the browser, for this purpose you can use the command or which launches the server by default on the port 3000 but if you want to use a different port you can add and the new port number, $rails server $rails s, -p -p 4000 $rails server When you want to test your app starting with the model, migration, and database, without taking into account neither controllers nor views. Rails console command will help you to test it on the console, in which you can create objects, save then on the database and retrieve them with associations or any test you want to do related to back-end. A good command when you create a new rail app and you want to specify the type of databases you want to use it is the next one: $ rails . - - =postgresql new database or new . - =mysql $rails -database Which generates some lines on the file , setting up the chosen database type. config/database.yml In general terms, I can say that ruby on rails is an excellent framework to work with, of course, you can find more frameworks based on different programming languages, like Laravel which is based on PHP; in my opinion, I have found easier to work with rails, but the logic is about the same, so when you master a framework like this one, it would be easy to learn a new one. Previously published at https://medium.com/@javiercaliescali/what-you-need-to-know-about-ruby-on-rails-to-start-your-first-app-417c00f32d94