Little more about MVC
It’s worth mentioning MVC (Model View Controller) because it can be one of the factors that discourages people from trying frameworks like Rails. It is rather an advanced way of programming most famous architectural style.
Lets see them in brief
Model – The model layer is where you define classes for the data your application will use/store. For instance, if you want to store posts for a blog, you will have a “Post” model. The model has the capability to interact with the database, to retrieve and store data. This functionality is gained by inheriting it from the Active Record super class. Any methods, which act upon this data, should also be placed in the model.
View – The view layer has one main purpose to return the relevant HTML to be rendered on the users browser. In Rail a view is held in an erb (Embedded Ruby) file, which contains both HTML and embedded Ruby statements.
Controller – Without the controller, nothing would happen. The controller interacts with the model to retrieve and store data. It will then pass any data, acquired from the model, to the view. The view returns the resulting HTML to the controller and the controller sends this back to the users browser.
Read more – Create a Blog Using Ruby on Rails