Tải bản đầy đủ - 0 (trang)
Appendix D. Cross-Reference: Targeted Topics, Features, and Scenarios

Appendix D. Cross-Reference: Targeted Topics, Features, and Scenarios

Tải bản đầy đủ - 0trang

Topic



Chapter(s)



Validation



Chapter 3



Error handling



Chapter 16



View engines



Chapter 1



Child actions



Chapter 12



Output caching



Chapter 12



bin_DeployableAssemblies



Chapter 19



Custom item templates



Chapter 15



ASP.NET MVC project types



ASP.NET MVC project types



Empty



Chapter 1



Internet Application



Chapter 1



Intranet Application



Chapter 9



Mobile Application



Chapter 10



Web API



Chapter 6



Patterns and practices



Patterns and practices



Model-View-Controller pattern



Chapter 5



N-Tier model



Chapter 5



SOLID



Chapter 5



Model binding & validation



Chapter 6



Object-Relational Mapping (ORM)



Chapter 8



Logging and health monitoring



Chapter 16



Unit testing



Chapter 17



Automated browser testing



Chapter 17



SEO



Chapter 14



Graceful degradation



Chapter 13



Progressive enhancement



Chapter 10



Client-side templates



Chapter 4



Mobile development



Chapter 10



Cross-site scripting attacks (XSS)



Chapter 9



Cross-site request forgery (CSRF)



Chapter 9



SQL injection attacks



Chapter 9



Web services and REST



Chapter 7



Repository pattern



Chapter 8



Continuous integration



Chapter 18



Continuous deployment



Chapter 18



456 | Appendix D: Cross-Reference: Targeted Topics, Features, and Scenarios



www.it-ebooks.info



Topic



Chapter(s)



Cloud/farm deployment



Chapter 19



Server-side caching



Chapter 12



Client-side caching



Chapter 12



Tools, Frameworks, and Technologies



Tools, Frameworks, and Technologies



jQuery



Chapter 4



Client validation



Chapter 3



Authentication/authorization



Chapter 9



Bundling and minification



Chapter 13



ASP.NET Web API



Chapter 7



Entity Framework



Chapter 3, Chapter 8



jQuery Mobile



Chapter 10



Web Sockets



Chapter 11



SignalR



Chapter 11



Windows Azure



Chapter 19



Browser: local storage



Chapter 12



Cross-Reference: Targeted Topics, Features, and Scenarios | 457



www.it-ebooks.info



www.it-ebooks.info



Index



Symbols

# symbol, 73

$() function, 71, 73

: (semicolon), 27

<% %> code syntax, 54

> symbol, 74

@ symbol, 27, 54



A

absolute expiration, 251

abstractions

best practices, 443

repository pattern and, 365

Accept header (HTTP), 150

acceptance tests, 349

AcceptVerbsAttribute class, 143, 453

ActionFilterAttribute class

about, 23, 90

OnActionExecuted() method, 126

ActionResult class, 19, 24, 454

actions (see controller actions)

Active Server Pages (ASP), 3

adaptive rendering

about, 217

browser-specific views, 221–222

CSS media queries, 220

mobile feature detection, 218–220

viewport tag, 217

Add Application dialog box, 403

Add Controller dialog box, 36

Add View wizard, 39

ADO.NET Entity Framework (see Entity

Framework)

aggregate root, 155



AggregateCacheDependency class, 252

AJAX (Asynchronous JavaScript and XML)

client-side development and, 77–79

cross-domain, 133–138

Forms Authentication and, 190

JavaScript rendering, 117–123

partial rendering and, 111–117

responding to requests from, 124

reusing logic across requests, 123–127

sending data to the server, 128–133

AllowAnonymousAttribute class, 186, 188,

191

AntiXssEncoder class

about, 198

CssEncode() method, 199

HtmlAttributeEncode() method, 199

HtmlEncode() method, 199

HtmlFormUrlEncode() method, 199

UrlEncode() method, 199

UrlPathEncode() method, 199

XmlAttributeEncode() method, 199

XmlEncode() method, 199

App Cache, 265–267

application development (see web applications)

application service account, 178

application-scoped caching, 250

ASP (Active Server Pages), 3

ASP.NET health monitoring, 338–341

ASP.NET MVC Framework

about, 3, 4, 317–318

adding to existing Web Forms, 417–419

associated namespace, 17, 45

authentication, 41–43

authoring using Web Forms syntax, 54

choosing between Web Forms and, 415



We’d like to hear your suggestions for improving our indexes. Send email to index@oreilly.com.



