ASP.NET MVC 3 Using C#

Course ID

17010

Course Description

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. 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.

Prerequisites

Good working knowledge of C# and the .NET Framework. Basic knowledge of ASP.NET and HTML is also required.

Audience

Experienced application developers or architects responsible for Web applications in a Microsoft environment.

Course Content

    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

    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
  • 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

    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
  • Templated Helpers
  • Razor View Engine
  • ViewBag
  • Validation in Controller
  • ValidationMessage Helper
  • HTML 5 Project Templates

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

    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
  • 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

    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

    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

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

For More Information

For training inquiries, call 850-308-1376

or email us at eramos@gbsi.com

Course Details

Duration - 3 days
Price - $1895.00 USD


(Discounts may apply. Call for more information.)

Course Actions

Acceletrain Collaborative Learning Environment (formerly know as VILT) places industry certified and expert instructors, peers, learners and multi-media components into a "borderless classroom", and interactive learning environment that can span multiple physical locations. VILT combines the benefits of the traditional brick-and-mortar classroom with innovative learning techniques and the cost savings of internet-based training.