Chapter 2. Hello MVC world

 

This chapter covers

  • Setting up your development environment
  • Creating your first ASP.NET MVC application
  • Introducing controllers, actions, and views
  • Accessing a simple data access

In this chapter, we’ll introduce the Guestbook application that will be our example for the rest of part 1 of this book. The Guestbook is a simple application that will allow users to post their name and a message to the site, and to see the messages posted by other users. Although the concept for the Guestbook is simple, we’ll use it to explore the core components of ASP.NET MVC.

Throughout part 1 of the book, we’ll build up this example. We’ll begin by looking at the development tools that need to be installed in order to work with MVC applications, and then we’ll create the initial skeleton of the guestbook application and explore the default components that come with a new MVC application. We’ll also look at how to access a SQL Server Compact database using some of the new features in Entity Framework 4.1.

Chapter 3 will expand on what we’re going to build in this chapter by exploring view fundamentals and how to leverage the new Razor view engine as well as HTML Helpers to build user-interface elements. Finally, chapter 4 will look at the controller in depth as well as provide an introduction to unit-testing MVC applications.

For now, we’ll dive in and look at how you can set up your development environment.

2.1. Setting up your development environment

2.2. Creating your first MVC application

2.3. The Guestbook sample application

2.4. Summary

sitemap