459



www.it-ebooks.info



creating applications, 9–15, 35–40

deployment and runtime, 47

differences from Web Forms, 47–54

EBuy project, 8

HTTP handlers and modules, 46

installing, 9

integrating with Web Forms functionality,

420–421

IoC and, 108

logical design in, 90–92

MVC pattern and, 4–6

new features, 6–7

open source availability, 8

project folder structure, 13

rendering HTML, 50–54

routing traffic, 15–18

state management, 46, 49

tools, languages, APIs, 46

transitioning from Web Forms, 416–420

web development platforms, 3–4

ASP.NET platform

about, 45

routing and, 49

ASP.NET session state, 249

ASP.NET Web API

about, 7, 139

building data service, 139–145

exception handling, 147–149

media formatters, 149–152

paging and querying data, 146

asp:Hyperlink tag, 53

asp:Repeater tag, 52

AspCompat page directive, 313

aspnet_regsql.exe command, 340

.aspx pages, 48

ASPX view engine, 55

assemblies

dependencies and, 436

naming, 93

semantic versioning, 437

assembly packages, 430

AsyncController class, 234, 454

asynchronous controllers

about, 6, 233

creating, 234–236

usage considerations, 236

Asynchronous JavaScript and XML (see AJAX)

AsyncManager.OutstandingOperations

property, 235



attribute-based routing, 306–310

authentication

about, 41–43, 177

Forms Authentication, 183–191

Single Sign On Authentication, 90

user, 186–187

Windows Authentication, 178–181

authorization

defined, 177

user, 191

AuthorizeAttribute class

action filters and, 23

best practices, 452

controller actions and, 42, 177

usage considerations, 182–183

user authorization and, 191

Autofac site, 107

automated testing

defined, 345

levels of, 345–349

test projects for, 350–354

writing clean tests, 359–361

.axd file extension, 302



B

“backend code”, 445

Basic template, 11

BindAttribute class, 176

blacklist-based approach, 196

browsers, 271

(see also web pages)

cache management, 264, 292

HTTP polling and, 238, 239

server-sent events, 240

specific views for, 221–222

testing application logic in, 370

WebSocket API, 241

BufferedMediaTypeFormatter class, 150

build automation

about, 377, 380

continuous integration and, 386, 441

creating, 383–385

creating build scripts, 378–380

executing the build, 379

types of, 381

build scripts, 378–380

bundling concept, 7, 289–293

business rules, specifying with Data

Annotations API, 63–65



460 | Index



www.it-ebooks.info



C

Cache class

about, 251–252

adding items to, 262

cache management

about, 420

best practices, 276–277, 292, 453

cache dependencies, 252

client-side, 248, 264–269, 277

scavenging process and, 252

server-side, 248–264

Cache-Control header, 264, 276–277

CacheDependency class, 252

CacheItemPriority enumeration, 252

CacheItemRemovedCallback delegate, 252

Castle Windsor site, 107

CDN (content delivery network), 274

CI (continuous integration), 386–391, 441

client-side caching

about, 248

App Cache, 265–267

browser cache, 264

LocalStorage mechanism, 268

setting up, 277

client-side development

AJAX technique and, 77–79

DOM manipulation, 76–77

JavaScript and, 69–71

responding to events, 74–76

selectors in, 71–74

validating data, 79–83

client-side optimization

about, 271

anatomy of web pages, 271–273

ASP.NET MVC support, 289

avoiding redirects, 283–285

cache expiration, 276–277

configuring ETags, 285

content delivery networks and, 274

externalizing scripts and styles, 281

GZip compression, 278

HTTP requests and, 274

measuring client-side performance, 286

minifying JavaScript and CSS, 282

reducing DNS lookups, 282

removing duplicate scripts, 285

script placement on web pages, 279

stylesheets and, 279

client-side templates, 120–123



code blocks, 27

code coverage in testing, 372–374

Code First approach

about, 159

annotation attributes, 162

convention over configuration, 60

usage considerations, 161

working with data context, 167–168

code nuggets, 27

comma-separated values (CSV) format, 150

concurrency conflicts (databases), 160

configuring

ETags, 285

IIS, 178

real-time communication, 245–246

routes, 16–18

#container element, 112

containers, IoC, 107–109

content delivery network (CDN), 274

Content folder, 428

continuous builds, 381

continuous deployment, 410

continuous integration (CI), 386–391, 441

controller actions

about, 19

action filters, 23, 449

action parameters, 21–23

asynchronous, 233–236

AuthorizeAttribute class and, 42

