Archive for the ‘ASP.NET MVC’ Category
One of the core features of ASP.NET MVC that makes everything “just work” is the concept of routing. By specifying ahead of time what a route looks like, we can create links that look like regular URLs with no parameters that behave like parameterized URLs on the server.
The magic for this all happens in Global.asax.cs (or .vb if you are using Visual Basic)
Unless you only read my blog, you probably already know that MVC 1.0 released yesterday. So it’s time to install it into visual studio.
Now, you are supposed to be able to install it using the Microsoft Web Platform Installer, but when I try that, the only option I have is to install RC2, which isn’t what we want, so let’s head on over to the Microsoft download location and install it from there:
There are three ways now to write a web site in ASP.NET:
- Use Classic ASP model with everything in the ASPX file and only use HTML controls without the runat=”server” attribute
- Use the Web Forms model
- Use the new ASP.NET MVC model
Each have their own benefits that need to be weighed carefully prior to moving forward with a design. So what does MVC give us that we didn’t already have in either classic ASP or Web Forms?
Last week I introduced the ASP.NET MVC framework by talking a bit about what the model, view and controller are.
In the comments, John Meyer said,
I respectfully disagree with your claim that the model is you BLL. MVC is a UI layer pattern, and as such all models, views, and controllers are strictly in the UI level.
While historically, MVC has been described in the way I stated–while the ASP.NET MVC guys have also portrayed the Model as BLL or below–I have to agree with John. Here’s why:
Last week the ASP.NET Model View Controller framework was released as Release Candidate 1. That’s my cue to take a look at what we finally have available to us and to start a series explaining how it all works.
What we want to take a look at today is exactly what MVC is and why someone might want to use it instead of the Web Forms we’ve been working with ever since ASP.NET came out.