{"id":139,"date":"2009-08-01T12:40:27","date_gmt":"2009-08-01T07:10:27","guid":{"rendered":"http:\/\/ksblog.teaduniya.com\/?p=139"},"modified":"2009-08-01T12:40:47","modified_gmt":"2009-08-01T07:10:47","slug":"model-view-controller-pattern-solution-to-the-coding-horror","status":"publish","type":"post","link":"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/","title":{"rendered":"Model View Controller pattern, solution to the coding horror"},"content":{"rendered":"<p>Model View Controller or MVC, the classic architectural pattern is typically used in software application to successfully isolate the business logic from the user interface. Productive application of this classic design pattern indeed permits one application to be freely modified without affecting the other.<\/p>\n<p>MVC in software engineering is therefore used adequately to maintain the multiple views of the same data. The Model View Controller pattern hinges on a successful and clean separation of objects whilst dividing into three distinct categories like,\u00a0 models for maintaining data, views for displaying portion or the entire data, and controllers for handling events that affect the model or views.<\/p>\n<p>This separation further helps the multiple views as well as the controller to interface within the same model without even changing the model design.<\/p>\n<p>MVC, invented by the Smalltalk programmer Trygve Reenskaug, ensured the beginning of a new pathway in software engineering while guaranteeing a solution for coding horror. Model View Controller pattern is thus both an architectural pattern and design pattern however the outcome differs in regard to its usage.<\/p>\n<p><strong>How it works <\/strong><\/p>\n<p>The way the MVC works is simple. The user request is interpreted by the controller, which determines the portion of the views and model to call. Even at times when the controller changes a model\u2019s data or properties, all dependent views are updated automatically. Similarly, whenever a controller changes a view, the view\u00a0 generates the\u00a0 data from the underlying model to refresh itself.<\/p>\n<p><strong>Why you should MVC<\/strong><\/p>\n<ul>\n<li>The first reason why you should MVC is, because of the ability to have multiple views that rely upon a single model.<\/li>\n<\/ul>\n<ul>\n<li>Because MVC pattern returns data without any formatting therefore the same components can be used and called for use with any interface.<\/li>\n<\/ul>\n<ul>\n<li> MVC pattern allows changing your data layer or business rules. You just need to alter your model if you wish to change your data layer.<\/li>\n<\/ul>\n<ul>\n<li> MVC pattern makes you build well-defined interfaces and self-contained components.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Model View Controller or MVC, the classic architectural pattern is typically used in software application to successfully isolate the business logic from the user interface. Productive application of this classic design pattern indeed permits one application to be freely modified without affecting the other. MVC in software engineering is therefore used adequately to maintain the<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[34],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-aspnet-sql-server","tag-mvc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Model View Controller pattern, solution to the coding horror &#8211; Karmick Solutions Blog<\/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:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Model View Controller pattern, solution to the coding horror &#8211; Karmick Solutions Blog\" \/>\n<meta property=\"og:description\" content=\"Model View Controller or MVC, the classic architectural pattern is typically used in software application to successfully isolate the business logic from the user interface. Productive application of this classic design pattern indeed permits one application to be freely modified without affecting the other. MVC in software engineering is therefore used adequately to maintain the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/\" \/>\n<meta property=\"og:site_name\" content=\"Karmick Solutions Blog\" \/>\n<meta property=\"article:published_time\" content=\"2009-08-01T07:10:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2009-08-01T07:10:47+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/\",\"url\":\"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/\",\"name\":\"Model View Controller pattern, solution to the coding horror &#8211; Karmick Solutions Blog\",\"isPartOf\":{\"@id\":\"https:\/\/karmicksolutions.com\/blog\/#website\"},\"datePublished\":\"2009-08-01T07:10:27+00:00\",\"dateModified\":\"2009-08-01T07:10:47+00:00\",\"author\":{\"@id\":\"https:\/\/karmicksolutions.com\/blog\/#\/schema\/person\/cf5a770829ddb81d1ca17198eb2ef6e5\"},\"breadcrumb\":{\"@id\":\"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/karmicksolutions.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Model View Controller pattern, solution to the coding horror\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/karmicksolutions.com\/blog\/#website\",\"url\":\"https:\/\/karmicksolutions.com\/blog\/\",\"name\":\"Karmick Solutions Blog\",\"description\":\"Technology meets perfection\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/karmicksolutions.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/karmicksolutions.com\/blog\/#\/schema\/person\/cf5a770829ddb81d1ca17198eb2ef6e5\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/karmicksolutions.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5d4d449754b9b7d52189c88a44ed708d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5d4d449754b9b7d52189c88a44ed708d?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/www.karmicksolutions.com\"],\"url\":\"https:\/\/karmicksolutions.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Model View Controller pattern, solution to the coding horror &#8211; Karmick Solutions Blog","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:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/","og_locale":"en_US","og_type":"article","og_title":"Model View Controller pattern, solution to the coding horror &#8211; Karmick Solutions Blog","og_description":"Model View Controller or MVC, the classic architectural pattern is typically used in software application to successfully isolate the business logic from the user interface. Productive application of this classic design pattern indeed permits one application to be freely modified without affecting the other. MVC in software engineering is therefore used adequately to maintain the","og_url":"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/","og_site_name":"Karmick Solutions Blog","article_published_time":"2009-08-01T07:10:27+00:00","article_modified_time":"2009-08-01T07:10:47+00:00","author":"admin","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/","url":"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/","name":"Model View Controller pattern, solution to the coding horror &#8211; Karmick Solutions Blog","isPartOf":{"@id":"https:\/\/karmicksolutions.com\/blog\/#website"},"datePublished":"2009-08-01T07:10:27+00:00","dateModified":"2009-08-01T07:10:47+00:00","author":{"@id":"https:\/\/karmicksolutions.com\/blog\/#\/schema\/person\/cf5a770829ddb81d1ca17198eb2ef6e5"},"breadcrumb":{"@id":"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/karmicksolutions.com\/blog\/model-view-controller-pattern-solution-to-the-coding-horror\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/karmicksolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Model View Controller pattern, solution to the coding horror"}]},{"@type":"WebSite","@id":"https:\/\/karmicksolutions.com\/blog\/#website","url":"https:\/\/karmicksolutions.com\/blog\/","name":"Karmick Solutions Blog","description":"Technology meets perfection","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/karmicksolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/karmicksolutions.com\/blog\/#\/schema\/person\/cf5a770829ddb81d1ca17198eb2ef6e5","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/karmicksolutions.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5d4d449754b9b7d52189c88a44ed708d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5d4d449754b9b7d52189c88a44ed708d?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/www.karmicksolutions.com"],"url":"https:\/\/karmicksolutions.com\/blog\/author\/admin\/"}]}},"fimg_url":"https:\/\/karmicksolutions.com\/blog\/wp-content\/themes\/karmickblog\/assets\/frontend\/images\/no-image.jpg","formated_date":"August 01st, 2009","plain_excerpt":"Model View Controller or MVC, the classic architectural pattern is typically used in software application to successfully isolate the business logic from the user interface. Productive application of this classic design pattern indeed permits one application to be freely modified without affecting the other. MVC in software engineering is therefore used adequately to maintain the","custom_feature_img":null,"_links":{"self":[{"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":2,"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/karmicksolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}