best practices, 447, 449

building HTML forms, 57–59

error handling and, 333

implementation example, 35–37

JSONP support, 136

logging errors, 336

names corresponding to HTTP actions,

142

properties for, 16

repositories and, 155

returning results, 19

reusing logic across requests, 123–127

testing, 361–364

Controller class

about, 35

Content() method, 20

File() method, 20

HttpNotFound() method, 20

JavaScript() method, 20

Json() method, 20, 118



Index | 461



www.it-ebooks.info



OnException() method, 337

PartialView() method, 20, 112, 114, 124

Redirect() method, 20

RedirectToAction() method, 20

RedirectToRoute() method, 20

View() method, 20, 112

Controller component (MVC pattern)

about, 6, 18

component interaction and, 88–90

Controllers folder, 14, 35

convention over configuration concept

about, 13, 17

Code First approach and, 60

usage considerations, 141–143

CORS (Cross-Origin Resource Sharing), 133,

137

Cross-Site Request Forgery (CSRF), 133, 199–

201, 452

cross-site scripting (XSS) attacks, 133, 198

CRUD operations, 142, 143, 155

.cshtml file extension, 317

CSRF (Cross-Site Request Forgery), 133, 199–

201, 452

CSS

media queries, 220

minifying, 282

CSV (comma-separated values) format, 150

CustomModelBinderAttribute class, 131

CustomValidationAttribute class, 64

Cutrell, Edward, 296



D

data access layer

about, 161

Code First approach, 161–163

EBuy business model and, 163–166

working with data context, 167–168

data access patterns

about, 153

choosing approach, 159

object relational mappers, 156–158

POCO classes, 153

repository pattern, 154–156

Data Annotations API

client-side validation and, 80

Error Message property, 64

specifying business rules with, 63–65

data manipulation

building data access layer, 161–168



building forms, 57–59

data access patterns, 153–158

Entity Framework and, 158–161

filtering data, 168–174

handling form posts, 59

paging data, 146, 168–174

querying data, 146, 168–174

saving data to databases, 59–61

sorting data, 168–174

validating data, 61–67

data services

building, 139–145

exception handling, 147–149

media formatters, 149–152

paging data, 146

querying data, 146

data transfer objects (DTOs), 133

data:URL scheme, 274

Database class

ExecuteSqlCommand() method, 159

SqlQuery() method, 159

Database First model, 159

databases

concurrency conflicts, 160

deployment considerations, 399

many-to-many relationships, 168, 192

object relational impedance mismatch, 156–

158

saving data to, 59–61

DbContext class

about, 61, 167

OnModelCreating() method, 168

DbSet class, 61

DefaultModelBinder class, 129, 131

DELETE method (HTTP), 142

dependencies

best practices, 443

cache, 252

deployment considerations, 399

IoC principle and, 102

mocking, 365–370

version, 439

dependency injection (DI) pattern, 102, 104,

156

Dependency Inversion Principle (DIP), 101

dependency management, 13

DependencyResolver class, 109

deployment

ASP.NET MVC, 47



462 | Index



www.it-ebooks.info



automating, 390

considerations for, 395–401

continuous, 410

to Internet Information Server, 401–407

web application options, 94

Web Forms, 47

to Windows Azure, 407–410

desktop views

avoiding in mobile site, 216

switching between mobile and, 212

development, application (see web

applications)

DI (dependency injection) pattern, 102, 104,

156

DIP (Dependency Inversion Principle), 101

display modes feature, 7, 204

display templates, 318

distributed caching, 259–264

“DLL hell”, 436

DNS lookup, 272, 282

document object

DocumentElement property, 70

getElementById() method, 71

write() method, 280

DOM (Document Object Model)

manipulating, 76–77

referencing elements, 71–74

donut caching, 255–257

donut hole caching, 257–258

DRY (Don’t Repeat Yourself) principle, 110

DTOs (data transfer objects), 133



E

EBuy project

about, 8

business domain model, 163–166

creating, 9

deployment considerations, 400

editor templates, 318

.edmx file extension, 159

Empty template, 10

Entity class, 164

Entity Framework

about, 60, 158

Code First approach, 60, 159, 161–163,

167–168

database concurrency, 160

Database First model, 159

Model First approach, 159, 161



Entity Tag (ETag), 285

EntityObject class, 161

error and exception handling

about, 331

ASP.NET Web API, 147–149

concurrency conflicts, 160

controller actions and, 333

Data Annotation API, 64

data validation and, 65–67

defining global error handlers, 334–336

enabling custom errors, 332

logging errors, 336–338

ETag (Entity Tag), 285

events

monitoring, 338–341

responding to, 74–76

server-sent, 239

exception handling (see error and exception

handling)

ExceptionFilterAttribute.OnException()

method, 148

ExpectedExceptionAttribute class, 357

expiration, cache, 251, 276–277

Expires header, 264, 276–277

extension methods, 53



F

filesystem repositories, 432

filtering

controller actions, 23, 449

data, 168–174

errors, 337

foreach loop, managing complexity with, 116

formatters, media, 149–152

forms (see HTML forms; Web Forms)

Forms Authentication, 183–191

FormsAuthentication.SetAuthCookie()

method, 187, 188

Fowler, Martin, 387

Franklin, Benjamin, 175

front controller pattern, 89



G

gated check-in builds, 382

GET method (HTTP), 119, 128, 142

Get-Packages command, 438

Git source control systems, 409

Glimpse tool, 305

Index | 463



www.it-ebooks.info



Global.asax file, 107, 451

GlobalFilterCollection class, 334

Google’s best practices rules, 274

Grant-CacheAllowedClientAccount cmdlet,

261

Guan, Zhiwei, 296

GZip compression, 278



H

HandleErrorAttribute class, 149, 333–336,

338

health monitoring, 338–341

HTML

building forms, 57–59

handling form posts, 59

rendering, 50–54, 58

HTML helpers, 52, 317, 446

HtmlHelper class

about, 33, 317

ActionLink() method, 53

EditorFor method, 57

extending, 53

HiddenField method, 57

LabelFor method, 57

Partial() method, 117

Password method, 57

RenderAction() method, 318

TextBox method, 57

ValidationMessage() method, 66

ValidationSummary() method, 66

HTTP handlers, 46

HTTP headers, 150

HTTP Long Polling technique, 238

HTTP methods

best practices, 274, 285

CRUD operations and, 142

JSON hijacking and, 119

sending data to servers, 128

HTTP modules, 46

HTTP polling, 237–239

HttpActionExecutedContext class, 148

HttpApplicationState class, 250, 251

HttpBrowserCapabilities class, 214, 224

HttpContext class

Application property, 250

best practices, 444

Cache property, 251, 420

Items property, 47, 249

Session property, 249, 420



HttpGetAttribute class, 143

HttpPostAttribute class, 142, 143

HttpRequest class

anatomy of request, 272

Browser property, 214, 224

Unvalidated() method, 198

HttpResponse.WriteSubstitution() method,

256

HttpResponseException class, 147

HttpSessionState class, 251, 420

HttpStatusCodeResult class, 454

HttpUnauthorizedResult class, 454

Hub class, 243

hubs, connections and, 243–244



I

ICollection interface, 166

IComparable interface, 64

IConfigurationManager interface, 245

IController interface, 17

IDependencyResolver interface, 109

IDictionary interface, 249

IDisposable interface, 100

IEntity interface, 163

IEnumerable interface, 174

IEquatable interface, 163

IExceptionFilter interface, 148

If-Modified-Since header, 265

If-None-Match header, 286

if/else statement

best practices, 446

Web Forms example, 26

IHttpAsyncHandler interface, 314

IHttpHandler interface, 311

IIS (Internet Information Server)

asynchronous controllers and, 6

client caching and, 277

configuring, 178–181

deploying to, 401–407

IIS Express dialog box, 179

IKernel interface, 109

inheritance concept, 157, 242

Install-Package command, 13, 437, 440

installing

ASP.NET MVC Framework, 9

NuGet Package Manager, 423

packages from PackageManager Console

window, 13

Razor Single File Generator, 319



464 | Index



www.it-ebooks.info



Velocity, 259

integration machines, 388

integration tests, 348

Interface Segregation Principle (ISP), 100

Internet Application template, 11, 42, 184

Internet Information Server (IIS)

asynchronous controllers and, 6

client caching and, 277

configuring, 178–181

deploying to, 401–407

Intranet Application template, 11, 178

intranet applications, securing, 178–183

Inversion of Control design principle (see IoC

design principle)

IoC (Inversion of Control) design principle

about, 102

dependencies and, 102

dependency injection pattern, 104

picking containers, 106–109

service location and, 104

IQueryable interface, 146

IRepository interface, 143, 168, 366

IRouteConstraint interface, 304

IRouteHandler interface, 311

ISerializable interface, 100

ISP (Interface Segregation Principle), 100



J

JavaScript language

client-side development and, 69–71

minifying, 282

