Skip to:ContentBottom
Cover image for Professional ASP.NET MVC 3.
Professional ASP.NET MVC 3.
Title:
Professional ASP.NET MVC 3.
Author:
Galloway, Jon.
ISBN:
9781118155356
Personal Author:
Edition:
1st ed.
Physical Description:
1 online resource (456 pages)
Contents:
Professional Asp.Net Mvc 3 -- Contents -- Chapter 1: Getting Started -- A Quick Introduction to ASP.NET MVC -- How ASP.NET MVC Fits in with ASP.NET -- The MVC Pattern -- MVC as Applied to Web Frameworks -- The Road to MVC 3 -- ASP.NET MVC 1 Overview -- ASP.NET MVC 2 Overview -- ASP.NET MVC 3 Overview -- Razor View Engine -- Validation Improvements -- .NET 4 Data Annotation Support -- Streamlined Validation with Improved Model Validation -- Rich JavaScript Support -- Unobtrusive JavaScript -- jQuery Validation -- JSON Binding -- Advanced Features -- Dependency Resolution -- Global Action Filters -- MVC 3 Feature Summary: Easier at All Levels -- Creating an MVC 3 Application -- Software Requirements for ASP.NET MVC 3 -- Installing ASP.NET MVC 3 -- Installing the MVC 3 Development Components -- Installing MVC 3 on a Server -- Creating an ASP.NET MVC 3 Application -- The New ASP.NET MVC 3 Dialog -- Application Templates -- View Engines -- Testing -- Understanding the MVC Application Structure -- ASP.NET MVC and Conventions -- Convention over Configuration -- Conventions Simplify Communication -- Summary -- Chapter 2: Controllers -- The Controller's Role -- A Brief History of Controllers -- A Sample Application: The MVC Music Store -- Controller Basics -- A Simple Example: The Home Controller -- Writing Your First (Outrageously Simple) Controller -- Creating the New Controller -- Writing Your Action Methods -- A Few Quick Observations -- Parameters in Controller Actions -- Summary -- Chapter 3: Views -- What a View Does -- Specifying a View -- Strongly Typed Views -- View Models -- Adding a View -- Understanding the Add View Dialog Options -- Customizing the T4 View Templates -- Razor View Engine -- What is Razor? -- Code Expressions -- Html Encoding -- Code Blocks -- Razor Syntax Samples -- Implicit Code Expression.

Explicit Code Expression -- Unencoded Code Expression -- Code Block -- Combining Text and Markup -- Mixing Code and Plain Text -- Escaping the Code Delimiter -- Server Side Comment -- Calling a Generic Method -- Layouts -- ViewStart -- Specifying a Partial View -- The View Engine -- Configuring a View Engine -- Finding a View -- The View Itself -- Alternative View Engines -- New View Engine or New ActionResult? -- Summary -- Chapter 4: Models -- Modeling the Music Store -- Scaffolding a Store Manager -- What Is Scaffolding? -- Empty Controller -- Controller with Empty Read/Write Actions -- Controller with Read/Write Actions and Views, Using Entity Framework -- Scaffolding and the Entity Framework -- Code First Conventions -- The DbContext -- Executing the Scaffolding Template -- The Data Context -- The StoreManagerController -- The Views -- Executing the Scaffolded Code -- Creating Databases with the Entity Framework -- Using Database Initializers -- Seeding a Database -- Editing an Album -- Building a Resource to Edit an Album -- Models and View Models Redux -- The Edit View -- Responding to the Edit POST Request -- The Edit Happy Path -- The Edit Sad Path -- Model Binding -- The DefaultModelBinder -- A Word on Model Binding Security -- Explicit Model Binding -- Summary -- Chapter 5: Forms and HTML Helpers -- Using Forms -- The Action and the Method -- To GET or To POST -- Searching for Music with a Search Form -- Searching for Music by Calculating the Action Attribute Value -- HTML Helpers -- Automatic Encoding -- Make Helpers Do Your Bidding -- Inside HTML Helpers -- Setting Up the Album Edit Form -- Html.BeginForm -- Html.ValidationSummary -- Adding Inputs -- Html.TextBox (and Html.TextArea) -- Html.Label -- Html.DropDownList (and Html.ListBox) -- Html.ValidationMessage -- Helpers, Models, and View Data.

Strongly-Typed Helpers -- Helpers and Model Metadata -- Templated Helpers -- Helpers and ModelState -- Other Input Helpers -- Html.Hidden -- Html.Password -- Html.RadioButton -- Html.CheckBox -- Rendering Helpers -- Html.ActionLink and Html.RouteLink -- URL Helpers -- Html.Partial and Html.RenderPartial -- Html.Action and Html.RenderAction -- Passing Values to RenderAction -- Cooperating with the ActionName Attribute -- Summary -- Chapter 6: Data Annotations and Validation -- Annotating Orders for Validation -- Using Validation Annotations -- Required -- StringLength -- RegularExpression -- Range -- Validation Attributes from System.Web.Mvc -- Custom Error Messages and Localization -- Looking Behind the Annotation Curtain -- Validation and Model Binding -- Validation and Model State -- Controller Actions and Validation Errors -- Custom Validation Logic -- Custom Annotations -- IValidatableObject -- Display and Edit Annotations -- Display -- ScaffoldColumn -- DisplayFormat -- ReadOnly -- DataType -- UIHint -- HiddenInput -- Summary -- Chapter 7: Securing Your Application -- Using the Authorize Attribute to Require Login -- Securing Controller Actions -- How the AuthorizeAttribute Works with Forms Authentication and the AccountController -- Windows Authentication in the Intranet Application Template -- Securing Entire Controllers -- Using the Authorize Attribute to Require Role Membership -- Extending Roles and Membership -- Understanding the Security Vectors in a Web Application -- Threat: Cross-Site Scripting (XSS) -- Threat Summary -- Passive Injection -- Active Injection -- Preventing XSS -- Threat: Cross-Site Request Forgery -- Threat Summary -- Preventing CSRF Attacks -- Threat: Cookie Stealing -- Threat Summary -- Preventing Cookie Theft with HttpOnly -- Threat: Over-Posting -- Threat Summary.

