{"id":8128,"date":"2013-03-08T13:23:24","date_gmt":"2013-03-08T07:53:24","guid":{"rendered":"https:\/\/2thenew.today\/blog\/?p=8128"},"modified":"2016-12-19T14:50:34","modified_gmt":"2016-12-19T09:20:34","slug":"magento-mvc-architecture-flow","status":"publish","type":"post","link":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/","title":{"rendered":"Magento MVC Architecture &amp; Flow"},"content":{"rendered":"<p>There are many systems in PHP that follows MVC\u00a0 (Model-View-Controller) architecture.\u00a0\u00a0 It is a robust design pattern that separates data access, business logic and user interface code.<\/p>\n<p>A typical MVC concept,<\/p>\n<p><strong> <\/strong><\/p>\n<p><strong>Model:<\/strong> consists of application data and business rules.\u00a0 It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d folder of each module in any code pool be it core, local or community.<\/p>\n<p><strong>Controller:<\/strong> mediates input, converting it to commands for the model. These files decides action between model and view files. They can be found under \u201ccontrollers\u201d folder of each module in core, local or community code pool.<\/p>\n<p><strong>View:<\/strong> output representation of data like rendered HTML. In Magento, these files resides under template at app\/design and have .phtml extension. These files have combination of PHP and HTML code as well as $this object to refer to Model for data structure.<\/p>\n<p>But Magento is based on more abstract MVC\u00a0 pattern. Refer the below diagram<\/p>\n<p><strong>Description:<\/strong><\/p>\n<ol>\n<li>URL is taken by a single PHP file and Magento application is instantiated<\/li>\n<li>Application instantiate Front Controller Object<\/li>\n<li>Front Controller instantiate Routers<\/li>\n<li>Routers check URL and determines Controller and Actions<\/li>\n<li>Action Methods manipulate Models<\/li>\n<li>Action loads layout and kicks off rendering<\/li>\n<li>Templates, via Blocks, read from Models<\/li>\n<li>Blocks and Child Blocks render into HTML page<\/li>\n<\/ol>\n<p><strong>Note:<\/strong> Unlike other MVC patters, Magento Blocks refer to the Models for their data as Action Controller does not pass them data structure.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many systems in PHP that follows MVC\u00a0 (Model-View-Controller) architecture.\u00a0\u00a0 It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules.\u00a0 It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d [&hellip;]<\/p>\n","protected":false},"author":59,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":8,"footnotes":""},"categories":[1],"tags":[1040,1038,1039],"class_list":["post-8128","post","type-post","status-publish","format-standard","hentry","category-technology","tag-magento-flow","tag-magento-mvc-architecture","tag-magento-mvc-flow"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"shahid\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Magento MVC Architecture &amp; Flow | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Magento MVC Architecture &amp; Flow | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#article\",\"name\":\"Magento MVC Architecture & Flow | TO THE NEW Blog\",\"headline\":\"Magento MVC Architecture &amp; Flow\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shahid\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2013-03-08T13:23:24+05:30\",\"dateModified\":\"2016-12-19T14:50:34+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#webpage\"},\"articleSection\":\"Technology, Magento Flow, Magento MVC Architecture, Magento MVC Flow\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#listItem\",\"name\":\"Magento MVC Architecture &amp; Flow\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#listItem\",\"position\":3,\"name\":\"Magento MVC Architecture &amp; Flow\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shahid\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shahid\\\/\",\"name\":\"shahid\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51388ad58ef8d22389c1d4b77b0b7a98f3392286f525a9c3d42f1ef8d4642968?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"shahid\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/\",\"name\":\"Magento MVC Architecture & Flow | TO THE NEW Blog\",\"description\":\"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \\u201cModel\\u201d\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/magento-mvc-architecture-flow\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shahid\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shahid\\\/#author\"},\"datePublished\":\"2013-03-08T13:23:24+05:30\",\"dateModified\":\"2016-12-19T14:50:34+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Magento MVC Architecture & Flow | TO THE NEW Blog","description":"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d","canonical_url":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#article","name":"Magento MVC Architecture & Flow | TO THE NEW Blog","headline":"Magento MVC Architecture &amp; Flow","author":{"@id":"https:\/\/2thenew.today\/blog\/author\/shahid\/#author"},"publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"},"datePublished":"2013-03-08T13:23:24+05:30","dateModified":"2016-12-19T14:50:34+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#webpage"},"articleSection":"Technology, Magento Flow, Magento MVC Architecture, Magento MVC Flow"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.today\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/2thenew.today\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#listItem","name":"Magento MVC Architecture &amp; Flow"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#listItem","position":3,"name":"Magento MVC Architecture &amp; Flow","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.today\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.today\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.today\/blog\/author\/shahid\/#author","url":"https:\/\/2thenew.today\/blog\/author\/shahid\/","name":"shahid","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/51388ad58ef8d22389c1d4b77b0b7a98f3392286f525a9c3d42f1ef8d4642968?s=96&d=mm&r=g","width":96,"height":96,"caption":"shahid"}},{"@type":"WebPage","@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#webpage","url":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/","name":"Magento MVC Architecture & Flow | TO THE NEW Blog","description":"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.today\/blog\/author\/shahid\/#author"},"creator":{"@id":"https:\/\/2thenew.today\/blog\/author\/shahid\/#author"},"datePublished":"2013-03-08T13:23:24+05:30","dateModified":"2016-12-19T14:50:34+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.today\/blog\/#website","url":"https:\/\/2thenew.today\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Magento MVC Architecture &amp; Flow | TO THE NEW Blog","og:description":"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d","og:url":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/","og:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Magento MVC Architecture &amp; Flow | TO THE NEW Blog","twitter:description":"There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under \u201cModel\u201d","twitter:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"8128","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:09:01","updated":"2024-02-29 10:54:24","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMagento MVC Architecture &amp; Flow\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.today\/blog"},{"label":"Technology","link":"https:\/\/2thenew.today\/blog\/category\/technology\/"},{"label":"Magento MVC Architecture &amp; Flow","link":"https:\/\/2thenew.today\/blog\/magento-mvc-architecture-flow\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/8128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/users\/59"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/comments?post=8128"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/8128\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/media?parent=8128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/categories?post=8128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/tags?post=8128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}