4143.
ASP.NET MVC 3 Using C#
This 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. The course includes important new features in MVC 3 such as the
Razor View Engine,MvcScaffolding, HTML 5 project
templates, and more.
The course
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 anddefenses against
them. The course includes a discussion of how ASP.NET MVC and Web Forms can be
used together in the same application. The course concludes with coverage of
deployment.
Numerous
programming examples and exercises are provided. The student will receive a
comprehensive set of notes and all the programming examples.
Learning
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
Prerequisites: The student should have a
good working knowledge of C# and the .NET Framework. Basic knowledge of ASP.NET
and HTML is also required.
Course
Outline
1. Introduction to ASP.NET MVC
a. Review of ASP.NET Web Forms
b. Advantages and Disadvantages
of Web Forms
c. Model-View-Controller Pattern
d. ASP.NET MVC
e. Advantages and Disadvantages
of ASP.NET MVC
f. Unit Testing
2. Getting Started with ASP.NET
MVC
a. Installing ASP.NET MVC
b. Using Visual Studio
c. Hello World for ASP.NET MVC
d. Rendering Views
e. Dynamic Output
3. ASP.NET MVC Architecture
a. The Controller in ASP.NET MVC
b. The View in ASP.NET MVC
c. The Model in ASP.NET MVC
d. Helper Methods for HTML
e. Form Submission
f. Model Binding
g. Input Validation
4. The Model
a. Microsoft Technologies for the
Model
b. ADO.NET
c. LINQ
d. ADO.NET Entity Framework 4.1
e. NuGet Package Manager
f. Using MvcScaffolding
g. Code First Data Modeling
5. The Controller
a. IController Interface
b. Controller Base Class
c. Actions
d. Retrieving Data from a Request
e. Action Results
f. Action Attributes
g. Filters
h. Asynchronous Controllers
6. The View
a. View Responsibility
b. Using ViewData
c. Loosely-Typed Views
d. Strongly-Typed Views
e. Using Dynamic Objects
f. Html Helpers
g. Razor View Engine
h. Using ViewBag
i. Validation Attributes
j. HTML 5 Project Templates
7. Routing
a. Routing in ASP.NET MVC
b. Properties of Routes
c. Registering Routes
d. Debugging Routes
e. Areas
8. Unit Testing
a. Test-Driven Development
b. Test Automation
c. Refactoring
d. NUnit
e. Test Cases
f. Test Classes
g. Test Runners
h. Testing ASP.NET MVC
Applications
i. Dependency Injection
j. Mocking Frameworks
k. Inversion of Control
Containers
9. Security
a. Input Forgery
b. Cross-Site Scripting
c. Session Hijacking
d. Cross-site Request Forgery
e. SQL Injection
f. Using the MVC Framework
Securely
10. Combining
ASP.NET MVC and Web Forms
a. Using Web Forms in an MVC
Application
b. Using MVC in a Web Forms
Application
11. Deployment
a. Server Requirements
b. Continuous Integration
c. Environment Configurations
d. XCOPY
e. Web Deploy
12. Best Practices
for ASP.NET using MVC 3
Appendix A. Learning Resources