This is a continuation of my Introduction to ASP.NET MVC series. As I outlined before this is in an effort to write the book and keep blogging, I decided to write/blog the last chapter, Chapter 2. I am doing this so I can receive feedback on this chapter as early as possible. Because this chapter, in my opinion, is probably the most critical of the book, it defines the context around ASP.NET MVC and how it differs from ASP.NET Web Forms, as well as giving a historical perspective of the MVC pattern.
In the next several posts we will cover the following parts of Chapter 2 from the book:
- The Model-View-Controller Pattern
- ASP.NET MVC vs. ASP.NET Web Forms
- Installing the Prerequisites
- Your First ASP.NET MVC Project
- The Model
- The View
- The Controller
Installing the Prerequisites
To start developing ASP.NET MVC and to run the code in this book, you will need the following prerequisites installed on your system:
- Visual Web Developer 2008 Express Edition SP1
- SQL Server 2005 Express Edition
- Micorosft.NET Framework 3.5 SP1
- Microsoft ASP.NET MVC
You can cover prerequisites 1-3 by downloading just the Visual Web Developer 2008 Express Edition installation file, which includes .NET 3.5 SP1 by default and SQL Server 2008 Express Edition as an optional add-on during the install process.
If you have already installed all of the software above, or have an edition of the software that is better you may skip to the Your First ASP.NET MVC Project section.
Installing the Software
Now that all the prerequisites have been downloaded, we can install them to get your development machine ready for the ASP.NET MVC development we will be doing over the course of this book.
The first thing we will want to do is double-click the Visual Web Developer 2008 Express Edition installation file. Figure 2-3 is the first window you will see of the installation process:
Now, click on Next, and you will see the screen shown in Figure 2-4.
Now, read the license and accept the agreement and click on Next, and you will see the screen shown in Figure 2-5.
With this screen if you don’t already have SQL Server 2008 Express Edition installed you will want to check the appropriate options. Then click Next, and you will see the screen shown in Figure 2-6.
Next, click on Install, and you will see the screen shown in Figure 2-7.
Next the installer will download the required installation files to properly configure your machine, it may take anywhere between 10 minutes to an unspecified amount of time, depending on your internet connection, to complete the download. After the download completes you will see a installation screen that looks like Figure 2-8.
The last step is the installation of the software. Your machine may need to be rebooted, so make sure to reboot your machine right away, because Microsoft SQL Server 2008 Express Edition still needs to install. The installation will be automatically started after Windows restarts. Figure 2-9 shows what the installation screen looks like after the reboot.
If your machine automatically reboots during the installation process it is because there was a required update that needed to occur before the installation of Visual Web Developer. If this happens you will need to start the installation process over, and follow the same steps from the beginning of this section. Don’t worry the download process will be much quicker because the downloads have already been cached in Windows temporary directory.
When everything has completed successfully you will see the final screen that looks like Figure 2-10.
The next thing we want to install is ASP.NET MVC, you can do this by double-clicking the installation file that we downloaded earlier. Figure 2-11 is what the screen will look like.
Now, click on Next, and you will see the screen shown in 2-12.
Now, read the license and accept the agreement and click on Next, and you will see the screen shown in Figure 2-13.
Next, click on Install, and you will see the screen shown in Figure 2-14.
When everything has completed successfully you will see the final screen that looks like Figure 2-15.
We are now ready to start developing our first ASP.NET MVC application project. So let’s get started.
This post is licensed under a different license than the rest of my site. Copyright © Wiley Publishing Inc 2009.NET, asp.net mvc, Book, C#, Chapter 2, Web, Wrox