Telephone: 0208 942 5724
Email: info@aspecttraining.co.uk
YOUR COURSE, YOUR WAY - MORE EFFECTIVE IT TRAINING - NOW VIRTUALLY
Telephone: 0208 942 5724
Email: info@aspecttraining.co.uk
YOUR COURSE, YOUR WAY - MORE EFFECTIVE IT TRAINING
This course MVC the popular Microsoft technology that enables you to build dynamic, data-driven websites This course takes you through step-by-step techniques on using MVC to best advantage, by building a MVC website to illustrate the concepts. It covers controllers, views, and models; forms and HTML helpers; data annotation and validation; membership, authorization, and security.
This course can be presented for either C# or VB Developers.
Delegates should have a good working knowledge of either C# or VB.
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
Bootstrap Templates
Attribute Routing
ASP.NET Scaffolding
Authentication Filters
Filter Overrides
Creating an ASP.NET MVC Application
The New ASP.NET Project Dialog
The MVC Application Structure
ASP.NET MVC and Conventions
The Controller’s Role
The Exercise Application
Controller Basics
Writing Your First Controller
Parameters in Controller Actions
The Purpose of Views
View Basics
Understanding View Conventions
Strongly Typed Views
Understanding ViewBag, ViewData, and ViewDataDictionary
View Models
Adding a View
The Razor View Engine
What Is Razor?
Layouts
ViewStart
Specifying a Partial View
Modeling the Exercise
Scaffolding a Manager
What Is Scaffolding?
Scaffolding and the Entity Framework
Executing the Scaffolding Template
Executing the Scaffolded Code
Editing
Building a Resource to Edit
Responding to the Edit POST Request
Model Binding
The DefaultModelBinder
Explicit Model Binding
Using Forms
The Action and the Method
To GET or to POST?
HTML Helpers
Automatic Encoding
Making Helpers Do Your Bidding
Inside HTML Helpers 116
Setting Up an Edit Form
Adding Inputs
Helpers, Models, and View Data
Strongly Typed Helpers
Helpers and Model Metadata
Templated Helpers
Helpers and ModelState
Other Input Helpers
Rendering Helpers
Html.ActionLink and Html.RouteLink
URL Helpers
Html.Partial and Html.RenderPartial
Html.Action and Html.RenderAction
Annotating for Validation
Using Validation Annotations
Custom Error Messages and Localization
Looking Behind the Annotation Curtain
Controller Actions and Validation Errors
Custom Validation Logic
Custom Annotations
IValidatableObject
Display and Edit Annotations
Security: Incredibly Important
Using the Authorize Attribute to Require Login
Securing Controller Actions
How AuthorizeAttribute Works with Forms Authentication and the AccountController
Windows Authentication
Using AuthorizeAttribute to Require Role Membership
Extending User Identity
Storing additional user profile data
Persistance control
Managing users and roles
External Login via OAuth and OpenID
Understanding the Security Vectors in a Web Application
Threat: Cross-Site Scripting
Threat: Cross-Site Request Forgery
Threat: Cookie Stealing
Threat: Over-Posting
Threat: Open Redirection
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
jQuery
jQuery Features
Unobtrusive JavaScript
Using jQuery
Ajax Helpers
Adding the Unobtrusive Ajax Script to Your Project
Ajax ActionLinks
HTML 5 Attributes
Ajax Forms
Client Validation
jQuery Validation
Custom Validation
Beyond Helpers
jQuery UI
Autocomplete with jQuery UI
JSON and Client-Side Templates
Bootstrap Plugins
Improving Ajax Performance
Using Content Delivery Networks
Script Optimizations
Bundling and Minification
Uniform Resource Locators
Introduction to Routing
Comparing Routing to URL Rewriting
Routing Approaches
Defining Attribute Routes
Defining Traditional Routes
Choosing Attribute Routes or Traditional Routes
Named Routes
MVC Areas
Catch-All Parameter
Multiple Route Parameters in a Segment
StopRoutingHandler and IgnoreRoute
Debugging Routes
Inside Routing: How Routes Generate URLs
Ambient Route Values
More Examples of URL Generation with the Route Class
RouteData
Custom Route Constraints
Using Routing with Web Forms
Introduction to NuGet
Adding a Library as a Package
Finding Packages
Installing a Package
Updating a Package
Package Restore
Using the Package Manager Console
Creating Packages
Packaging a Project
Packaging a Folder
Configuration File and Source Code Transformations
NuSpec File
Metadata
Dependencies
Specifying Files to Include
Tools
Framework and Profile Targeting
Prerelease Packages
Publishing Packages
Publishing to NuGet.org
Using NuGet.exe
Using the Package Explorer
Defining ASP.NET Web API
Getting Started with Web API
Writing an API Controller
Async by Design: IHttpController
Incoming Action Parameters
Action Return Values, Errors, and Asynchrony
Configuring Web API
Configuration in Web-Hosted Web API
Configuration in Self-Hosted Web API
Adding Routes to Your Web API
Binding Parameters
Filtering Requests
Enabling Dependency Injection
Exploring APIs Programmatically
Tracing the Application
Web API Example
Single Page Applications With AngularJS
Understanding and Setting Up AngularJS
What’s AngularJS?
Getting Started
Adding AngularJS to the Site
Setting Up the Database
Building the Web API
Building Applications and Modules
Creating Controllers, Models, and Views
Services
Routing
Details View
A Custom Service
Software Design Patterns
Design Pattern: Inversion of Control
Design Pattern: Service Locator
Design Pattern: Dependency Injection
Dependency Resolution in MVC
Singly Registered Services in MVC
Multiply Registered Services in MVC
Arbitrary Objects in MVC
Dependency Resolution in Web API
Singly Registered Services in Web API
Multiply Registered Services in Web API
Arbitrary Objects in Web API
Dependency Resolvers in MVC vs. Web API
Understanding Unit Testing and Test-Driven Development
Defining Unit Testing
Defining Test-Driven Development
Building a Unit Test Project
Examining the Default Unit Tests
Test Only the Code You Write
Advice for Unit Testing Your ASP.NET MVC
and ASP.NET Web API Applications
Testing Controllers
Testing Routes
Testing Validators
Extending Models
Turning Request Data into Models
Describing Models with Metadata
Validating Models
Extending Views
Customizing View Engines
Writing HTML Helpers
Writing Razor Helpers
Extending Controllers
Selecting Actions
Filters
Providing Custom Results
Download Print Friendly PDF Back to Home