{"id":101,"date":"2010-03-16T10:20:17","date_gmt":"2010-03-16T10:20:17","guid":{"rendered":"http:\/\/www.encoders.co.in\/blog\/?p=101"},"modified":"2010-03-16T10:20:57","modified_gmt":"2010-03-16T10:20:57","slug":"model-value-controller","status":"publish","type":"post","link":"https:\/\/www.encoders.co.in\/blog\/web-designing\/model-value-controller","title":{"rendered":"MODEL VIEW CONTROLLER"},"content":{"rendered":"<p><!-- \t\t@page { size: 21cm 29.7cm; margin: 2cm } \t\tP { margin-bottom: 0.21cm } -->Model-view-controller is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the Model represents the information of the application and the business rules used to manipulate the data, the View corresponds to elements of the user interface such as text, checkbox items, and so forth, and the Controller manages details involving the communication to the model of user actions such as keystrokes and mouse movements.<br \/>\nIt is common to split an application into separate layers: presentation (UI), domain logic, and data access. In MVC the presentation layer is further separated into view and controller. MVC encompasses more of the architecture of an application than is typical for a design pattern.<br \/>\nModel<\/p>\n<p><a href=\"http:\/\/www.encoders.co.in\/blog\/wp-content\/uploads\/2010\/03\/Model.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-102\" title=\"Model\" src=\"http:\/\/www.encoders.co.in\/blog\/wp-content\/uploads\/2010\/03\/Model.jpg\" alt=\"\" width=\"495\" height=\"300\" srcset=\"https:\/\/www.encoders.co.in\/blog\/wp-content\/uploads\/2010\/03\/Model.jpg 495w, https:\/\/www.encoders.co.in\/blog\/wp-content\/uploads\/2010\/03\/Model-300x181.jpg 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/a><br \/>\nThe domain-specific representation of the information on which the application operates. Domain logic adds meaning to raw data (e.g., calculating if today is the user\u2019s birthday, or the totals, taxes, and shipping charges for shopping cart items).<br \/>\nMany 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.<br \/>\nView<br \/>\nRenders the model into a form suitable for interaction, typically a user interface element. Multiple views can exist for a single model for different purposes.<br \/>\nController<br \/>\nProcesses and responds to events, typically user actions, and may invoke changes on the model.<\/p>\n<p>MVC is often seen in web applications, where the view is the actual HTML page, and the controller is the code that gathers dynamic data and generates the content within the HTML. Finally, the model is represented by the actual content, usually stored in a database or XML files, and the business rules that transform that content based on user actions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Model-view-controller is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-web-designing"],"_links":{"self":[{"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":3,"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":105,"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions\/105"}],"wp:attachment":[{"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.encoders.co.in\/blog\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}