ASP.NET MVC 3 Using C#培训课程

ASP.NET MVC 3 Using C#培训课程

课程介绍:
This three day course provides a practical hands-on introduction to developing Web applications using ASP.NET MVC 3 and C#. This new Web development framework from Microsoft emphasizes separation of concerns in the architecture and testability of applications. It includes important new features in MVC 3 such as the Razor View Engine, MvcScaffolding, HTML 5 project templates, and more. It also covers the fundamentals of the Model-View-Controller design pattern and its implementation in ASP.NET MVC. This technology is compared with classical ASP.NET Web Forms. The two technologies share a common ASP.NET infrastructure. Visual Studio 2010 is used as a productive platform for creating ASP.NET MVC applications. After presenting the fundamentals of the technology with several examples, the main components of Model, Controller and View are covered in detail. The discussion of the Model incorporates modern Microsoft data access technologies, including LINQ and ADO.NET Entity Framework 4.1. The routing mechanism of ASP.NET MVC is covered. The course introduces automated unit testing of Web applications, one of the chief advantages of the new technology. Security is covered, with some hands-on illustrations of attacks and defenses against them. There is a discussion of how ASP.NET MVC and Web Forms can be used together in the same application.

培训对象:
Experienced application developers or architects responsible for Web applications in a
Microsoft environment.

预备知识:
Good working knowledge of C# and the .NET Framework. Basic knowledge of
ASP.NET and HTML is also required.

课程内容:
1. Introduction to ASP.NET MVC

  • Review of ASP.NET Web Forms
  • Advantages and Disadvantages of Web
  • Forms
  • Model-View-Controller Pattern
  • ASP.NET MVC
  • Advantages and Disadvantages of
  • ASP.NET MVC
  • Goals of ASP.NET MVC
  • Unit Testing

2. Getting Started with ASP.NET MVC

  • ASP.NET MVC 3 Testbed
  • Visual Studio ASP.NET MVC Project
  • New ASP.NET MVC 3 Project
  • Starter Application
  • Simple App with Controller Only
  • Action Methods and Routing
  • Action Method Return Type
  • Rendering a View
  • Creating a View in Visual Studio
  • The View Web Page
  • Dynamic Output
  • Embedded Scripts
  • Using a Model
  • Controller Using the Model
  • View Using the Model
  • Strongly-Typed View
  • Strongly-Typed View in Visual Studio

3. ASP.NET MVC Architecture

  • The Controller in ASP.NET MVC
  • The View in ASP.NET MVC
  • The Model in ASP.Net MVC
  • How MVC Works
  • Using Forms
  • HTML Helper Functions
  • Displaying Sign In Form
  • Handling Form Submission
  • Model Binding
  • Greet View
  • Input Validation
  • ASP.NET MVC 3 Using C#
  • ASP.NET MVC 3 Using C#
  • Nullable Type
  • Checking Model Validity
  • Validation Summary

4. The Model

  • Microsoft Technologies for the Model
  • SmallPub Database
  • ADO.NET
  • Language Integrated Query (LINQ)
  • ADO.NET Entity Framework 4.0
  • EDM Example
  • SmallPub Tables
  • SmallPub Entity Data Model
  • Entity Data Model Concepts
  • Querying the EDM
  • Class Diagram
  • Context Class
  • List of Categories
  • List of Books
  • A LINQ Query
  • IntelliSense
  • Controller
  • Using a Parameter
  • Modifying a Data Source
  • Entity Framework in a Class Library
  • Data Access Class Library
  • Client Code
  • ASP.NET MVC Database Clients
  • Scaffolding in ASP.NET MVC 3
  • NuGet Package Manager
  • Entity Framework 4.1 Code First
  • A CRUD User Interface
  • The Database
  • DbContext Class

5. The Controller

  • IController Interface
  • A Low Level Controller
  • Displaying Context
  • Add and Subtract
  • Controller Base Class
  • Action Methods
  • HomeController
  • Math Controller
  • Invoking MathController
  • Receiving Input
  • Non-Nullable Parameters
  • Nullable Parameters
  • Using a Model
  • Action Results
  • JavaScript Object Notation
  • Action Method Attributes
  • HTML Output
  • Filters
  • Asynchronous Controllers

6. The View

  • View Responsibility
  • A Program without a View
  • A Program with a View
  • View Page
  • Passing Data to the View
  • Passing Lists to the View
  • Strongly-Typed Views
  • Strongly-Typed View in Visual Studio
  • Passing Data with Dynamic Objects
  • More about Dynamic Objects
  • HTML Helper Methods
  • Link-Building Helpers
  • Form Helpers
  • Validation Helpers
  • Templated Helpers
  • Razor View Engine
  • ViewBag
  • Validation in Controller
  • ValidationMessage Helper
  • HTML 5 Project Templates

7. Routing

  • Routing in ASP.NET MVC
  • Properties of Routes
  • Registering Routes
  • Route Debugging Utility
  • Multiple Matches
  • Fixing the Bug
  • Debugging Routes
  • Areas

8. Unit Testing

  • Test-Driven Development
  • Functional Tests
  • Unit Tests
  • Test Automation
  • Refactoring
  • Regression Testing
  • Unit Testing in ASP.NET MVC
  • A Test Class Library
  • Installing NUnit via NuGet
  • The Model
  • ASP.NET MVC 3 Using C#
  • Testing the Model
  • Structure of Unit Tests
  • Assertions
  • NUnit Framework
  • NUnit Assert Class
  • Assert.AreEqual()
  • More Assert Methods
  • Test Fixture
  • Test Runner
  • More Tests
  • Ignoring Tests
  • Fixing the Bug
  • Testing Controllers
  • Classes with External Dependencies
  • Dependency Injection
  • Mocking Frameworks
  • Using Moq
  • Models
  • Controller
  • Index View
  • Monthly Payment View
  • Unit Tests
  • Inversion of Control (IoC) Containers

9. Security

  • Web Security
  • Input Forgery
  • Cross-Site Scripting
  • Entering JavaScript
  • The Attack
  • Defending Against the Attack
  • Session Hijacking
  • Cross-Site Request Forgery
  • Controller and Model Code
  • View Code
  • Attacker Code
  • The Defense
  • SQL Injection
  • Using the MVC Framework Securely
  • Authorize Attribute
  • ChildActionOnly Attribute
  • RequireHttps Attribute
  • ValidateInput Attribute

10. Combining ASP.NET MVC and Web

  • Forms
  • Using Web Forms in an MVC
  • Application
  • Linking and Redirecting from Web
  • Forms Pages to MVC Actions
  • Default.aspx
  • Web Forms in MVC Example
  • Sharing Data between ASP.NET MVC
  • and ASP.NET Web Forms
  • Using Web Form Controls in MVC
  • Views
  • Using MVC in a Web Forms
  • Application
  • Steps to Create Hybrid MVC – Web
  • Forms Application

11. Deployment

  • Server Requirements
  • Continuous Integration
  • Environment Configurations
  • Configuration File Transformation
  • MvcBuildViews for View Compile
  • Checking
  • Release Build View Compile Checking
  • XCOPY
  • Web Deploy

培训时间:
3天

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注