, ASP.NET MVC Framework Preview, Książki, ▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Apress Books 

ASP.NET MVC Framework Preview

ASP.NET MVC Framework Preview, Książki, ▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Apress Books
[ Pobierz całość w formacie PDF ]
Contents
Chapter 1: What’s the Big Idea ....................................................1
Traditional ASP.NET.............................................................................. 2
What’s Wrong with Traditional ASP.NET? .......................................... 3
Web Development Today ........................................................................ 5
Web Standards and REST ............................................................................. 5
Agile and Test-Driven Development ............................................................ 5
Ruby on Rails ................................................................................................ 6
Key Benefits of ASP.NET MVC ............................................................. 7
Model-View-Controller Architecture............................................................ 8
Extensibility................................................................................................... 8
Testability ...................................................................................................... 9
Tight Control over HTML........................................................................... 10
Powerful New Routing System ................................................................... 10
Built on the Best Parts of the ASP.NET Platform ...................................... 11
.NET 3.5 Language Innovations ................................................................. 12
Get the Source Code.................................................................................... 12
Who Should Use ASP.NET MVC? ...................................................... 13
Comparisons with ASP.NET WebForms.................................................... 13
Comparisons with Ruby on Rails................................................................ 15
Comparisons with MonoRail ...................................................................... 16
Summary................................................................................................ 17
ASP.NET MVC Framework Preview
i
Chapter 2: Your First ASP.NET MVC Application...........................19
Preparing Your Workstation ................................................................ 19
Creating a New ASP.NET MVC Project.............................................. 20
Removing Unnecessary Files ...................................................................... 21
How Does It Work?..................................................................................... 24
Rendering Web Pages ........................................................................... 25
Creating and Rendering a View .................................................................. 26
Adding Dynamic Output ............................................................................. 28
A Starter Application ............................................................................ 30
The Story ..................................................................................................... 30
Linking Between Pages ............................................................................... 31
Designing a Data Model.............................................................................. 34
Building a Strongly Typed Form ................................................................ 35
Handling Form Submissions ....................................................................... 40
Adding Validation ....................................................................................... 42
Preserving Form Data.................................................................................. 47
Finishing Off ............................................................................................... 48
Summary................................................................................................ 50
Chapter 3: Architecture .............................................................51
Understanding Model-View-Controller Architecture.......................... 51
The Smart UI (Anti-Pattern) ....................................................................... 52
Separating Out the Domain Model.............................................................. 54
Three-Tier Architecture............................................................................... 56
Model-View-Controller Architecture.......................................................... 57
Variations on Model-View-Controller ........................................................ 61
ii
ASP.NET MVC Framework Preview
 Domain Modeling.................................................................................. 63
An Example Domain Model ....................................................................... 64
Entities and Value Objects .......................................................................... 64
Ubiquitous Language .................................................................................. 65
Aggregates and Simplification .................................................................... 66
Keeping Data Access Code in Repositories ................................................ 69
Using LINQ to SQL .................................................................................... 71
Building Loosely Coupled Components............................................... 80
Taking a Balanced Approach ...................................................................... 82
Using Inversion of Control.......................................................................... 83
Using an IoC Container............................................................................... 87
Getting Started with Automated Testing .............................................. 90
Unit Tests and Integration Tests.................................................................. 93
The Red-Green Development Style ............................................................ 94
Summary................................................................................................ 99
Appendix: New C# 3 Language Features .................................. 101
The Design Goal: Language Integrated Query ................................. 101
Extension Methods.............................................................................. 102
Lambda Methods ................................................................................. 104
Generic Type Inference ...................................................................... 105
Automatic Properties........................................................................... 105
Object and Collection Initializers ....................................................... 107
Type Inference..................................................................................... 108
Anonymous Types ............................................................................... 108
Putting It All Together ........................................................................ 110
Deferred Execution ............................................................................. 112
ASP.NET MVC Framework Preview
iii
 Using LINQ to Objects........................................................................ 112
Lambda Expressions ........................................................................... 114
IQueryable<T> and LINQ to SQL ..................................................... 115
LINQ to Everything ............................................................................ 118
Related Titles ......................................................................... 119
iv
ASP.NET MVC Framework Preview
  [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • dodatni.htw.pl