: Steven Sanderson
: Pro ASP.NET MVC Framework
: Apress
: 9781430210085
: 1
: CHF 46.90
:
: Allgemeines, Lexika
: English
: 550
: Wasserzeichen/DRM
: PC/MAC/eReader/Tablet
: PDF

Steven Sanderson has seen the ASP.NET MVC framework mature from the start, so his experience, combined with comprehensive coverage of all its features, including those in the official MVC development toolkit, offers the clearest understanding of how this exciting framework could improve your coding efficiency-and you'll gain invaluable awareness of security, deployment, and interoperability challenges.

The ASP.NET MVC Framework is the evolution of Microsoft's ASP.NET web platform. It introduced a radical high-productivity programming model that promotes cleaner code architecture, test-driven development, and powerful extensibility, combined with all the benefits of ASP.NET 3.5.

An integral benefit of this book is that the core Model-View-Controller architectural concepts are not simply explained or discussed in isolation, but demonstrated in action. You'll work through an extended tutorial to create a working e-commerce web application that combines ASP.NET MVC with the latest C# 3.0 language features and unit-testing best practices. By gaining this invaluable, practical experience, you can discover MVCs strengths and weaknesses for yourself-and put your best learned theory into practice.



After a childhood spent at the computer, Steven Sanderson started web development in 1996, first using Perl and later adopting PHP. His last five years of professional experience have focused on ASP.NET, learning what works and what works better, and experiencing a developer's life everywhere from an investment bank to a five-person Internet startup. Steven has led Red Gate's web development team, and spends his free time blogging and keeping up to speed with the latest technology developments. He's followed the ASP.NET MVC framework since its inception and frequently participates in online discussions with its core developers at Microsoft.
Contents at a Glance5
Contents6
About the Author17
About the Technical Reviewer18
Acknowledgments19
Introduction20
Who This Book Is For20
How This Book Is Structured21
Sample Code21
Errata21
Customer Support21
Contacting the Author22
Part 1 Introducing ASP.NET MVC23
Chapter 1 What s the Big Idea?24
A Brief History of Web Development24
Web Development Today26
Key Benefits of ASP.NET MVC28
Who Should Use ASP.NET MVC?31
Summary34
Chapter 2 Your First ASP.NET MVC Application35
Preparing Your Workstation35
Creating a New ASP.NET MVC Project36
Rendering Web Pages40
A Starter Application43
Summary55
Chapter 3 Prerequisites56
Understanding Model-View-Controller Architecture56
Domain Modeling63
Building Loosely Coupled Components75
Getting Started with Automated Testing80
New C# 3 Language Features87
Summary99
Chapter 4 SportsStore: A Real Application100
Getting Started101
Starting Your Domain Model104
Displaying a List of Products106
Connecting to a Database111
Setting Up Inversion of Control116
Creating Automated Tests121
Configuring a Custom URL Schema125
Styling It Up133
Summary138
Chapter 5 SportsStore: Navigation and Shopping Cart139
Adding Navigation Controls139
Building the Shopping Cart158
Submitting Orders174
Summary187
Chapter 6 SportsStore: Administration and Final Enhancements188
Adding Catalog Management189
Securing the Administration Features205
Image Uploads212
Part 2 ASP.NET MVC in Detail218
Chapter 7 Overview of ASP.NET MVC Projects219
Developing MVC Applications in Visual Studio219
The Request Processing Pipeline229
Summary235
Chapter 8 URLs and Routing236
Putting the Programmer Back in Control236
Setting Up Routes237
Generating Outgoing URLs251
Unit Testing Your Routes260
Further Customization266
URL Schema Best Practices268
Summary273
Chapter 9 Controllers and Actions274
An Overview274
Receiving Input277
Producing Output281
Using Filters to Attach Reusable Behaviors301
Controllers As Part of the Request Processing Pipeline318
Testing Controllers and Actions327
Summary335
Chapter 10 Views336
How Views Fit into ASP.NET MVC336
WebForms View Engine Basics338
Using Inline Code339
Understanding How MVC Views Actually Work341
Using HTML Helper Methods347
Using Partial Views359
Using Html.RenderAction to Create Reusable Widgets with Application Logic366
Sharing Page Layouts Using Master Pages370
Implementing a Custom View Engine373
Summary383
Chapter 11 Data Entry384
Model Binding384
Validation398
Wizards and Multistep Forms411
Verification421
Summary433
Chapter 12 Ajax and Client Scripting434
Why You Should Use a JavaScript Toolkit434
ASP.NET MVC s Ajax Helpers435
Using jQuery with ASP.NET MVC446
Summary473
Chapter 13 Security and Vulnerability474
All Input Can Be Forged474
Cross-Site Scripting and HTML Injection478
Session Hijacking483
Cross-Site Request Forgery485
SQL Injection488
Using the MVC Framework Securely490
Summary491
Chapter 14 Deployment492
Server Requirements492
IIS Basics493
Deploying Your Application498
Making Your Application Behave Well in Production512
Summary518
Chapter 15 ASP.NET Platform Features519
Windows Authentication520
Forms Authentication523
Membership, Roles, and Profiles528
URL-Based Authorization543
Data Caching544
Site Maps548
Internationalization554
Performance560
Summary568
Chapter 16 Combining MVC and WebForms569
Using WebForms Technologies in an MVC Application569
Using ASP.NET MVC in a WebForms Application577
Summary585
Index586