Pro ASP.NET MVC 3 Framework potx

837 6.8K 0
Pro ASP.NET MVC 3 Framework potx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... created a new item called ASP.NET MVC 3 Web Application, as shown in Figure 3- 1 Figure 3- 1 The Visual Studio MVC 3 project template 31 CHAPTER 3 ■ YOUR FIRST MVC APPLICATION ■ Caution The MVC 3 installer doesn’t remove MVC version 2, so you’ll also see the old templates available alongside the new When creating a new project, be careful to select the right one Set the name of the new project to PartyInvites... concepts in MVC The ASP.NET MVC Framework implements the MVC pattern, and in doing so, provides greatly improved separation of concerns In fact, ASP.NET MVC implements a modern variant of MVC that’s especially suitable for web applications You’ll learn more about the theory and practice of this architecture in Chapter 4 By embracing and adapting the MVC pattern, the ASP.NET MVC Framework provides strong... ASP.NET MVC, the MonoRail project is rarely heard of The momentum of enthusiasm and innovation in the NET web development world is now focused on ASP.NET MVC 14 CHAPTER 1 ■ WHAT’S THE BIG IDEA? What’s New in ASP.NET MVC 3 The headline feature in MVC version 3 is the introduction of the Razor View Engine Previous versions of MVC have relied on the standard ASP.NET view engine, which depends on the ASP.NET. .. to MVC, you’ll find plenty to keep you interested Where we use something without explaining it, we provide a reference to the chapter where you can find all the details Creating a New ASP.NET MVC Project We are going to start by creating a new MVC project in Visual Studio Select New Project from the File menu to open the New Project dialog If you select the Web templates, you’ll see that the MVC 3 installer... 23, you’ll be ready to deploy your MVC Framework application to your server 30 CHAPTER 3 ■■■ Your First MVC Application The best way to appreciate a software development framework is to jump right in and use it In this chapter, you’ll create a simple data-entry application using the ASP.NET MVC Framework We’ll take things a step at a time so you can see how an ASP.NET MVC application is constructed To... treatment for ASP.NET applications Being built on the core ASP.NET platform, MVC applications get all these benefits Chapter 23 explains what you need to know to deploy ASP.NET MVC applications to IIS on Windows Server Modern API Since its inception in 2002, Microsoft’s NET platform has evolved relentlessly, supporting and even defining the state-of-the-art aspects of modern programming ASP.NET MVC 3 is built... PartyInvites and click the OK button to continue You will see another dialog box, shown in Figure 3- 2, which asks you to choose between three different types of MVC project templates Figure 3- 2 Selecting a type of MVC 3 project The Empty option creates a project with only the minimum files and folders required for an MVC 3 application The Internet Application option creates a small example application that you... the new project 32 CHAPTER 3 ■ YOUR FIRST MVC APPLICATION ■ Note Under the template options in Figure 3- 2, you can see a drop-down menu that lets you specify the view engine for the project As we mentioned in Chapter 1, MVC 3 includes a new and improved view engine called Razor, which we’ll be using Razor throughout this book We recommend that you do the same But if you want to use the regular ASP.NET. .. this book 33 CHAPTER 3 ■ YOUR FIRST MVC APPLICATION To add a controller to our project, right-click the Controllers folder in the Visual Studio Solution Explorer window and choose Add and then Controller from the pop-up menus, as shown in Figure 3- 4 Figure 3- 4 Adding a controller to the MVC project When the Add Controller dialog appears, set the name to HomeController, as shown in Figure 3- 5 This is... in full-stack frameworks like Ruby on Rails and ASP.NET MVC Node.js is mentioned here only to put some of ASP.NET MVC s design into context against industry trends For example, ASP.NET MVC includes asynchronous controllers (which we describe in Chapter 14) This is a way to handle HTTP requests with nonblocking I/O and scale up to handle more requests per CPU And as you’ll learn, ASP.NET MVC integrates . object- oriented programming Heavy on bandwidth Ugly HTML Untestable 2005 ASP. NET Web Forms 2.0 2007 ASP. NET AJAX 2008 ASP. NET Web Forms 3. 5 2009 ASP. NET MVC 1.0 2010 ASP. NET MVC 2.0 ASP. NET. in MVC. The ASP. NET MVC Framework implements the MVC pattern, and in doing so, provides greatly improved separation of concerns. In fact, ASP. NET MVC implements a modern variant of MVC that’s. ■Part 1: Introducing ASP. NET MVC 3 1 ■Chapter 1: What’s the Big Idea? 3 ■Chapter 2: Getting Ready 17 ■Chapter 3: Your First MVC Application 31 ■Chapter 4: The MVC Pattern 63 ■Chapter 5: Essential

Ngày đăng: 30/03/2014, 01:20

Từ khóa liên quan

Mục lục

  • Cover

    • Contents at a Glance

    • Contents

    • About the Authors

    • About the Technical Reviewer

    • Acknowledgments

    • --- PART 1 --- Introducing ASP.NET MVC 3

    • Chapter 1: What’s the Big Idea?

      • A Brief History of Web Development

        • Traditional ASP.NET Web Forms

        • What’s Wrong with ASP.NET Web Forms?

        • Web Development Today

          • Web Standards and REST

          • Agile and Test-Driven Development

          • Ruby on Rails

          • Sinatra

          • Node.js

          • Key Benefits of ASP.NET MVC

            • MVC Architecture

            • Extensibility

            • Tight Control over HTML and HTTP

            • Testability

            • Powerful Routing System

            • Built on the Best Parts of the ASP.NET Platform

            • Modern API

Tài liệu cùng người dùng

Tài liệu liên quan