𝔖 Scriptorium
✦   LIBER   ✦

📁

ASP.NET MVC 2 in Action

✍ Scribed by Jeffrey Palermo, Ben Scheirman, Jimmy Bogard, Eric Hexter, Matthew Hinze


Publisher
Manning Publications
Year
2010
Tongue
English
Leaves
432
Edition
2
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


this is a good introduction to ASP.NET MVC, but there is a lack of global schemes

✦ Table of Contents


Cover......Page 1
ASP.NET MVC 2 in Action......Page 4
193518279X......Page 5
brief contents......Page 6
contents......Page 8
foreword......Page 16
foreword to the first edition......Page 17
preface......Page 19
preface to the first edition......Page 21
acknowledgments......Page 24
Ben Scheirman......Page 25
Matthew Hinze......Page 26
about this book......Page 27
Who should read this book?......Page 28
Roadmap......Page 29
Author Online......Page 30
about the authors......Page 31
About the technical editor......Page 33
about the cover illustration......Page 34
Part 1 - High-speed fundamentals......Page 36
1.1 Welcome to ASP.NET MVC......Page 38
1.2 The MVC pattern......Page 39
1.3 Creating your first ASP.NET MVC 2 project......Page 40
1.4 Creating controllers and actions......Page 45
1.5 Creating views......Page 46
1.6 Improving your application......Page 51
1.7 Summary......Page 56
Presentation model......Page 57
2.1 The M in MVC......Page 58
2.3 ViewData.Model......Page 59
2.4 Representing user input......Page 60
2.4.1 Designing the model......Page 61
2.4.2 Presenting the input model in a view......Page 62
2.5.1 Designing the model......Page 63
2.6 Summary......Page 65
View fundamentals......Page 66
3.2 Examining the ViewDataDictionary......Page 67
3.3 Strongly typed views with a view model......Page 69
3.4 Displaying view model data in a view......Page 70
3.5.1 EditorFor and DisplayFor templates......Page 75
3.5.2 Built-in templates......Page 77
3.5.3 Selecting templates......Page 78
3.5.4 Customizing templates......Page 80
3.6 Summary......Page 84
Controller basics......Page 85
4.1 The anatomy of a controller......Page 86
4.2 Storyboarding an application......Page 87
4.3 Transforming a model to a view model......Page 88
4.4 Accepting input......Page 89
4.4.1 Handling the successful storyboard path in an action......Page 90
4.4.2 Using the Post-Redirect-Get pattern......Page 91
4.4.3 Handling the failure processing of the action input......Page 93
4.5.1 Testing the RedirectController......Page 94
4.5.3 Using test doubles, such as stubs and mocks......Page 97
4.5.4 Elements of a good controller unit test......Page 99
4.6 Summary......Page 100
Consuming third-party components......Page 101
5.1.1 Using the MvcContrib Grid......Page 102
5.1.2 MvcContrib Grid advanced usage......Page 103
5.2 The SlickUpload component......Page 104
5.3 Summary......Page 112
6.1 Deployment scenarios......Page 113
6.2 XCOPY deployment......Page 114
6.3 Deploying to IIS 7......Page 115
6.4 Deploying to IIS 6 and earlier......Page 119
6.4.1 Configuring routes to use the .aspx extension......Page 120
6.4.2 Configuring routes to use a custom extension......Page 121
6.4.3 Using wildcard mapping with selective disabling......Page 123
6.4.4 Using URL rewriting......Page 126
6.5 Summary......Page 128
Leveraging existing ASP.NET features......Page 130
7.1.1 The TextBox......Page 131
7.1.2 Other common controls......Page 132
7.1.3 The GridView......Page 134
7.1.4 Where do I get the good stuff?......Page 135
7.2.1 Caching......Page 136
7.2.2 Session state......Page 140
7.2.4 Request storage......Page 141
7.3 Tracing and debugging......Page 142
7.3.2 Health monitoring......Page 143
7.4.1 Leveraging ASP.NET personalization......Page 144
7.4.2 Leveraging ASP.NET localization......Page 145
7.5 Implementing ASP.NET site maps......Page 149
7.6 Summary......Page 151
Part 2 - Journeyman techniques......Page 152
Domain model......Page 154
8.1 Understanding the basics of domain-driven design......Page 155
8.2 A sample domain model......Page 156
8.2.2 Aggregates......Page 157
8.2.3 Persistence for the domain model......Page 159
8.3 Summary......Page 161
Extending the controller......Page 162
9.1 Controller extensibility......Page 163
9.3 Action, authorization, and result filters......Page 164
9.4 Action selectors......Page 166
9.5.1 Removing duplication with an action result......Page 167
9.5.2 Using action results to abstract hard-to-test dependencies......Page 169
9.6 Summary......Page 170
Advanced view techniques......Page 171
10.1.1 Master pages......Page 172
10.1.2 Partials......Page 174
10.1.3 Child actions......Page 175
10.2 Building query-string parameter lists......Page 177
10.3 Exploring the Spark view engine......Page 179
10.3.1 Installing and configuring Spark......Page 180
10.3.2 Simple Spark view example......Page 181
10.4 Summary......Page 186
Security......Page 187
11.1.2 Requiring authorization with AuthorizeAttribute......Page 188
11.1.3 AuthorizeAttribute—how it works......Page 189
11.2.1 XSS in action......Page 190
11.2.2 Avoiding XSS vulnerabilities......Page 193
11.3.1 XSRF in action......Page 195
11.3.2 Preventing XSRF......Page 197
11.3.3 JSON hijacking......Page 199
11.4 Summary......Page 201
Ajax in ASP.NET MVC......Page 202
12.1 Diving into Ajax with an example......Page 203
12.2 Ajax with ASP.NET Web Forms......Page 205
12.3 Ajax in ASP.NET MVC......Page 207
12.3.1 Introducing jQuery......Page 208
12.3.2 Implementing the Hijax technique......Page 209
12.3.3 Ajax with JSON......Page 214
12.3.4 Adding alternate view formats to the controller......Page 217
12.3.5 Consuming a JSON action from the view......Page 219
12.3.6 Ajax helpers......Page 221
12.4 Summary......Page 223
13.1 What are controller factories?......Page 225
13.2 Creating a custom controller factory......Page 227
13.3 Enabling dependency injection in your controllers......Page 228
13.4 Creating a StructureMap controller factory......Page 229
13.5 Creating a Ninject controller factory......Page 232
13.6 Creating a Castle Windsor controller factory......Page 235
13.7 Summary......Page 237
Model binders and value providers......Page 238
14.1 Creating a custom model binder......Page 239
14.2 Using custom value providers......Page 244
14.3 Summary......Page 249
15.1 Validation with Data Annotations......Page 250
15.2 Extending the ModelMetadataProvider......Page 253
15.3 Client-side validation with ASP.NET Ajax......Page 256
15.4 Summary......Page 259
Part 3 - Mastering ASP.NET MVC......Page 260
Routing......Page 262
16.1.1 What’s that curl command?......Page 263
16.1.2 Taking back control of the URL with routing......Page 265
16.2.1 Make simple, clean URLs......Page 266
16.2.2 Make hackable URLs......Page 267
16.2.4 Keep URLs short......Page 268
16.2.6 Consider adding unnecessary information......Page 269
16.3 Implementing routes in ASP.NET MVC......Page 271
16.3.1 URL schema for an online store......Page 273
16.3.2 Adding a custom static route......Page 274
16.3.3 Adding a custom dynamic route......Page 275
16.3.4 Catchall routes......Page 276
16.4 Using the routing system to generate URLs......Page 278
16.5 Testing route behavior......Page 279
16.6 Using routing with existing ASP.NET projects......Page 283
16.7 Summary......Page 285
Deployment techniques......Page 286
17.1 Employing continuous integration......Page 287
17.2 Enabling push-button XCOPY deployments......Page 288
17.3 Managing environment configurations......Page 289
17.4 Enabling remote server deployments with Web Deploy......Page 291
17.5 Summary......Page 292
Mapping with AutoMapper......Page 293
18.1 Introducing AutoMapper......Page 294
18.2 Life before AutoMapper......Page 295
18.3 AutoMapper basics......Page 297
18.3.2 AutoMapper profiles......Page 298
18.3.3 Sanity checking......Page 299
18.3.4 Reducing repetitive formatting code......Page 300
18.4 Summary......Page 302
Lightweight controllers......Page 303
19.1.3 Focusing on the controller’s responsibility......Page 304
19.2 Managing common view data......Page 306
19.3 Deriving action results......Page 311
19.4 Using an application bus......Page 313
19.5 Summary......Page 316
Full system testing......Page 318
20.1.1 Installing the testing software......Page 319
20.1.2 Walking through the test manually......Page 320
20.1.3 Automating the test......Page 322
20.2 Building maintainable navigation......Page 324
20.3 Interacting with forms......Page 328
20.4 Asserting results......Page 331
20.5 Summary......Page 335
Organization with areas......Page 336
21.1 Creating a basic area......Page 337
21.2 Managing links and URLs with T4MVC......Page 342
21.3 Summary......Page 346
Portable areas......Page 347
22.2 A simple portable area......Page 348
22.3 Consuming portable areas......Page 350
22.4 Creating an RSS widget with a portable area......Page 351
22.5 Distributing the RssWidget......Page 354
22.6 Interacting with the portable area bus......Page 355
22.7 Summary......Page 356
Data access with NHibernate......Page 357
23.1 Functional overview of reference implementation......Page 358
23.2 Application architecture overview......Page 359
23.3 Domain model—the application core......Page 360
23.4 NHibernate configuration—infrastructure of the application......Page 362
23.4.1 NHibernate’s configuration......Page 364
23.4.2 The NHibernate mapping—simple but powerful......Page 365
23.4.3 Initializing the configuration......Page 367
23.5 UI is the presentation of the model......Page 373
23.6 Pulling it together......Page 376
23.7 Summary......Page 380
Part 4 - Cross-cutting advanced topics......Page 382
24.1 Extending the routing system......Page 384
24.2 Inspecting routes at runtime......Page 387
24.3 Summary......Page 390
25.1 Creating custom T4 templates......Page 391
25.2 Adding a custom test project template to the new project wizard......Page 396
25.3 Summary......Page 398
Testing practices......Page 399
26.1 Testing routes......Page 400
26.2 Avoiding test complexity......Page 404
26.3 Testing controllers......Page 405
26.4 Testing model binders......Page 408
26.5 Testing action filters......Page 411
26.6 Summary......Page 414
Recipe: creating an autocomplete text box......Page 415
27.1 Creating the basic autocomplete text box......Page 416
27.2 Styling the results......Page 419
27.3 Summary......Page 420
A......Page 422
C......Page 423
E......Page 424
I......Page 425
L......Page 426
O......Page 427
R......Page 428
T......Page 429
W......Page 430
Z......Page 431
Back cover......Page 432


