Pro ASP.NET MVC Framework
✍ Scribed by Steven Sanderson
- Publisher
- Apress
- Year
- 2009
- Tongue
- English
- Leaves
- 618
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Steven Sanderson has seen the ASP.NET MVC framework mature from the start, so his experience, combined with comprehensive coverage of all the new features, including those in the official MVC development toolkit, offers the clearest understanding of how this exciting new framework could improve your coding efficiency—and you’ll gain invaluable up–to–date awareness of security, deployment, and interoperability challenges.
The ASP.NET MVC Framework is the latest evolution of Microsoft’s ASP.NET web platform. It introduces a radically new 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.
What you’ll learn
- Gain a solid architectural background to ASP.NET MVC, including Model–View–Controller and REST concepts.
- Explore the ASP.NET MVC framework with detailed coverage of all aspects of the framework and the official MVC development toolkit.
- See how it works with test–driven development in action.
- Capitalize on your existing knowledge quickly and easily through translation and comparison of features in classic ASP.NET to those in ASP.NET MVC.
- Learn about the latest security and deployment issues, including IIS 7.0.
Who is this book for?
This book is for web developers with a basic knowledge of ASP.NET and C# who want, or need, to start using the new ASP.NET MVC framework.
About the Apress Pro Series
The Apress Pro series books are practical, professional tutorials to keep you on and moving up the professional ladder.
You have gotten the job, now you need to hone your skills in these tough competitive times. The Apress Pro series expands your skills and expertise in exactly the areas you need. Master the content of a Pro book, and you will always be able to get the job done in a professional development project. Written by experts in their field, Pro series books from Apress give you the hard–won solutions to problems you will face in your professional programming career.
✦ Table of Contents
Prelims
......Page 1
Contents at a Glance......Page 7
Contents......Page 9
About the Author......Page 20
About the Technical Reviewer......Page 21
Acknowledgments......Page 22
Who This Book Is For......Page 23
Customer Support......Page 24
Contacting the Author......Page 25
Unknown......Page 0
SP.NET MVC is a radical shift for web developers using the Microsoft platform. This new framework emphasizes clean architecture,......Page 27
A Brief History of Web Development......Page 29
What’s Wrong with Traditional ASP.NET?......Page 30
Web Development Today......Page 31
Ruby on Rails......Page 32
Model-View-Controller Architecture......Page 33
Tight Control over HTML......Page 34
Built on the Best Parts of the ASP.NET Platform......Page 35
Who Should Use ASP.NET MVC?......Page 36
Comparisons with Ruby on Rails......Page 37
Comparisons with MonoRail......Page 38
Summary......Page 39
Preparing Your Workstation......Page 41
Creating a New ASP.NET MVC Project......Page 42
Removing Unnecessary Files......Page 44
How Does It Work?......Page 45
Creating and Rendering a View......Page 46
Adding Dynamic Output......Page 48
Linking Between Actions......Page 49
Adding a Model Class......Page 51
Building a Form......Page 52
Dude, Where’s My Data?......Page 53
Introducing Model Binding......Page 54
Introducing Strongly Typed Views......Page 55
Adding Validation......Page 57
Model Binding Tells Input Controls to Redisplay User-Entered Values......Page 58
Finishing Off......Page 59
Summary......Page 61
Understanding Model-View-Controller Architecture......Page 63
The Smart UI (Anti-Pattern)......Page 64
Model-View Architecture......Page 65
Three-Tier Architecture......Page 66
Model-View-Controller Architecture......Page 67
History and Benefits......Page 68
Model-View-Presenter......Page 69
An Example Domain Model......Page 70
Ubiquitous Language......Page 71
Aggregates and Simplification......Page 72
Keeping Data Access Code in Repositories......Page 74
Using LINQ to SQL......Page 75
WHAT’S A DATACONTEXT?......Page 76
Implementing the Auctions Domain Model......Page 77
Implementing the Auction Repositories......Page 80
Building Loosely Coupled Components......Page 82
Using Inversion of Control......Page 83
An MVC-Specific Example......Page 85
Meet Castle Windsor......Page 86
Getting Started with Automated Testing......Page 87
Unit Tests and Integration Tests......Page 89
The Red-Green Development Style......Page 90
So, Was It Worth It?......Page 93
Extension Methods......Page 94
Lambda Methods......Page 96
Automatic Properties......Page 97
Object and Collection Initializers......Page 98
Anonymous Types......Page 99
Putting It All Together......Page 100
Deferred Execution......Page 101
Using LINQ to Objects......Page 102
Lambda Expressions......Page 103
IQueryable
Summary......Page 106
SportsStore: A Real Application......Page 107
Getting Started......Page 108
Creating Your Solutions and Projects......Page 109
Creating an Abstract Repository......Page 111
Making a Fake Repository......Page 112
Removing Unnecessary Files......Page 113
Adding the First Controller......Page 114
Setting Up the Default Route......Page 115
Adding the First View......Page 116
Defining the Database Schema......Page 118
Setting Up LINQ to SQL......Page 120
Creating a Real Repository......Page 121
Creating a Custom Controller Factory......Page 123
Using Your IoC Container......Page 125
Choosing a Component Lifestyle......Page 127
Creating Automated Tests......Page 128
TESTING: GETTING STARTED......Page 129
Configuring a Custom URL Schema......Page 132
Adding a RouteTable Entry......Page 133
Displaying Page Links......Page 134
TESTING: DESIGNING THE PAGELINKS HELPER......Page 135
Making the HTML Helper Method Visible to All View Pages......Page 137
TESTING: PAGE NUMBERS AND PAGE COUNTS......Page 138
Defining Page Layout in the Master Page......Page 140
Adding CSS Rules......Page 141
Creating a Partial View......Page 143
Summary......Page 145
Adding Navigation Controls......Page 147
TESTING: FILTERING THE PRODUCTS LIST BY CATEGORY......Page 148
TESTING: UPDATING YOUR TESTS......Page 149
Implementing the Category Filter......Page 150
Defining a URL Schema for Categories......Page 151
TESTING: INBOUND ROUTE MAPPING......Page 152
TESTING: OUTBOUND URL GENERATION......Page 154
Building a Category Navigation Menu......Page 157
Creating the Navigation Controller......Page 158
TESTING: GENERATING THE LIST OF CATEGORY LINKS......Page 160
Selecting and Rendering a List of Category Links......Page 161
Highlighting the Current Category......Page 163
TESTING: SELECTING THE CORRECT NAVLINK TO HIGHLIGHT......Page 164
TESTING: UPDATING YOUR TESTS......Page 165
Building the Shopping Cart......Page 166
Defining the Cart Entity......Page 167
TESTING: SHOPPING CART BEHAVIOR......Page 168
Adding “Add to Cart” Buttons......Page 170
Multiple
✦ Subjects
Библиотека;Компьютерная литература;ASP.NET / MVC / Web Services;ASP.NET MVC;
📜 SIMILAR VOLUMES
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
<p><p><strong>Steven Sanderson</strong> 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 cou
Author Steven Sanderson has seen the ASP.NET MVC Framework mature from the start, so his experience, combined with comprehensive coverage of all the new features, including those in the official MVC development toolkit, offers the clearest understanding of how this exciting new framework can improve
Author Steven Sanderson has seen the ASP.NET MVC Framework mature from the start, so his experience, combined with comprehensive coverage of all the new features, including those in the official MVC development toolkit, offers the clearest understanding of how this exciting new framework can improve
The ASP.NET MVC 3 Framework is the latest evolution of Microsoft’s ASP.NET web platform. It provides a high-productivity programming model that promotes cleaner code architecture, test-driven development, and powerful extensibility, combined with all the benefits of ASP.NET 4. In this third edition