|Posted by Rq Bukhari on January 24, 2012 at 6:55 AM|
MVC architecture is a software architecture used in software engineering. Ruby on rails uses MVC (Model, View, Controller) architecture. The MVC architecture of ruby on rails make it easy to keep the code DRY and makes clear where different types of code belongs. This makes the maintenance of code easy.
DRY is a principal of ruby on rails web development that suggest to not repeat a code again and again. DRY is "Don't Repeat Yourself" which means repeating same code again and again is a bad thing.
Model represents the information of application. A model corresponds to a table in the database. It defines the rules to manipulate data.
Views are the user interface of application. Views provides data to the web browsers and other tools that are used to make request from an application. Views are the HTML file with embedded ruby code.
Controllers receives the user input. In ruby on rails controllers are responsible for processing the incoming requests of the web browsers and other tools, interrogating the models for required data and passing the data to views for presentation.
This is a short explanation of MVC architecture. To study ruby on rails and MVC Architecture Click here.