Model–View–Controller (MVC) is an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user), from input and presentation (GUI), permitting independent development, testing and maintenance of each.
The model is the domain-specific representation of the data upon which the application operates. Domain logic adds meaning to raw data (for example, calculating whether today is the user...
more
Model–View–Controller (MVC) is an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user), from input and presentation (GUI), permitting independent development, testing and maintenance of each.
The model is the domain-specific representation of the data upon which the application operates. Domain logic adds meaning to raw data (for example, calculating whether today is the user's birthday, or the totals, taxes, and shipping charges for shopping cart items). When a model changes its state, it notifies its associated views so they can refresh.
Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the model. Models are not data access objects; however, in very simple apps that have little domain logic there is no real distinction to be made. Also, the ActiveRecord is an...
less