Home Page Icon
Home Page
Table of Contents for
Contents
Close
Contents
by David Matson, K. Scott Allen, Brad Wilson, Jon Galloway
Professional ASP.NET MVC 5
Chapter 1: Getting Started
A QUICK INTRODUCTION TO ASP.NET MVC
ASP.NET MVC 5 OVERVIEW
INSTALLING MVC 5 AND CREATING APPLICATIONS
THE MVC APPLICATION STRUCTURE
SUMMARY
Chapter 2: Controllers
THE CONTROLLER'S ROLE
A SAMPLE APPLICATION: THE MVC MUSIC STORE
CONTROLLER BASICS
SUMMARY
Chapter 3: Views
THE PURPOSE OF VIEWS
VIEW BASICS
UNDERSTANDING VIEW CONVENTIONS
STRONGLY TYPED VIEWS
VIEW MODELS
ADDING A VIEW
THE RAZOR VIEW ENGINE
SPECIFYING A PARTIAL VIEW
SUMMARY
Chapter 4: Models
MODELING THE MUSIC STORE
SCAFFOLDING A STORE MANAGER
EDITING AN ALBUM
MODEL BINDING
SUMMARY
Chapter 5: Forms and HTML Helpers
USING FORMS
HTML HELPERS
OTHER INPUT HELPERS
RENDERING HELPERS
SUMMARY
Chapter 6: Data Annotations and Validation
ANNOTATING ORDERS FOR VALIDATION
CUSTOM VALIDATION LOGIC
DISPLAY AND EDIT ANNOTATIONS
SUMMARY
Chapter 7: Membership, Authorization, and Security
SECURITY: NOT FUN, BUT INCREDIBLY IMPORTANT
USING THE AUTHORIZE ATTRIBUTE TO REQUIRE LOGIN
USING AUTHORIZEATTRIBUTE TO REQUIRE ROLE MEMBERSHIP
EXTENDING USER IDENTITY
EXTERNAL LOGIN VIA OAUTH AND OPENID
UNDERSTANDING THE SECURITY VECTORS IN A WEB APPLICATION
PROPER ERROR REPORTING AND THE STACK TRACE
SECURITY RECAP AND HELPFUL RESOURCES
SUMMARY
Chapter 8: Ajax
JQUERY
AJAX HELPERS
CLIENT VALIDATION
BEYOND HELPERS
IMPROVING AJAX PERFORMANCE
SUMMARY
Chapter 9: Routing
UNIFORM RESOURCE LOCATORS
INTRODUCTION TO ROUTING
INSIDE ROUTING: HOW ROUTES GENERATE URLS
INSIDE ROUTING: HOW ROUTES TIE YOUR URL TO AN ACTION
CUSTOM ROUTE CONSTRAINTS
USING ROUTING WITH WEB FORMS
SUMMARY
Chapter 10: NuGet
INTRODUCTION TO NUGET
ADDING A LIBRARY AS A PACKAGE
CREATING PACKAGES
PUBLISHING PACKAGES
SUMMARY
Chapter 11: ASP.NET Web API
DEFINING ASP.NET WEB API
GETTING STARTED WITH WEB API
WRITING AN API CONTROLLER
CONFIGURING WEB API
ADDING ROUTES TO YOUR WEB API
BINDING PARAMETERS
FILTERING REQUESTS
ENABLING DEPENDENCY INJECTION
EXPLORING APIS PROGRAMMATICALLY
TRACING THE APPLICATION
WEB API EXAMPLE: PRODUCTSCONTROLLER
SUMMARY
Chapter 12: Single Page Applications with AngularJS
UNDERSTANDING AND SETTING UP ANGULARJS
BUILDING THE WEB API
BUILDING APPLICATIONS AND MODULES
SUMMARY
Chapter 13: Dependency Injection
SOFTWARE DESIGN PATTERNS
DEPENDENCY RESOLUTION IN MVC
DEPENDENCY RESOLUTION IN WEB API
SUMMARY
Chapter 14: Unit Testing
UNDERSTANDING UNIT TESTING AND TEST-DRIVEN DEVELOPMENT
BUILDING A UNIT TEST PROJECT
ADVICE FOR UNIT TESTING YOUR ASP.NET MVC AND ASP.NET WEB API APPLICATIONS
SUMMARY
Chapter 15: Extending MVC
EXTENDING MODELS
EXTENDING VIEWS
EXTENDING CONTROLLERS
SUMMARY
Chapter 16: Advanced Topics
MOBILE SUPPORT
ADVANCED RAZOR
ADVANCED VIEW ENGINES
ADVANCED SCAFFOLDING
ADVANCED ROUTING
ADVANCED TEMPLATES
ADVANCED CONTROLLERS
SUMMARY
Chapter 17: Real-World ASP.NET MVC: Building the NuGet.org Website
MAY THE SOURCE BE WITH YOU
WEBACTIVATOR
ASP.NET DYNAMIC DATA
EXCEPTION LOGGING
PROFILING
DATA ACCESS
EF CODE–BASED MIGRATIONS
DEPLOYMENTS WITH OCTOPUS DEPLOY
AUTOMATED BROWSER TESTING WITH FLUENT AUTOMATION
OTHER USEFUL NUGET PACKAGES
SUMMARY
Appendix: ASP.NET MVC 5.1
ASP.NET MVC 5.1 RELEASE DESCRIPTION
ENUM SUPPORT IN ASP.NET MVC VIEWS
ATTRIBUTE ROUTING WITH CUSTOM CONSTRAINTS
BOOTSTRAP AND JAVASCRIPT ENHANCEMENTS
SUMMARY
Foreword
Introduction
Who This Book Is For
How This Book Is Structured
What You Need to Use This Book
Conventions
Source Code
Errata
p2p.wrox.com
Advertisement
End User License Agreement
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Chapter 1: Getting Started
Table of Contents
Chapter 1: Getting Started
A QUICK INTRODUCTION TO ASP.NET MVC
ASP.NET MVC 5 OVERVIEW
INSTALLING MVC 5 AND CREATING APPLICATIONS
THE MVC APPLICATION STRUCTURE
SUMMARY
Chapter 2: Controllers
THE CONTROLLER'S ROLE
A SAMPLE APPLICATION: THE MVC MUSIC STORE
CONTROLLER BASICS
SUMMARY
Chapter 3: Views
THE PURPOSE OF VIEWS
VIEW BASICS
UNDERSTANDING VIEW CONVENTIONS
STRONGLY TYPED VIEWS
VIEW MODELS
ADDING A VIEW
THE RAZOR VIEW ENGINE
SPECIFYING A PARTIAL VIEW
SUMMARY
Chapter 4: Models
MODELING THE MUSIC STORE
SCAFFOLDING A STORE MANAGER
EDITING AN ALBUM
MODEL BINDING
SUMMARY
Chapter 5: Forms and HTML Helpers
USING FORMS
HTML HELPERS
OTHER INPUT HELPERS
RENDERING HELPERS
SUMMARY
Chapter 6: Data Annotations and Validation
ANNOTATING ORDERS FOR VALIDATION
CUSTOM VALIDATION LOGIC
DISPLAY AND EDIT ANNOTATIONS
SUMMARY
Chapter 7: Membership, Authorization, and Security
SECURITY: NOT FUN, BUT INCREDIBLY IMPORTANT
USING THE AUTHORIZE ATTRIBUTE TO REQUIRE LOGIN
USING AUTHORIZEATTRIBUTE TO REQUIRE ROLE MEMBERSHIP
EXTENDING USER IDENTITY
EXTERNAL LOGIN VIA OAUTH AND OPENID
UNDERSTANDING THE SECURITY VECTORS IN A WEB APPLICATION
PROPER ERROR REPORTING AND THE STACK TRACE
SECURITY RECAP AND HELPFUL RESOURCES
SUMMARY
Chapter 8: Ajax
JQUERY
AJAX HELPERS
CLIENT VALIDATION
BEYOND HELPERS
IMPROVING AJAX PERFORMANCE
SUMMARY
Chapter 9: Routing
UNIFORM RESOURCE LOCATORS
INTRODUCTION TO ROUTING
INSIDE ROUTING: HOW ROUTES GENERATE URLS
INSIDE ROUTING: HOW ROUTES TIE YOUR URL TO AN ACTION
CUSTOM ROUTE CONSTRAINTS
USING ROUTING WITH WEB FORMS
SUMMARY
Chapter 10: NuGet
INTRODUCTION TO NUGET
ADDING A LIBRARY AS A PACKAGE
CREATING PACKAGES
PUBLISHING PACKAGES
SUMMARY
Chapter 11: ASP.NET Web API
DEFINING ASP.NET WEB API
GETTING STARTED WITH WEB API
WRITING AN API CONTROLLER
CONFIGURING WEB API
ADDING ROUTES TO YOUR WEB API
BINDING PARAMETERS
FILTERING REQUESTS
ENABLING DEPENDENCY INJECTION
EXPLORING APIS PROGRAMMATICALLY
TRACING THE APPLICATION
WEB API EXAMPLE: PRODUCTSCONTROLLER
SUMMARY
Chapter 12: Single Page Applications with AngularJS
UNDERSTANDING AND SETTING UP ANGULARJS
BUILDING THE WEB API
BUILDING APPLICATIONS AND MODULES
SUMMARY
Chapter 13: Dependency Injection
SOFTWARE DESIGN PATTERNS
DEPENDENCY RESOLUTION IN MVC
DEPENDENCY RESOLUTION IN WEB API
SUMMARY
Chapter 14: Unit Testing
UNDERSTANDING UNIT TESTING AND TEST-DRIVEN DEVELOPMENT
BUILDING A UNIT TEST PROJECT
ADVICE FOR UNIT TESTING YOUR ASP.NET MVC AND ASP.NET WEB API APPLICATIONS
SUMMARY
Chapter 15: Extending MVC
EXTENDING MODELS
EXTENDING VIEWS
EXTENDING CONTROLLERS
SUMMARY
Chapter 16: Advanced Topics
MOBILE SUPPORT
ADVANCED RAZOR
ADVANCED VIEW ENGINES
ADVANCED SCAFFOLDING
ADVANCED ROUTING
ADVANCED TEMPLATES
ADVANCED CONTROLLERS
SUMMARY
Chapter 17: Real-World ASP.NET MVC: Building the NuGet.org Website
MAY THE SOURCE BE WITH YOU
WEBACTIVATOR
ASP.NET DYNAMIC DATA
EXCEPTION LOGGING
PROFILING
DATA ACCESS
EF CODE–BASED MIGRATIONS
DEPLOYMENTS WITH OCTOPUS DEPLOY
AUTOMATED BROWSER TESTING WITH FLUENT AUTOMATION
OTHER USEFUL NUGET PACKAGES
SUMMARY
Appendix: ASP.NET MVC 5.1
ASP.NET MVC 5.1 RELEASE DESCRIPTION
ENUM SUPPORT IN ASP.NET MVC VIEWS
ATTRIBUTE ROUTING WITH CUSTOM CONSTRAINTS
BOOTSTRAP AND JAVASCRIPT ENHANCEMENTS
SUMMARY
Foreword
Introduction
Who This Book Is For
How This Book Is Structured
What You Need to Use This Book
Conventions
Source Code
Errata
p2p.wrox.com
Advertisement
End User License Agreement
Pages
xxvii
xxviii
xxix
xxx
xxxi
xxxii
xxxiii
xxxiv
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
405
400
401
402
403
404
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
Guide
Cover
Table of Contents
Foreword
Introduction
Begin Reading
List of Illustrations
Figure 1.1
Figure 1.2
Figure 1.3
Figure 1.4
Figure 1.5
Figure 1.6
Figure 1.7
Figure 1.8
Figure 1.9
Figure 1.10
Figure 1.11
Figure 1.12
Figure 1.13
Figure 1.14
Figure 2.1
Figure 2.2
Figure 2.3
Figure 2.4
Figure 2.5
Figure 2.6
Figure 2.7
Figure 2.8
Figure 2.9
Figure 2.10
Figure 2.11
Figure 2.12
Figure 2.13
Figure 2.14
Figure 2.15
Figure 3.1
Figure 3.2
Figure 3.3
Figure 3.4
Figure 3.5
Figure 3.6
Figure 4.1
Figure 4.2
Figure 4.3
Figure 4.4
Figure 4.5
Figure 4.6
Figure 4.7
Figure 4.8
Figure 4.9
Figure 4.10
Figure 4.10
Figure 4.11
Figure 4.12
Figure 4.12
Figure 4.13
Figure 5.1
Figure 5.2
Figure 5.3
Figure 5.4
Figure 6.1
Figure 6.2
Figure 6.3
Figure 6.4
Figure 6.5
Figure 6.6
Figure 6.7
Figure 6.8
Figure 6.9
Figure 6.10
Figure 6.11
Figure 6.12
Figure 7.1
Figure 7.2
Figure 7.3
Figure 7.4
Figure 7.5
Figure 7.6
Figure 7.7
Figure 7.8
Figure 7.9
Figure 7.10
Figure 7.11
Figure 7.12
Figure 7.13
Figure 7.14
Figure 7.15
Figure 7.16
Figure 7.17
Figure 7.18
Figure 7.19
Figure 7.20
Figure 8.1
Figure 8.2
Figure 8.3
Figure 8.4
Figure 8.5
Figure 8.6
Figure 8.7
Figure 8.8
Figure 8.9
Figure 8.10
Figure 8.11
Figure 9.1
Figure 9.2
Figure 9.3
Figure 9.4
Figure 10.1
Figure 10.2
Figure 10.3
Figure 10.4
Figure 10.5
Figure 10.6
Figure 10.7
Figure 10.8
Figure 10.9
Figure 10.10
Figure 10.11
Figure 10.12
Figure 10.13
Figure 10.14
Figure 10.15
Figure 10.16
Figure 10.17
Figure 10.18
Figure 10.19
Figure 10.20
Figure 10.21
Figure 10.22
Figure 10.23
Figure 10.24
Figure 10.25
Figure 10.26
Figure 11.1
Figure 11.2
Figure 12.1
Figure 12.2
Figure 12.3
Figure 12.4
Figure 12.5
Figure 12.6
Figure 12.7
Figure 12.8
Figure 12.9
Figure 12.10
Figure 12.11
Figure 12.12
Figure 12.13
Figure 12.14
Figure 14.1
Figure 15.1
Figure 15.2
Figure 16.1
Figure 16.2
Figure 16.3
Figure 16.4
Figure 16.5
Figure 16.6
Figure 16.7
Figure 16.8
Figure 16.9
Figure 16.10
Figure 16.11
Figure 16.12
Figure 16.13
Figure 16.14
Figure 16.15
Figure 16.16
Figure 16.17
Figure 17.1
Figure 17.2
Figure 17.3
Figure 17.4
Figure 17.5
Figure 17.6
Figure 17.7
Figure 17.8
Figure 17.9
Figure 17.10
Figure 17.11
Figure 17.12
Figure 17.13
Figure 17.14
Figure A.1
Figure A.2
Figure A.3
Figure A.4
Figure A.5
Figure A.6
Figure A.7
Figure A.8
Figure A.9
Figure A.10
Figure A.11
Figure A.12
Figure A.13
List of Tables
Table 1.1
Table 3.1
Table 7.1
Table 7.2
Table 8.1
Table 8.2
Table 9.1
Table 9.2
Table 9.3
Table 9.4
Table 9.5
Table 9.6
Table 9.7
Table 10.1
Table 10.2
Table 10.3
Table 10.4
Table 10.5
Table 10.6
Table 10.7
Table 13.1
Table 13.2
Table 13.3
Table 14.1
Table 14.2
Table 14.3
Table 16.1
Table 16.2
Table 16.3
Table 16.4
Table 16.5
Table 16.6
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset