ASP.NET MVC 3 Using C#®
- ASP.NET MVC 3 Using C# Training Class Summary
-
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.
Audience: Experienced application developers or architects responsible for Web applications in a Microsoft environment.
Prerequisites: Good working knowledge of C# and the .NET Framework. Basic knowledge of ASP.NET and HTML is also required.
Class Length: 3 days
- ASP.NET MVC 3 Using C# Training Class Objectives
-
- Gain a thorough understanding of the philosophy and architecture of Web applications using ASP.NET MVC.
- Acquire a working knowledge of Web application development using ASP.NET MVC and Visual Studio 2010.
- Access databases using ADO.NET, LINQ, and Entity Framework 4.1.
- Perform automated testing of Web applications created using ASP.NET MVC.
- Implement security in ASP.NET MVC applications.
- Combine ASP.NET MVC and Web Forms when appropriate.
- Deploy ASP.NET MVC applications.
- ASP.NET MVC 3 Using C# Training Class Detailed Outline
-
- Introduction to ASP.NET MVC
- Review of ASP.NET Web Forms
- Advantages and Disadvantages of ASP.NET Web Forms
- Model-View-Controller Pattern
- ASP.NET MVC
- Advantages and Disadvantages of ASP.NET MVC
- Goals of ASP.NET MVC
- Unit Testing
- 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
- 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
- Nullable Type
- Checking Model Validity
- Validation Summary
- 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
- LINQ to Entities Demo
- IntelliSense
- Modifying a Data Source
- Entity Framework in a Class Library
- Data Access Class Library
- Client Code
- ASP.NET MVC Database Clients
- 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
- 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
- Form Helpers
- Templated Helpers
- Routing
- Routing in ASP.NET MVC
- Properties of Routes
- Registering Routes
- Route Debugging Utility
- Multiple Matches
- Fixing the Bug
- Debugging Routes
- Areas
- Unit Testing
- Visual Studio Unit Testing Framework
- Unit Testing Framework Namespace
- Assert Class
- Assert.AreEqual()
- More Assert Methods
- CollectionAssert Class
- StringAssert Class
- Test Case
- Test Methods
- Test Class
- Test Runner
- Command Line Test Runner
- Ignoring Tests
- Using the Ignore Attribute
- Grouping Test Results
- Inversion of Control
- Testing with Mocking
- ASP.NET MVC Test Projects
- Refactoring
- Test-Driven Development
- Security
- Web Security
- Input Forgery
- Cross-Site Scripting
- XSS Example
- 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
- RequireHttps Attribute
- ValidateInput Attribute
- 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
- ADO.NET and LINQ
- Server Requirements
- Continuous Integration
- Environment Configurations
- Configuration File Transformation
- MvcBuildViews for View Compile Checking
- Release Build View Compile Checking
- XCOPY
- Web Deploy
- Introduction to ASP.NET MVC



