What is the Model-View-Controller Pattern (MVC)?
The MVC design pattern is used to separate the following concerns of an application: Model: Application data, including validation rules View: The way data is presented to the end user Controller: The way a user manipulates the data within the model This pattern has become popular for Web application development, but it has existed for much longer. Implementations of the pattern have been refined over time and products have been developed to implement it as a framework. You can use Java projects such as Struts and Hibernate to develop applications that leverage the MVC architecture. In the Rails framework, ActiveRecord deals with Model concerns. It maps database tables to Ruby objects and provides many other features, including a way to easily access data, represent and traverse relationships between tables, validate data, and get data summaries. It also lets you use straight SQL when desired. The ActionController coordinates interactions between the View and Model layers (letting user