Microsoft Developing MVC Applications with C#

3 days

Course Overview

ASP.NET MVC is Microsoft’s Model-View-Controller technologies. MVC 2 enables developers to build dynamic, data-driven Web sites. Developing MVC Applications with C# shows you how to use MVC 2. You’ll learn both the theory behind MVC 2, as well as how to create a real-world application. Topics include transitioning from ASP.NET development, as well as an overview of related tools and technologies, including LINQ, jQuery, and REST.

Prerequisites

Experience with developing ASP.NET applications

Course Outline

MODEL-VIEW- CONTROLLER AND ASP.NET

  • What Is Model-View-Controller?
  • MVC on the Web Today
  • Serving Methods, Not Files
  • Is This Web Forms 4.0?
  • Why Not Web Forms?
  • Cost/Benefit of Web Forms
  • Should You Fear ASP.NET MVC?

ASP.NET > ASP.NET MVC

  • Abstraction: What Web Forms Does Well
  • Where Web Forms Doesn’t Exactly Fit ViewState
  • Back to Basics: ASP.NET MVC Believes…
  • Orchestration versus Composing
  • Separation of Concerns: What It Means
  • Approaches to Maintainability
  • Caring about Testability
  • Convention over Configuration
  • The Request Life Cycle

ROUTES AND URLS

  • Introduction to Routing
  • Defining Routes
  • Named Routes
  • Areas
  • Catch-All Parameter
  • Debugging Routes
  • How Routes Generate URLs
  • How Routes Tie Your URL to an Action
  • Route Extensibility
  • Using Routing with Web Forms

CONTROLLERS

  • History of the Controller
  • Defining the Controller
  • The ControllerBase Abstract Base Class
  • The Controller Class and Actions
  • Action Methods
  • Action Invoker
  • How an Action Is Mapped to a Method
  • Mapping Parameters
  • Invoking Actions
  • Using Asynchronous Controller Actions

VIEWS

  • What a View Does
  • What a View Shouldn’t Do
  • Specifying a View
  • Strongly Typed Views
  • ViewModels
  • HTML Helper Methods
  • HTML Template Customization
  • The View Engine
  • Finding a View
  • The View Itself

AJAX

  • Ajax Examples
  • Handling Disabled Scripting
  • Using Partials for Rendering
  • Some Things You May Not Know about Microsoft ASP.NET Ajax
  • Updating an HTML Element When
  • Submitting a Form
  • Implementing AutoComplete with Microsoft ASP.NET Ajax
  • Filtering Data with a Selectbox
  • The Modal Pop-Up with jQuery
  • The Rating Control

FILTERS

  • Filters Included with ASP.NET MVC
  • Exception Filter
  • Custom Filters
  • Writing a Custom Action Filter
  • Writing a Custom Authorization Filter
  • Writing a Custom Exception Filter
  • Filter Ordering
  • Filter Naming

SECURING YOUR APPLICATION

  • What Do Hackers Want?
  • How Do They Get It?
  • Weapons
  • Spam
  • Threat: Cross-Site Scripting (XSS)
  • Threat: Cross-Site Request Forgery
  • Threat: Cookie Stealing
  • Threat: Over-Posting
  • Securing Your Controllers, Not Your Routes

BEST OF BOTH WORLDS: WEB FORMS AND MVC TOGETHER

  • How Is It Possible?
  • Including MVC in Existing Web Forms Applications
  • Adding Web Forms to an Existing ASP.NET MVC Application
  • Using System.Web.Routing to Route to Web Forms
  • Sharing Data between Web Forms and MVC
  • Using Route Parameters
  • Using HTTP-POST
  • Using the ASP.NET Session
  • Using Cross-Page Posting
  • Using TempData
  • Migrating from Web Forms to MVC