referencing DOM elements, 71–74

rendering and, 117–123

responding to events, 74

JavaScript Object Notation (see JSON)

JavaScriptSerializer class, 307

jQuery library

$() function, 71, 73

about, 69–71

.after() method, 77

.ajax() method, 79, 135

.before() method, 77

.click() method, 75

client-side validation, 79–83

.contains() method, 74

.css() method, 73

.done() method, 79

.error() method, 79, 136

.fail() method, 79



.getJSON() method, 142

.height() method, 71

.html() method, 77, 120, 123

JSON data and, 132

.load() method, 112

manipulating elements, 76

.post() method, 128

.prepend() method, 77

referencing DOM elements, 71–74

responding to events, 75

.success() method, 79, 136

.text() method, 73

.val() method, 120

.width() method, 71

jQuery Mobile Framework

about, 204

adaptive rendering, 217–222

creating mobile applications from scratch,

224–228

data-filter attribute, 211

data-role attribute, 210, 228

enhancing views with, 209–215

getting started with, 207–209

improving mobile experience, 216

Mobile Application template and, 12, 203

paradigm shift, 224

“listview” component, 210

jQuery.Mobile.MVC package, 207, 213

JSON (JavaScript Object Notation)

posting complex objects, 129

rendering data, 118–119

requesting data, 119

responding to requests, 125

sending and receiving data effectively, 132

JSON hijacking, 119

JSONP (JSON with Padding)

about, 133–135

controller actions and, 136

making requests, 135

JsonRequestBehavior enumeration, 137



L

Language Integrated Query (LINQ), 168–174,

308

Last-Modified header, 265, 286

layout template, 28

layouts

loading for mobile views, 207

master pages versus, 54

Index | 465



www.it-ebooks.info



web applications and, 28

lazy loading technique, 280

least privilege, principle of, 176

Library Package Manager Console, 13

libs folder, 429

LINQ (Language Integrated Query), 168–174,

308

LINQ to Entities injection attacks, 197

Liskov Substitution Principle (LSP), 98

“listview” component (jQuery Mobile), 210

LocalStorage mechanism, 268

Logger class, 336

logging errors, 336–338

logical design in web applications, 90–93

LSP (Liskov Substitution Principle), 98



M

magic strings, 444

.manifest file extension, 266–267

manual testing, 344

many-to-many relationships, 168, 192

MapRoute() extension method

about, 17

method override and, 303

parameters and, 299

registering routes for applications, 306

master pages, layouts versus, 54

media formatters, 149–152

media queries, 220

MediaTypeFormatter class

about, 150

CanReadType() method, 150

CanWriteType() method, 150

MEF site, 107

Membership class

CreateUser() method, 188

GetUser() method, 189

ValidateUser() method, 187

MembershipUser class, 189

meta packages, 431

MIME types, 149, 267

minification concept, 7, 282, 289–293

Mobile Application template

about, 12, 203

usage considerations, 226–228

ViewSwitcher widget and, 212

mobile feature detection, 218–220

Mobile template, 224

mobile views



browser-specific, 221–222

creating, 205

enhancing with jQuery Mobile, 209–215

loading layouts for, 207

overriding regular views with, 204

switching between desktop and, 212

mobile web development

adaptive rendering, 217–222

creating applications from scratch, 224–

228

features supporting, 203–205

improving mobile experience, 216

usability considerations, 205–216

mocking dependencies, 365–370

model binding

about, 21–23

data annotations and, 63

JSON and, 128, 130

registering binders, 132

specifying, 131–132

Model component (MVC pattern)

about, 5, 34

component interaction and, 88–90

Model First approach, 159, 161

@model keyword, 33

Model-View-Controller pattern (see MVC

pattern)

ModelBinderDictionary.GetBinder() method,

131

ModelBinders class, 131

Models folder, 13

ModelState class

about, 62

AddModelError() method, 62

monitoring system health, 338–341

MSBuild tool, 380, 405–407

Mustache template syntax, 120

mustache.js library, 120

MVC (Model-View-Controller) pattern

about, 4–6, 87

component interaction and, 88–90

Controller component, 6, 88–90

Model component, 5, 34, 88–90

reusing logic across requests, 123–127

separation of concerns principle, 87, 154

View component, 6, 88–90

MvcDonutCaching NuGet package, 257

MvcRouteHandler class, 311



466 | Index



www.it-ebooks.info



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Appendix D. Cross-Reference: Targeted Topics, Features, and Scenarios

Tải bản đầy đủ ngay(0 tr)

×