Chapter 1. High-speed beginner ramp-up

 

This chapter covers

  • Introducing the MVC pattern
  • Dissecting the default application template
  • Creating your first ASP.NET MVC 2 project
  • Handling user input
  • Working with the view

This chapter is intended to provide you with a quick, high-level overview of the ASP.NET MVC Framework. We’ll create a basic sample application, collect user input, and display some web pages.

But first, let me introduce you to your new friend...

1.1. Welcome to ASP.NET MVC

ASP.NET MVC is a new web application framework from Microsoft. It was first unveiled in November 2007 and has since seen more than 10 releases and 2 major versions. With the high number of releases, this framework has received quite a bit of feedback and is much more stable than some other new frameworks from Microsoft, such as Windows Workflow Foundation. MVC stands for Model-View-Controller, a pattern that’s becoming increasingly popular with web development frameworks.

ASP.NET MVC is both an alternative and a complement to Web Forms, which means you won’t be dealing with pages and controls, postbacks or view state, or complicated event lifecycles. Instead, you’ll be defining controllers, actions, and views. The underlying ASP.NET platform is the same, however, so things like HTTP handlers and HTTP modules still apply, and you can mix MVC and Web Forms pages in the same application.

1.2. The MVC pattern

1.3. Creating your first ASP.NET MVC 2 project

1.4. Creating controllers and actions

1.5. Creating views

1.6. Improving your application

1.7. Summary