Introduction To Ruby On Rails MVC Framework

Ruby on rails is a framework for developing web applications based on ruby programming language.  Ruby is not only used for web application development but also for various other native applications. Ruby is purely object oriented and it make programming lots more easier using the oops concepts. Ruby has the same syntax like python, perl, list etc,,.So if you have worked on python you would learn ruby pretty quickly. Ruby on rails on the other-hand is not a programming language but a opensource framework created in ruby to develop awesome ruby based web applications so quickly when compared to other languages and frameworks. It a developer friendly framework and , it does a lot of work for you by creating codes using codes. It will confuse you a little bit, but we will get to that in the later part of this article.

What is a Framework:

A framework is a software toolkit with prewritten code libraries and datas organized in structures , which helps you in developing applications. Ruby on rails framework is based on MVC architecture. So what the heck is a MVC architecture. To put it in a simple way. MVC pattern is a way to deveop an applcation in a  organized and secure way.

MVC Framework: 

MVC stands for model, view and controller.
Model: It contains the data. All the data’s associated with the application are contained by model.

View: View is the web UI of the application where the user submits the requests and view contents of the application.

Controller: Controller is the integral part of the MVC architecture. Controller handles the incoming user requests from the UI and process it according to the needs. If the request is to update or delete any data from the database , the controller will process the request accordingly by sending appropriate requests to the database.

If we take the traditional web applications, the view and the controller are bundled together. when a user creates a request for some data, the code that is bundled with the UI will process the request and connect to the database based on user needs. But in MVC the UI, business logic and data are seperated.

NonMVC model:

MVC model:



Other Interesting Blogs

Leave a Comment

Share via
Copy link
Powered by Social Snap