I think I first learned about Model-View-Controller (MVC) when I was taking a Java class at the University of North Carolina. My professor had a background in Smalltalk, an object oriented language in which the MVC pattern was first developed. The MVC pattern describes a practice of separating the business objects (the model), presentation (the view), and the code that responds to user input (the controller). Or, as Steve Burbeck wrote in a seminal article on the subject:
"In the MVC paradigm the user input, the modeling of the external world, and the visual feedback to the user are explicitly separated and handled by three types of object, each specialized for its task. The view manages the graphical and/or textual output to the portion of the bitmapped display that is allocated to its application. The controller interprets the mouse and keyboard inputs from the user, commanding the model and/or the view to change as appropriate. Finally, the model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller)." (Applications Programming in Smalltalk-80: How to use Model-View-Controller by Steve Burbeck)
When I started developing web applications professionaly (using Java) I did not really understand how to apply this pattern -- nor were there any frameworks available that I knew about (this was before JavaServer Pages). The first application I built was an online store in which I wrote all the code in one servlet. At least I knew enough to create a simple template system so that the static HTML was read from a file and only the dynamic parts were written out in the code. I soon started programming more object-orientedly by creating classes to model entitities and using the command pattern to process requests. I realized that I needed to do a better job separating the presentation from the business logic. When I discovered Struts, an MVC framework for Java, I decided that I would try that out in my next project. But just as I was starting to figure Struts out, I took a job at Elon University where everything was Microsoft. At Elon all the code I dealt with was in classic ASP, and given my Java background and Elon's investment in Microsoft technologies, it was logical to migrate to ASP.NET using C#.
ASP.NET is basically a framework for making web application development RAD-like, so that web apps can be developed like classic Visual Basic applications where one drops some controls into a form and wires up their events to some actions. How does this differ from MVC? After all, one of the big advantages of ASP.NET web forms over classic ASP is that the programming logic is put in a separate code-behind file. In a sense, the code-behind, which handles the events triggered on the web form, acts like a controller. It is then up to the developer to create models, either by defining custom classes (which is what I usually do) or by using data objects from the .Net library (e.g. Datagrids). This is definately a major improvement over classic ASP. However, if ASP.NET web forms truly use MVC, then I doubt that Scott Guthrie, product manager for ASP.NET at Microsoft, would have announced the ASP.NET MVC Framework at ALT.NET conference.
I am looking forward to trying out the ASP.NET MVC Framework when they release the first preview early next year. In the meantime, I have been trying out the Zend Framework for PHP which makes use of the MVC pattern. I have not done much PHP programming -- mostly in school over 8 years ago, and have generally viewed it in the same light as classic ASP -- but I have to say I am impressed with the Zend frameword and plan to use it to develop Insipe.com, a side project I am starting to work on. I found Mitchell Hashimoto's Zend Framework Tutorials to be very useful in getting started with it and the Zend Reference Guide is very good for learning the details of the framework.