programming microsoft asp net mvc 3rd edition feb 2014

516 752 0
programming microsoft asp net mvc 3rd edition feb 2014

Đ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

[...]... understanding of ASP. NET development Who should not read this book If you’re looking for a step-by-step guide to ASP. NET MVC, this is not the ideal book for you Organization of this book This book is divided into three sections Part I, ASP. NET MVC fundamentals,” provides a quick overview of the foundation of ASP. NET and its core components Part II, ASP. NET MVC software design,” focuses on common aspects of... going! We’re on Twitter: http://twitter.com/MicrosoftPress Introduction  xvii PAR T I ASP. NET MVC fundamentals CHAPTER 1 ASP. NET MVC controllers 3 CHAPTER 2 ASP. NET MVC views 33 CHAPTER 3 The model-binding architecture 75 CHAPTER 4 Input forms 103 1 CHAPTER 1 ASP. NET MVC controllers They always say time changes... deal with more generic URIs, whereas ASP. NET Web Forms was designed to deal with location-aware physical resources Simulating the ASP. NET MVC runtime Let’s build a simple ASP. NET Web Forms application and use HTTP handlers to figure out the internal mechanics of ASP. NET MVC applications You can start from the basic ASP. NET Web Forms application you get from your Microsoft Visual Studio project manager... mentioned, offers its services to both ASP. NET MVC and ASP. NET Web Forms applications, though through a slightly different API Routing the requests What happens exactly when a request knocks at the Internet Information Services (IIS) gate? Figure 1-2 gives you an overall picture of the various steps involved and how things work differently in ASP. NET MVC and ASP. NET Web Forms applications The URL routing... using Web Forms, for today’s web development, ASP. NET MVC is a much better choice You don’t need to invest a huge amount of time, but you need to understand exactly what’s going on and the philosophy behind MVC If you do that, any investment you make will pay you back sooner than you expect 3 Note  This book is based on ASP. NET MVC 5 This version of ASP. NET MVC is backward compatible with the previous... String.Format(message, param1); } } } Figure 1-1 shows the effect of invoking a page-agnostic URL in an ASP. NET Web Forms application 6  PART I  ASP. NET MVC fundamentals FIGURE 1-1  Processing page-agnostic URLs in ASP. NET Web Forms This simple example demonstrates the basic mechanics used by ASP. NET MVC The specialized component that serves a request is the controller The controller is a class with just... latest version of ASP. NET 4 Web Forms, you can use URL routing to match incoming URLs to other URLs without incurring the costs of HTTP 302 redirects Conversely, in ASP. NET MVC, URL routing serves the purpose of mapping incoming URLs to a controller class and an action method Note  Originally developed as an ASP. NET MVC component, the URL routing module is now a native part of the ASP. NET platform and,... works today The ASP. NET run-time environment, however, doesn’t limit you to just calling into resources identified by a specific location and file By writing an ad hoc HTTP handler and binding it to a URL, you can use ASP. NET to execute code in response to a request regardless of the dependencies on physical files This is just one of the aspects that most distinguishes ASP. NET MVC from ASP. NET Web Forms... post-exercise formats, from the following page: http://aka.ms/programASP -NET_ MVC/ files Follow the instructions to download the asp- net- mvc- examples.zip file Installing the code samples Perform the following steps to install the code samples on your computer so that you can use them with the exercises in this book 1 Unzip the asp- net- mvc- examples.zip file that you downloaded from the book’s website (name... even though ASP. NET MVC addresses more closely the present needs of developers The most common scenario of Web Forms is applications for which you focus on presenting data and use some third-party high-quality suite of controls for that ASP. NET MVC is for everything else, including the scaffolding of client-side single-page applications The way web applications are changing proves that ASP. NET MVC probably . 1 ASP. NET MVC controllers 3 CHAPTER 2 ASP. NET MVC views 33 CHAPTER 3 The model-binding architecture 75 CHAPTER 4 Input forms 103 PART II ASP. NET MVC SOFTWARE DESIGN CHAPTER 5 Aspects of ASP. NET. page: http://aka.ms/programASP -NET_ MVC/ les Follow the instructions to download the asp- net- mvc- examples.zip le. Installing the code samples Perform the following steps to install the code samples on your computer. . . . . . . . . . . . . . . . . . . . . . .146 PART II ASP. NET MVC SOFTWARE DESIGN Chapter 5 Aspects of ASP. NET MVC applications 151 ASP. NET intrinsic objects 151 HTTP response and SEO 152 Managing

Ngày đăng: 05/04/2014, 15:16

Từ khóa liên quan

Mục lục

  • Contents at a glance

  • Contents

  • Introduction

  • Part I: ASP.NET MVC fundamentals

    • Chapter 1: ASP.NET MVC controllers

      • Routing incoming requests

        • Simulating the ASP.NET MVC runtime

        • The URL routing HTTP module

        • Application routes

        • The controller class

          • Aspects of a controller

          • Writing controller classes

          • Processing input data

          • Producing action results

          • Summary

          • Chapter 2: ASP.NET MVC views

            • The structure and behavior of a view engine

              • The mechanics of a view engine

              • Definition of the view template

              • HTML helpers

                • Basic helpers

                • Templated helpers

                • Custom helpers

                • The Razor view engine

                  • Inside the view engine

                  • Designing a sample view

                  • Coding the view

                    • Modeling the view

                    • Advanced features

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

Tài liệu liên quan