As you may know I am an ASP.NET developer, a junior one no doubt, but I’m learning.
The .NET framework is on version 3.5, and there was at least 1 version of ASP before the .NET framework ‘revolutionized’ the way we make websites on/with MS products. But the MVC (model – view – controller) plug-in/framework/whatever is only on version 1. Why is this? And more importantly, why is it not more widely advertised?
I was having some serious issues trying to enforce company ‘best practices’ in my web application. (We are a group of computer programmers, and in theory we should be able to code for the internet using the same methodology). Basically best practices means you need the user-interface (UI) layer, the database (db), the data model, and the business object (BO).
Well as it turns out, MS kinda builds some of that in to ASP.NET Web Forms (the not MVC part is Web Forms) but if you should dare deviate from the MS way at all, nothing works right, from persistence, to sorting, to authorization. And finding information that is timely and useful is very difficult. (The problems I do solve, I try to post here in hopes that the next person who needs that question answered finds it here.) What the MVC framework does is enforce those best practices, by design. All I had to do was add my database and *poof* my 4 layered approach to my project literally falls into place.
Basically the data model is the M, the UI is V, and the BO is.. well the C gets the BO, and tells the V what M to display. In reality the BO is one a layer between the MVC and the db, and the C just returns things like urls, and does some validation. Really the C is the bouncer.
I will go into more detail later on, I just wanted to do my part to get the word out about ASP.NET MVC.