This book begins with you working along as Scott Guthrie builds a complete ASP.NET MVC reference application. He begins NerdDinner by using the File->New Project menu command within Visual Studio to create a new ASP.NET MVC Application. You'll then incrementally add functionality and features. Along
Professional ASP.NET MVC 1.0
β Scribed by Rob Conery, Scott Hanselman, Phil Haack, Scott Guthrie
- Publisher
- Wrox
- Year
- 2009
- Tongue
- English
- Leaves
- 196
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
This book begins with you working along as Scott Guthrie builds a complete ASP.NET MVC reference application. He begins NerdDinner by using the File->New Project menu command within Visual Studio to create a new ASP.NET MVC Application. You'll then incrementally add functionality and features. Along the way youβll cover how to create a database, build a model layer with business rule validations, implement listing/details data browsing, provide CRUD (Create, Update, Delete) data form entry support, implement efficient data paging, reuse UI using master pages and partials, secure the application using authentication and authorization, use AJAX to deliver dynamic updates and interactive map support, and implement automated unit testing.From there, the bulk of the rest of the book begins with the basic concepts around the model view controller pattern, including the little history and the state of the MVC on the web today. We'll then go into the ways that MVC is different from ASP.NET Web Forms. We'll explore the structure of a standard MVC application and see what you get out of the box. Next we dig deep into routing and see the role URLs play in your application. We'll deep dive into controllers and views and see what role the Ajax plays in your applications. The last third of the book focuses entirely on advanced techniques and extending the framework.In some places, we assume that you're somewhat familiar with ASP.NET WebForms, at least peripherally. There are a lot of ASP.NET WebForms developers out there who are interested in ASP.NET MVC so there are a number of places in this book where we contrast the two technologies. Even if you're not already an ASP.NET developer, you might still find these sections interesting for context, as well as for your own edification as ASP.NET MVC may not be the web technology that you're looking for.Itβs worth noting, that ASP.NET MVC is not a replacement for ASP.NET Web Forms (aka just "ASP.NET"). Many web developers have been giving a lot of attention to other web frameworks out there (Ruby on Rails, Django) which have embraced the MVC (Model-View-Controller) application pattern, and if youβre one of those developers, or even if youβre just curious, this book is for you.MVC allows for (buzzword alert!) a "greater separation of concerns" between components in your application. The book goes into the ramifications of this, but if it had to be said it in a quick sentence: ASP.NET MVC is ASP.NET Unplugged. ASP.NET MVC is a tinkererβs framework that gives you very fine-grained control over your HTML and Javascript, as well as complete control over the programmatic flow of your application.
β¦ Table of Contents
384619-cover-df2......Page 1
84619copyright_w......Page 2
CompleteBook - ScottGu Layout - Errors Fixed - v3......Page 3
Examining the NerdDinner directory structure......Page 12
Running the NerdDinner Application......Page 15
Testing the NerdDinner Application......Page 18
Creating a new SQL Server Express database......Page 19
Creating Tables within our Database......Page 21
Setting up a Foreign Key Relationship between Tables......Page 24
Adding Data to our Tables......Page 27
Adding LINQ to SQL Classes to our project......Page 28
Creating Data Model Classes with LINQ to SQL......Page 30
NerdDinnerDataContext Class......Page 33
Creating a DinnerRepository Class......Page 34
Retrieving, Updating, Inserting and Deleting using the DinnerRepository class......Page 37
Integrating Validation and Business Rule Logic with Model Classes......Page 39
Adding a DinnersController Controller......Page 44
Adding Index() and Details() Action Methods to the DinnersController Class......Page 45
Understanding ASP.NET MVC Routing......Page 47
Using Views with our Controller......Page 49
Implementing the βNotFoundβ View Template......Page 51
Implementing the βDetailsβ View Template......Page 54
Implementing the βIndexβ View Template......Page 60
Convention-based naming and the \Views directory structure......Page 66
URLs handled by DinnersController......Page 69
Implementing the HTTP-GET Edit Action Method......Page 70
Html.BeginForm() and Html.TextBox() Html Helper Methods......Page 74
Implementing the HTTP-POST Edit Action Method......Page 76
Handling Edit Errors......Page 79
Understanding ModelState and the Validation HTML Helper Methods......Page 82
Using a AddRuleViolations Helper Method......Page 84
Complete Edit Action Method Implementations......Page 85
Implementing the HTTP-GET Create Action Method......Page 86
Implementing the HTTP-POST Create Action Method......Page 89
Implementing the HTTP-GET Delete Action Method......Page 93
Implementing the HTTP-POST Delete Action Method......Page 96
Model Binding Security......Page 98
CRUD Wrap-Up......Page 99
Using the ViewData Dictionary......Page 103
Using a ViewModel Pattern......Page 105
Custom-shaped ViewModel classes......Page 109
Re-visiting our Edit and Create View Templates......Page 110
Using Partial View Templates......Page 111
Using Partial View Templates to Clarify Code......Page 115
Master Pages......Page 116
Index() Action Method Recap......Page 120
Understanding IQueryable
Adding a βpageβ value to the URL......Page 122
Adding page navigation UI......Page 125
Forms Authentication and the AccountController......Page 129
Authorizing the /Dinners/Create URL using the [Authorize] filter......Page 134
Using the User.Identity.Name property when Creating Dinners......Page 135
Using the User.Identity.Name property when Editing Dinners......Page 136
Showing/Hiding Edit and Delete Links......Page 138
Indicating whether the user is RSVPβd......Page 140
Implementing the Register Action Method......Page 142
Calling the Register Action Method using AJAX......Page 143
Adding a jQuery Animation......Page 145
Cleanup - Refactor out a RSVP Partial View......Page 147
Creating a Map Partial View......Page 148
Creating a Map.js utility library......Page 149
Integrating the Map with Create and Edit Forms......Page 151
Integrating the Map with the Details View......Page 156
Implementing Location Search in our Database and Repository......Page 158
Implementing a JSON-based AJAX Search Action Method......Page 162
Calling the JSON-based AJAX method using jQuery......Page 163
NerdDinner.Tests Project......Page 167
Creating Unit Tests for our Dinner Model Class......Page 168
Running Tests......Page 171
Creating DinnersController Unit Tests......Page 172
Extracting an IDinnerRepository interface......Page 174
Updating DinnersController to support constructor injection......Page 176
Creating the FakeDinnerRepository class......Page 177
Using the FakeDinnerRepository with Unit Tests......Page 179
Mocking the User.Identity.Name property......Page 182
Testing UpdateModel() scenarios......Page 185
Testing Wrap-Up......Page 186
84619bapp01w.p2......Page 189
Hanselman-Book-Ad-3-6-09-OUTLINES_color......Page 195
Pro ASP MVC BoB......Page 196
π SIMILAR VOLUMES
This book begins with you working along as Scott Guthrie builds a complete ASP.NET MVC reference application. He begins NerdDinner by using the File->New Project menu command within Visual Studio to create a new ASP.NET MVC Application. You'll then incrementally add functionality and features. Al
This book begins with you working along as Scott Guthrie builds a complete ASP.NET MVC reference application. He begins NerdDinner by using the File->New Project menu command within Visual Studio to create a new ASP.NET MVC Application. You'll then incrementally add functionality and features. Along
tried a few examples- v tough to follow and find out whats going on there is no sequence of steps to follow as would be expected from the title-you be better off looking at another book for learning mvc advantages- it give you some idea how it works but basically compared to the price and other pac