万本电子书0元读

万本电子书0元读

顶部广告

Mastering ASP.NET Core 2.0: MVC patterns, configuration, routing, deployment, an电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Ricardo Peres

出  版  社:Packt Publishing

出版时间:2017-11-16

字       数:56.0万

所属分类: 教育 > 外语 > 英文教辅

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Become an expert in the shiny new version of ASP.NET About This Book Grasp the advanced concepts of MVC Core and start making professional-grade applications Migrate from previous versions of ASP.NET MVC to ASP.NET Core This book will take you on a journey through all the aspects of ASP.NET Core 2.0 Who This Book Is For If you are a developer who knows the basics of ASP.NET MVC and wants to build powerful applications, this book is for you. Basic C# experience and an understanding of HTML and CSS is assumed. What You Will Learn Get to know the new features of ASP.NET Core 2.0 Find out how to configure ASP.NET Core Configure routes to access ASP.NET Core resources Create controllers and action methods and see how to maintain the state Create views to display contents Implement and validate forms and retrieve information from them Write reusable modules for ASP.NET Core Deploy ASP.NET Core to other environments In Detail ASP.NET is an open source web framework that builds modern web apps and services. This book is your one-stop guide to the new features of ASP.NET Core 2.0, including web APIs and MVC. We begin with a brief overview of the basics, taking you through the MVC pattern, platforms, dependencies, and frameworks. We then move on to setting up and configuring the MVC environment before talking about routing and advanced routing options. Next, we'll look at model binding, controllers and actions, filters, user authentication, and testing. Moving on, you'll learn about all the aspects of syntax and processes when working with Razor. You'll be introduced to client-side development and will get to know about the security aspects of ASP.NET Core. We will also look at microservices with ASP.NET Core. Finally, you'll find out how to deploy ASP.NET Core to new environments such as Azure, AWS, and Docker. By the end of the book, you will be well versed with development in ASP.NET Core and will have a deep understanding of how to interact with the framework and work cross-platform. Style and approach Find out how to design modern, cross-platform, business oriented web applications that serve the client needs in the age of emerging .NET framework
目录展开

Title Page

Copyright

Mastering ASP.NET Core 2.0

Credits

About the Author

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

Getting Started with ASP.NET Core

Introducing ASP.NET Core

.NET Core

Platforms

Dependencies and frameworks

Targeting .NET Core or the full .NET framework

Understanding the MVC pattern

Getting one's context

The OWIN pipeline

Hosting

Kestrel

WebListener

IIS

Nginx

Apache

Configuration

Features

Launch configuration

Inversion of control and dependency injection

Knowing the environments

A sample project

Structure

Summary

Configuration

Configuration in .NET Core

Providers

File-based providers

JSON provider

XML provider

INI provider

Other providers

User secrets

Azure Key Vault

Command line

Environment variables

Memory

Docker

Creating a custom provider

Using configuration values

Getting and setting values explicitly

Configuration sections

Getting all values

Binding to classes

Injecting values

Reloading and handling change notifications

Putting it all together

Summary

Routing

Routing tables

Route templates

Route parameter matching

Route selection

Special routes

Route defaults

Route handlers

Routing to inline handlers

Route constraints

HTTP methods

Default constraints

Custom constraints

Route data tokens

Areas

Routing attributes

Routes

Defaults

Constraints

Areas

Action names

Non actions

Restrictions

Route values

Dealing with errors

Catch-all route

Status code pages middleware

Specific status codes

Any status code

Putting it all together

Summary

Controllers and Actions

Using controllers

Controller base classes

POCO controllers

Adding context to POCO controllers

Intercepting actions in POCO controllers

Finding controllers

Controller life cycle

Actions

Finding actions

Synchronous and asynchronous actions

Getting the context

Action constraints

Action parameters

Model binding

Body

Form

Header

Query

Route

Dependency injection

Custom binders

Input formatters

Explicit binding

Cancelling requests

Model validation

Action results

API actions

Output formatters

Content negotiation

API versioning

Header values

URL

Deprecation

Default version

Version mapping

Invalid versions

API documentation

Response caching

Maintaining state

Request

Form

Query string

Route

Cookies

Session

Cache

In-memory cache

Distributed cache

Redis

SQL Server

Temporary data

Comparing state maintenance techniques

Dependency injection

Globalization and localization

Putting it all together

Summary

Views

View classes

Locating views

View location expanders

View engines

Logging and diagnostics

View compilation

Model

ViewBag

Temporary data

View layouts

Partial views

