What is MVC in Ruby on Rails?

后端 未结 8 1668
情深已故
情深已故 2020-12-02 09:06

Could someone please explain MVC to me in Ruby on Rails, in layman terms. I am especially interested in understanding the Model in MVC (can\'t get my head around the model).

8条回答
  •  情深已故
    2020-12-02 09:28

    enter image description here

    MVC basically indicates Model-View-Controller. And MVC used by many languages like PHP, Perl, Python etc. Generally MVC works like this:

    Request first comes to the controller, controller finds and appropriate view and interacts with model, model interacts with your database and send the response to controller then controller based on the response give the output parameter to view.

提交回复
热议问题