Developing Applications with ASP.NET MVC 2.0
Three-day Course
This three‐day course will prepare students to develop and deploy web applications using Microsoft’s ASP.NET MVC 2.0 in an enterprise environment. ASP.NET MVC was developed from the ground up to meet the needs of professional web developers. Its features include:
- Streamlined, direct access to the HTML output
- Extensibility points throughout
- Convention over Configuration allows common extensibility scenarios to be easily addressed
- Testability: Developers can use Test‐Driven Development techniques to build scalable, adaptable and reliable web applications
- Areas, which allow development teams to work in parallel on the same application, and sharing of common code
- Easily integrates with client‐side JavaScript frameworks. jQuery and ASP.NET AJAX ship with ASP.NET MVC.
Target Audience
The course is for developers working with the C# programming language that are familiar with the .NET Framework. Experience with other web development frameworks (especially ASP.NET Webforms) is helpful but not required. Familiarity with test‐driven development techniques is also helpful, but will be introduced in the class. This course assumes students are familiar with C# 3.5, including LINQ and associated syntax enhancements including anonymous objects, lambda expressions, and object and collection initializers.
Section 1: Overview of ASP.NET MVC
Background
- Web development in the Microsoft world
- ASP.NET Webforms – a high level abstraction
- Introducing ASP.NET MVC – a more proper abstraction for web developers
- Benefits of ASP.NET MVC
Try it out
- Create a new ASP.NET MVC Project
- Investigate the structure of an ASP.NET MVC Application
- ASP.NET MVC Conventions
- Rendering a view
- Sending data to a view
ASP.NET MVC Architecture
- The Model‐View‐Controller pattern in ASP.NET MVC
- Building the domain – your model
- Testing your domain and controllers
- Adding Areas to your application
Section 2: ASP.NET MVC in Detail
ASP.NET MVC Plumbing
- The request pipeline
- Introduction to routing
- Creating routes
- Testing routes
- RESTful architecture
Models in Detail
- Domain modeling
- Creating aggregate roots
- Data access strategies
- Creating view models
- Strategies for mapping a domain model to a view model
- Using Data Annotations for View-Model validation
Controllers in Detail
- Controllers explained
- GET actions
- Returning JSON
- POST actions
- Model binders
- Creating filters for attached behaviors
- Testing controllers
- Creating asynchronous controller actions
Views
- Webform view basics
- Inline code
- Strongly-typed HTML Helpers
- Partial views
- Templated Helpers
- Master pages
- Alternate view engines
- Data entry scenarios
- Scaffolding
- Model binding in detail
- Validation using Data Annotations and jQuery Validation
Client-side Programming
- Intro to JavaScript
- Intro to jQuery
- Using jQuery in ASP.NET MVC
Section 3: ASP.NET MVC in the Real World
Security
- Cleansing input
- Cross‐site‐scripting
- HTML injection
- SQL injection
- Sessions
- Securing MVC
- Authentication
- Authorization
Using ASP.NET Features in MVC
- Caching
- Sessions
- Membership
Deployment
- Requirements
- Deploying your application