📜 SIMILAR VOLUMES


ASP.NET MVC 2 in Action
✍ Jeffrey Palermo, Ben Scheirman, Jimmy Bogard, Eric Hexter, Matthew Hinze 📂 Library 📅 2010 🌐 English
ASP.NET MVC in Action
✍ Jeffrey Palermo, Ben Scheirman, Jimmy Bogard 📂 Library 📅 2009 🏛 Manning Publications 🌐 English

The Model-View-Controller pattern—universally known as MVC—provides a stable, testable approach to web application development by separating the major functions—or concerns—of an application into independently defined roles.ASP.NET MVC in Action is a comprehensive guide to MVC-based development usin

ASP.NET MVC in Action
✍ Jeffrey Palermo / Ben Scheirman / Jimmy Bogard 📂 Library 📅 2009 🏛 Manning Publications 🌐 English

内容简介 · · · · · · HIGHLIGHT An insider's perspective on the ASP.NET MVC framework, a highly-anticipated product that forms the basis for the next version of ASP.NET. DESCRIPTION The MVC pattern is widely accepted as the best practice for web development and is at the core of Rails, Zend Framework,

ASP.Net MVC in Action
✍ Jeffrey Palermo, Ben Scheirman, Jimmy Bogard 📂 Library 📅 2009 🏛 Manning 🌐 English

<DIV><p>The Model-View-Controller pattern—universally known as MVC—provides a stable, testable approach to web application development by separating the major functions—or concerns—of an application into independently defined roles.</p> <p> ASP.NET MVC in Action is a comprehensive guide to MVC-b

ASP.NET MVC 4 in Action
✍ Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, Jeremy Skinner 📂 Library 📅 2012 🏛 Manning Publications 🌐 English

ASP.NET MVC 4 in Action is a fast-paced tutorial designed to introduce ASP.NET MVC to .NET developers and show how to apply it effectively. All examples in this revised edition are based on ASP.NET MVC 4, so youll get full coverage of features such as the Razor view engine, Web Matrix helpers, and i

ASP.NET MVC 4 in Action
✍ Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, Jeremy Skinner 📂 Library 📅 2012 🏛 Manning 🌐 English

ASP.NET MVC 4 in Action is a fast-paced tutorial designed to introduce ASP.NET MVC to .NET developers and show how to apply it effectively. All examples in this revised edition are based on ASP.NET MVC 4, so you'll get full coverage of features such as the Razor view engine, Web Matrix helpers, and