Passing data to partial views

Finding partial views

Special files

View options

Areas

Dependency injection

Resources

Translated views

Razor Pages

Page model

Page handlers

Model binding

Model validation

Maintaining state

View layouts

Partial views

Special files

Filters

Dependency injection

Configuring options

Page routes

Security

Putting it all together

Summary

Using Forms and Models

Form context

Model metadata

Models of anonymous types

HTML helpers

Forms

Single line text boxes

Multi-line text boxes

Passwords

Dropdowns

List boxes

Radio buttons

Checkboxes

Hidden values

Links

Labels

Raw HTML

IDs, names, and values

Generic editor and display

Utility methods and properties

Validation messages

Custom helpers

Templates

Model binding

Model validation

Server-side validation

Configuration

Data annotations validation

Error messages

Self-validation

Custom validation

Client-side model validation

Configuration

Custom validation

AJAX

Validation

Restrictions

Contents

Uploading files

Direct access

Putting it all together

Summary

Security

Authentication

Windows authentication

Custom authentication

ASP.NET Core 1.x authentication

ASP.NET Core 2.x authentication

Identity

Using JWT

IdentityServer

ASP.NET Core 1.x

ASP.NET Core 2.x

Azure AD

Social logins

Facebook

Twitter

Google

Microsoft

Binding security

Cookie security

Authorization

Roles

Policies

Authorization handlers

Resource-based authorization

Anonymous access

Anti-forgery

HTML encoding

HTTPS

Hosting

IIS Express

Kestrel

ASP.NET Core 1.x

ASP.NET Core 2.x

WebListener

Restricting HTTP

Redirecting to HTTPS

CORS

Data protection

Static files

Using an action to retrieve files

Using middleware to enforce security

Putting it all together

Summary

Reusable Components

View components

Discovering view components

Using view components

View component results

Dependency injection

Tag helpers

Understanding the properties of a tag helper

Restricting applicability

Discovering tag helpers

Dependency injection

Included tag helpers

The <a> tag

The <cache> tag

The <distributed-cache> tag

The <environment> tag

The <form> tag

The <script> tag

The <link> tag

The <select> tag

Validation message and summary

Tag helper components

Partial views

Partial views versus view components

Putting it all together

Summary

Filters

Types of filters

Synchronous versus asynchronous

Filter scope

Execution order

Applying filters through attributes

Factories and providers

Dependency injection

Context

Authorization filters

Authorization policies

Resource filters

Understanding action filters

Result filters

Exception filters

Page filters

Putting it all together

Summary

Logging, Tracing, and Diagnostics

Common logging

Using logging

Logging providers

ASP.NET Core 1.x

ASP.NET Core 2.x

Log filtering

ASP.NET Core 1

ASP.NET Core 2

Custom providers

Dependency injection

Logging attributes

Custom logging middleware

Diagnostics

Telemetry

ASP.NET Core 1.x

ASP.NET Core 2.x

Custom events

Health checking

Putting it all together

Summary

Testing

Unit testing

xUnit

Injecting dependencies

Mocking

Assertions

User interface

Using the command line

Limitations of unit tests

Integration testing

Putting it all together

Summary

Client-Side Development

Using Bower

Using Node.js

Calling Node from .NET Core

Pre-compiling views

Using WebPack

SPA templates

Using Gulp

Using Grunt

Using TypeScript

Using Less

Putting it all together

Summary

Improving the Performance and Scalability

Profiling

CoreProfiler

MiniProfiler

Stackify Prefix

Hosting

Choosing the best host

Tuning

Maximum number of simultaneous connections

Limits

Timeouts

Bundling and minification

Asynchronous actions

Caching

Caching data

In-memory cache

Distributed cache

Caching action results

Caching views

Compressing responses

Putting it all together

Summary

Real-Time Communication

Setting up SignalR

Hosting a hub

Communication protocols

SignalR context

Message targets

Communicating from the outside

Summary

Other Topics

Areas

Usage

Tag and HTML helpers

Working with static files and folders

Directory browsing

Static files

Default documents

Security

Application lifetime events

Embedded resources

Hosting extensions

Hosting startup

Hosted services

Custom conventions

URL rewriting

URL redirection

URL rewrite

Runtime evaluation

HTTPS

Platform-specific

Putting it all together

Summary

Deployment

Manual deployment

Setting the target framework

Self-contained deployments and runtimes

Real-time rebuilding

Visual Studio deployment

IIS

Nginx

Azure

AWS

Docker

Windows Service

Putting it all together

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部