Preventing Over-Posting with the Bind Attribute -- Threat: Open Redirection -- Threat Summary -- Protecting Your ASP.NET MVC 1 and MVC 2 Applications -- Taking Additional Actions When an Open Redirect Attempt Is Detected -- Open Redirection Summary -- Proper Error Reporting and the Stack Trace -- Using Configuration Transforms -- Using Retail Deployment Configuration in Production -- Using a Dedicated Error Logging System -- Security Recap and Helpful Resources -- Summary: It's Up to You -- Chapter 8: AJAX -- jQuery -- jQuery Features -- The jQuery Function -- jQuery Selectors -- jQuery Events -- jQuery and AJAX -- Unobtrusive JavaScript -- Using jQuery -- Custom Scripts -- Placing Scripts in Sections -- And Now for the Rest of the Scripts -- AJAX Helpers -- AJAX ActionLinks -- HTML 5 Attributes -- AJAX Forms -- Client Validation -- jQuery Validation -- Custom Validation -- IClientValidatable -- Custom Validation Script Code -- Beyond Helpers -- jQuery UI -- Autocomplete with jQuery UI -- Adding the Behavior -- Building the Data Source -- JSON and jQuery Templates -- Adding Templates -- Modifying the Search Form -- Get JSON! -- jQuery.ajax for Maximum Flexibility -- Improving AJAX Performance -- Using Content Delivery Networks -- Script Optimizations -- Summary -- Chapter 9: Routing -- Understanding URLs -- Introduction to Routing -- Comparing Routing to URL Rewriting -- Defining Routes -- Route URLs -- Route Values -- Route Defaults -- Route Constraints -- Named Routes -- MVC Areas -- Area Route Registration -- Area Route Conflicts -- Catch-All Parameter -- Multiple URL Parameters in a Segment -- StopRoutingHandler and IgnoreRoute -- Debugging Routes -- Under the Hood: How Routes Generate URLs -- High-Level View of URL Generation -- Detailed Look at URL Generation -- Ambient Route Values -- Overflow Parameters.

More Examples of URL Generation with the Route Class -- Under the Hood: How Routes Tie Your URL to an Action -- The High-Level Request Routing Pipeline -- RouteData -- Custom Route Constraints -- Using Routing with Web Forms -- Summary -- Chapter 10: NuGet -- Introduction to NuGet -- Installing NuGet -- Adding a Library as a Package -- Finding Packages -- Installing a Package -- Updating a Package -- Recent Packages -- Using the Package Manager Console -- Creating Packages -- Folder Structure -- NuSpec File -- Metadata -- Dependencies -- Specifying Files to Include -- Tools -- Framework and Profile Targeting -- Publishing Packages -- Publishing to NuGet.org -- Publishing Using NuGet.exe -- Using the Package Explorer -- Hosting A Private NuGet Feed -- Summary -- Chapter 11: Dependency Injection -- Understanding Software Design Patterns -- Design Pattern: Inversion of Control -- Design Pattern: Service Locator -- Strongly-Typed Service Locator -- Weakly-Typed Service Locator -- The Pros and Cons of Service Locators -- Design Pattern: Dependency Injection -- Constructor Injection -- Property Injection -- Dependency Injection Containers -- Using the Dependency Resolver -- Singly-Registered Services -- Multiply-Registered Services -- Creating Arbitrary Objects -- Creating Controllers -- Creating Views -- Summary -- Chapter 12: Unit Testing -- The Meaning of Unit Testing and Test-Driven Development -- Defining Unit Testing -- Testing Small Pieces of Code -- Testing in Isolation -- Testing Only Public Endpoints -- Automated Results -- Unit Testing as a Quality Activity -- Defining Test-Driven-Development -- The Red/Green Cycle -- Refactoring -- Structuring Tests with Arrange, Act, Assert -- The Single Assertion Rule -- Creating a Unit Test Project -- Examining the Default Unit Tests -- Only Test the Code You Write.

Tips and Tricks for Unit Testing Your ASP.NET MVC Application.
Abstract:
New edition of the top book on MVC from the top ASP.NET experts at Microsoft! MVC 3.0 is the latest update to Microsoft's Model-View-Controller technology, which enables developers to build dynamic, data-driven web sites. This in-depth book shows you step by step how to use MVC 3.0. Written by top ASP.NET MVC experts at Microsoft, the latest edition of this popular book covers new and updated features such as the new View engine, Razor, NuGet, and much more. The book's practical tutorials reinforce concepts and allow you create real-world applications. Topics include controllers and actions, forms and HTML helpers, Ajax, unit testing, and much more. Shows developers and programmers how to use ASP.NET MVC 3.0, Microsoft's new version of its Model-View-Controller technology for developing dynamic, data-driven web sites Features an expert author team?all are members of Microsoft's ASP.NET team Uses a step-by-step approach to explain all major features and functionalities and provides practical tutorials to allow you to create real-world applications Goes into theory as well as practical application and covers such topics as Razor, NuGet (PowerShell inside Visual Studio 2010), and new layout features Move your development skills to the next level with MVC 3.0 and Professional ASP.NET MVC 3.0.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: