Newsletter

Model View Controller (MVC)

Why is MVC important? Because it is the programming approach for Androids, iPhones, and now Microsoft.

Our first experience with dynamic website development was in 1999. Microsoft created .asp which is now considered "Classic ASP". Asp stands for Active Server Pages. This allowed programmers to create websites that displayed dynamic content based on the user input. The code was considered "Spaghetti Code" because each web page was a combination of static web content that didn't change and the dynamic content that was generated on the fly.

In 2003, Microsoft came out with the first version of .Net. This provided alot more coding tools for programmers but was very buggy. Fortunately, the 2005 version of Microsoft Visual Studio came out along with a newer version of the .Net framework. The page extension changed from .asp to .aspx.  The .aspx web page sites are considered FORM based pages. That means that there is one master FORM that all the pages are built upon.

While FORM based .aspx pages are still around and still going strong, several years ago the iPhone and the Android started dominating the App market for mobile based applications. The iPhone coding uses a Model View Controller approach to setting up apps which has been they approach for other apple products. The Android Studio is JAVA based and also takes on a Model View Controller approach. Instead of one form controlling the whole flow of the site, the data, the user interface, and the code that controlls the flow are separated. The Model is essentially a layout of the data fields and lists. The View is like a Web Page with placeholders for data fields and lists. The Controller is where most of the code is placed. When some user action is performed, the controller is called to gather up and process any data and the view the user sees is a combination of the static content along with the data that is filled into to the Model.

Microsoft got on board with the MVC approach as well. In fact, the nopCommerce shopping cart software that this website is based on is a Microsoft site based on MVC.

The important of pointing out what MVC is is because this is where everything has gone in terms of programming. ASPX Form based websites willl soon be a thing of the past.