{"id":5296,"date":"2013-11-19T05:11:27","date_gmt":"2013-11-18T18:11:27","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5296"},"modified":"2013-11-19T05:11:27","modified_gmt":"2013-11-18T18:11:27","slug":"php-mvc-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-mvc-primer-tutorial\/","title":{"rendered":"PHP MVC Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MVC\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP MVC Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MVC\/PHP_MVC_Primer.jpg\" title=\"PHP MVC Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">PHP MVC Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s tutorial creates an MVC website in PHP.   MVC stands for Model\/View\/Controller web design architecture methodology.   Even if you lack skills in the M[odel] bit of this software technique (and the experts recommend a &#8220;fat&#8221; M[odel] element to your design &#8230; guess we should be asking <a target=_blank title='You know who?' href='https:\/\/www.youtube.com\/channel\/HCLcE7mulHEGg'>you know who<\/a>, perhaps?)  In a previous relevant (for compare and contrast purposes) <a target=_blank href=\"#anmpt\">ASP.Net MVC Primer Tutorial<\/a> we saw MVC principles in action with another server-side language, ASP.Net, and perhaps you&#8217;d like to compare and contrast MVC on these two platforms?   With either platform, MVC has that great advantage for business that you can compartmentalize the work between the model, view and controller requirements, and have coders independent, yet together, developing websites effectively and efficiently.   Let&#8217;s see what Wikipedia says about MVC below.<\/p>\n<blockquote><p>Model\u2013view\u2013controller (MVC) is a software architecture pattern which separates the representation of information from the user&#8217;s interaction with it.[1][2] The model consists of application data, business rules, logic, and functions. A view can be any output representation of data, such as a chart or a diagram. Multiple views of the same data are possible, such as a bar chart for management and a tabular view for accountants. The controller mediates input, converting it to commands for the model or view.[3]<\/p><\/blockquote>\n<p>In the meantime enjoy this <a target=_blank title='PHP MVC Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/PHP\/MVC\/'>tutorial<\/a> showing you the great MVC methodology for the creation of PHP websites.<\/p>\n<p>Enjoy the tutorial, and see MVC-inspired downloadable PHP programming source codes below.<\/p>\n<ul>\n<li><a target=_blank title='mvc.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MVC\/mvc.php_GETME\">mvc.php<\/a> oversees &#8230;<\/li>\n<li><a target=_blank title='model.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MVC\/model.php_GETME\">model.php<\/a><\/li>\n<li><a target=_blank title='view.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MVC\/view.php_GETME\">view.php<\/a><\/li>\n<li><a target=_blank title='controller.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MVC\/controller.php_GETME\">controller.php<\/a><\/li>\n<\/ul>\n<p>Link to MVC <a target=_blank title='MVC information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Model%E2%80%93view%E2%80%93controller'>information<\/a> from Wikipedia (as per quote above).<\/p>\n<p>Will leave you with a good tutorial link about <a target=_blank title='MVC for PHP' href='http:\/\/www.sitepoint.com\/the-mvc-pattern-and-php-1\/'>MVC<\/a> for PHP.<\/p>\n<hr \/>\n<p id='anmpt'>Previous relevant (for compare and contrast purposes) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4381\">ASP.Net MVC Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"ASP.Net MVC Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/ASPNet_MVC_Primer-2of.jpg\" title=\"ASP.Net MVC Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">ASP.Net MVC Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s tutorial creates an MVC website in ASP.Net with Microsoft Visual Studio (2010 Express).   MVC stands for Model\/View\/Controller web design architecture methodology.   Even if you lack skills in the M[odel] bit of this software technique (and the experts recommend a &#8220;fat&#8221; M[odel] element to your design &#8230; guess we should be asking <a target=_blank title='You know who?' href='https:\/\/www.youtube.com\/channel\/HCLcE7mulHEGg'>you know who<\/a>, perhaps?) MVC can be great for ASP.Net projects involving websites involving users who log in (ie. membership websites), where you can have the whole registration\/forgot-password\/remember-me\/log-in\/log-out methods coded in seconds.   Let&#8217;s see what Wikipedia says about MVC below.<\/p>\n<blockquote><p>Model\u2013view\u2013controller (MVC) is a software architecture pattern which separates the representation of information from the user&#8217;s interaction with it.[1][2] The model consists of application data, business rules, logic, and functions. A view can be any output representation of data, such as a chart or a diagram. Multiple views of the same data are possible, such as a bar chart for management and a tabular view for accountants. The controller mediates input, converting it to commands for the model or view.[3]<\/p><\/blockquote>\n<p>In the meantime enjoy this <a target=_blank title='ASP.Net MVC Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/'>tutorial<\/a> showing you the great MVC methodology for the creation of ASP.Net websites using Microsoft Visual Studio (Express).<\/p>\n<p>Downloadable ASP.Net (VB.Net) Controller programming source code here for <a target=_blank title='HomeController.vb' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/HomeController.vb_GETME'>HomeController.vb<\/a> after changes and <a target=_blank title='HomeController.vb' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/HomeController.vb-GETME'>HomeController.vb<\/a> before changes (for your comparison).<\/p>\n<p>Downloadable ASP.Net configuration file here for <a target=_blank title='web.config' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Web.config_GETME'>Web.config<\/a> after changes and <a target=_blank title='Web.config' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Web.config-GETME'>Web.config<\/a> before changes (for your comparison).<\/p>\n<p>Downloadable ASP.Net Content programming CSS code here for <a target=_blank title='Site.css' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Site.css_GETME'>Site.css<\/a> after changes and <a target=_blank title='Site.css' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Site.css-GETME'>Site.css<\/a> before changes (for your comparison).<\/p>\n<p>Downloadable ASP.Net Content Master Page source code here for <a target=_blank title='Site.Master' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Site.Master_GETME'>Site.Master<\/a> after changes and <a target=_blank title='Site.Master' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Site.Master-GETME'>Site.Master<\/a> before changes (for your comparison).<\/p>\n<p>Downloadable ASP.Net View Page source code here for <a target=_blank title='Index.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Index.aspx_GETME'>Index.aspx<\/a> after changes and <a target=_blank title='Index.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Index.aspx-GETME'>Index.aspx<\/a> before changes (for your comparison).<\/p>\n<p>Downloadable ASP.Net View Page source code here for <a target=_blank title='About.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/About.aspx_GETME'>About.aspx<\/a> after changes and <a target=_blank title='About.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/About.aspx-GETME'>About.aspx<\/a> before changes (for your comparison).<\/p>\n<p>Downloadable ASP.Net View Page source code here for <a target=_blank title='Contact.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Contact.aspx_GETME'>Contact.aspx<\/a> as created for this tutorial (via copy and amend method).<\/p>\n<p>Downloadable ASP.Net View Page source code here for <a target=_blank title='Service.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Service.aspx_GETME'>Service.aspx<\/a> as created for this tutorial (via add new View method 1 of 2).<\/p>\n<p>Downloadable ASP.Net View Page source code here for <a target=_blank title='News.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/News.aspx_GETME'>News.aspx<\/a> as created for this tutorial (via copy and amend method).<\/p>\n<p>Downloadable ASP.Net View Page source code here for <a target=_blank title='Guestbook.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Guestbook.aspx_GETME'>Guestbook.aspx<\/a> as created for this tutorial (via add new View method 2 of 2).<\/p>\n<p>Downloadable ASP.Net View Page source code here for <a target=_blank title='Links.aspx' href='http:\/\/www.rjmprogramming.com.au\/ASPNet\/MVC\/Links.aspx_GETME'>Links.aspx<\/a> as created for this tutorial (via copy and amend method).<\/p>\n<p>Link to MVC <a target=_blank title='MVC information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Model%E2%80%93view%E2%80%93controller'>information<\/a> from Wikipedia (as per quote above).<\/p>\n<p>Will leave you with good Microsoft link about <a target=_blank title='MVC' href='http:\/\/www.asp.net\/mvc'>MVC<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d4381' onclick='var dv=document.getElementById(\"d4381\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=47\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d4381' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d5296' onclick='var dv=document.getElementById(\"d5296\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=MVC\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5296' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s tutorial creates an MVC website in PHP. MVC stands for Model\/View\/Controller web design architecture methodology. Even if you lack skills in the M[odel] bit of this software technique (and the experts recommend a &#8220;fat&#8221; M[odel] element to your design &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-mvc-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,33,37],"tags":[824,932,997,1166,1319,1421],"class_list":["post-5296","post","type-post","status-publish","format-standard","hentry","category-elearning","category-software","category-tutorials","tag-mvc","tag-php","tag-programming","tag-software-2","tag-tutorial","tag-website"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5296"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=5296"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5296\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=5296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=5296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=5296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}