{"id":6962,"date":"2021-07-28T12:29:24","date_gmt":"2021-07-28T12:29:24","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=6962"},"modified":"2021-07-28T12:30:01","modified_gmt":"2021-07-28T12:30:01","slug":"complete-referance-of-mvc-design-pattern","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/","title":{"rendered":"Complete Referance of MVC Design Pattern"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Model View Controller (MVC)<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>MVC<\/strong> is an architectural pattern that separates an application into three main logical components Model, View, and Controller.<br>Each of these component has their own role in a Project.<br><strong>MVC<\/strong> model was first introduced in 1987 in the Smalltalk programming language.<br>More than 80% of all web app frameworks rely on the Model View Controller architecture.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Model<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The model is responsible for getting data from a database, packaging it in data objects that can be understood by other components, and delivering those objects, most of which will happen in response to input from the controller.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">View<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It represents how data should be presented to the application user. User can read or write the data from view.<br>Basically it is responsible for showing end user content, we can say it is user interface.<br>It may consists of <strong>HTML, CSS, JS.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Controller<\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The user can send request by interacting with view, the controller handles these requests and sends to Model then get appropriate response from the Model, sends response to View.<br>It may also have required logics.<br>It works as a mediator between View and Model.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"923\" height=\"522\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png\" alt=\"\" class=\"wp-image-7155\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png 923w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17-300x170.png 300w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17-768x434.png 768w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Why use MVC?<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Organized Code<\/li><li>Independent Block<\/li><li>Reduces the complexity of web applications<\/li><li>Easy to Maintain<\/li><li>Easy to modify<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Basic Structure<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Assets<ul><li>CSS<\/li><li>Images<\/li><li>JS<\/li><\/ul><\/li><li>Config<ul><li>Database Config File<\/li><\/ul><\/li><li>Controllers<\/li><li>Model<\/li><li>Views<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Model View Controller (MVC) The MVC is an architectural pattern that separates an application into three main logical components Model, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5049,156],"tags":[5052,5699],"class_list":["post-6962","post","type-post","status-publish","format-standard","hentry","category-laravel","category-websites","tag-laravel","tag-mvc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Complete Referance of MVC Design Pattern - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Complete Referance of MVC Design Pattern - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Model View Controller (MVC) The MVC is an architectural pattern that separates an application into three main logical components Model, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-28T12:29:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-28T12:30:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png\" \/>\n<meta name=\"author\" content=\"Amardeep Dubey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amardeep Dubey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/\"},\"author\":{\"name\":\"Amardeep Dubey\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/097cf9059af187b39521d8641650ddda\"},\"headline\":\"Complete Referance of MVC Design Pattern\",\"datePublished\":\"2021-07-28T12:29:24+00:00\",\"dateModified\":\"2021-07-28T12:30:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/\"},\"wordCount\":225,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/image-17.png\",\"keywords\":[\"laravel\",\"mvc\"],\"articleSection\":[\"Laravel\",\"Websites\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/\",\"name\":\"Complete Referance of MVC Design Pattern - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/image-17.png\",\"datePublished\":\"2021-07-28T12:29:24+00:00\",\"dateModified\":\"2021-07-28T12:30:01+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/097cf9059af187b39521d8641650ddda\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/image-17.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/image-17.png\",\"width\":923,\"height\":522},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-referance-of-mvc-design-pattern\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Complete Referance of MVC Design Pattern\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/097cf9059af187b39521d8641650ddda\",\"name\":\"Amardeep Dubey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g\",\"caption\":\"Amardeep Dubey\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/amardeep\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Complete Referance of MVC Design Pattern - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/","og_locale":"en_US","og_type":"article","og_title":"Complete Referance of MVC Design Pattern - scmGalaxy","og_description":"Model View Controller (MVC) The MVC is an architectural pattern that separates an application into three main logical components Model, [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/","og_site_name":"scmGalaxy","article_published_time":"2021-07-28T12:29:24+00:00","article_modified_time":"2021-07-28T12:30:01+00:00","og_image":[{"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png","type":"","width":"","height":""}],"author":"Amardeep Dubey","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Amardeep Dubey","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/"},"author":{"name":"Amardeep Dubey","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/097cf9059af187b39521d8641650ddda"},"headline":"Complete Referance of MVC Design Pattern","datePublished":"2021-07-28T12:29:24+00:00","dateModified":"2021-07-28T12:30:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/"},"wordCount":225,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png","keywords":["laravel","mvc"],"articleSection":["Laravel","Websites"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/","name":"Complete Referance of MVC Design Pattern - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png","datePublished":"2021-07-28T12:29:24+00:00","dateModified":"2021-07-28T12:30:01+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/097cf9059af187b39521d8641650ddda"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/image-17.png","width":923,"height":522},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-referance-of-mvc-design-pattern\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Complete Referance of MVC Design Pattern"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/097cf9059af187b39521d8641650ddda","name":"Amardeep Dubey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g","caption":"Amardeep Dubey"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/amardeep\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=6962"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6962\/revisions"}],"predecessor-version":[{"id":7159,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6962\/revisions\/7159"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=6962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=6962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=6962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}