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

      • Summary

    • Chapter 3: The model-binding architecture

      • The input model

        • Evolving from the Web Forms input processing

        • Input processing in ASP.NET MVC

      • Model binding

        • Model-binding infrastructure

        • The default model binder

        • Customizable aspects of the default binder

      • Advanced model binding

        • Custom type binders

        • A sample DateTime model binder

      • Summary

    • Chapter 4: Input forms

      • General patterns of data entry

        • A classic Select-Edit-Post scenario

        • Applying the Post-Redirect-Get pattern

      • Automating the writing of input forms

        • Predefined display and editor templates

        • Custom templates for model data types

      • Input validation

        • Using data annotations

        • Advanced data annotations

        • Self-validation

      • Summary

  • Part II: ASP.NET MVC software design

    • Chapter 5: Aspects of ASP.NET MVC applications

      • ASP.NET intrinsic objects

        • HTTP response and SEO

        • Managing the session state

        • Caching data

      • Error handling

        • Handling program exceptions

        • Global error handling

        • Dealing with missing content

      • Localization

        • Using localizable resources

        • Dealing with localizable applications

      • Summary

    • Chapter 6: Securing your application

      • Security in ASP.NET MVC

        • Authentication and authorization

        • Separating authentication from authorization

      • Implementing a membership system

        • Defining a membership controller

        • The Remember-Me feature and Ajax

      • External authentication services

        • The OpenID protocol

        • Authenticating via social networks

      • Summary

    • Chapter 7: Design considerations for ASP.NET MVC controllers

      • Shaping up your controller

        • Choosing the right stereotype

        • Fat-free controllers

      • Connecting the presentation and back end

        • The Layered Architecture pattern

        • Injecting data and services in layers

        • Gaining control of the controller factory

      • Summary

    • Chapter 8: Customizing ASP.NET MVC controllers

      • The extensibility model of ASP.NET MVC

        • The provider-based model

        • The Service Locator pattern

      • Adding aspects to controllers

        • Action filters

        • Gallery of action filters

        • Special filters

        • Building a dynamic loader filter

      • Action result types

        • Built-in action result types

        • Custom result types

      • Summary

    • Chapter 9: Testing and testability in ASP.NET MVC

      • Testability and design

        • DfT

        • Loosen up your design

      • The basics of unit testing

        • Working with a test harness

        • Aspects of testing

      • Testing your ASP.NET MVC code

        • Which part of your code should you test?

        • Unit testing ASP.NET MVC code

        • Dealing with dependencies

        • Mocking the HTTP context

      • Summary

    • Chapter 10: An executive guide to Web API

      • The whys and wherefores of Web API

        • The need for a unified HTTP API

        • MVC controllers vs. Web API

      • Putting Web API to work

        • Designing a RESTful interface

        • Expected method behavior

        • Using the Web API

        • Designing an RPC-oriented Interface

        • Security considerations

      • Negotiating the response format

        • The ASP.NET MVC approach

        • How content negotiation works in Web API

      • Summary

  • Part III: Mobile clients

    • Chapter 11: Effective JavaScript

      • Revisiting the JavaScript language

        • Language basics

        • Object-orientation in JavaScript

      • jQuery’s executive summary

        • DOM queries and wrapped sets

        • Selectors

        • Events

      • Aspects of JavaScript programming

        • Unobtrusive code

        • Reusable packages and dependencies

        • Script and resource loading

        • Bundling and minification

      • Summary

    • Chapter 12: Making websites mobile-friendly

      • Technologies for enabling mobile on sites

        • HTML5 for the busy developer

        • RWD

        • jQuery Mobile’s executive summary

        • Twitter Bootstrap at a glance

      • Adding mobile capabilities to an existing site

        • Routing users to the correct site

        • From mobile to devices

      • Summary

    • Chapter 13: Building sites for multiple devices

      • Understanding display modes in ASP.NET MVC

        • Separated mobile and desktop views

        • Rules for selecting the display mode

        • Adding custom display modes

      • Introducing the WURFL database

        • Structure of the repository

        • Essential WURFL capabilities

      • Using WURFL with ASP.NET MVC display modes

        • Configuring the WURFL framework

        • Detecting device capabilities

        • Using WURFL-based display modes

        • The WURFL cloud API

      • Why you should consider server-side solutions

      • Summary

  • Index

  • About the author

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

  • Đang cập nhật ...

Tài liệu liên quan