Programming Microsoft ASP.NET 4 - Dino Esposito [601]
The MVP Pattern
Generalities of the MVP Pattern
Role of the Model
Role of the View
Role of the Presenter
Web Forms and the MVP Pattern
The MVVM Pattern
Generalities of the MVVM Pattern
Web Forms and MVVM
Implementing Model View Presenter
Abstracting the View
From Use-Cases to the View
Implementing the Interface
Creating the Presenter
Getting a Presenter’s Instance
Using the Presenter
How Does the Presenter Retrieve Data?
Connecting the Presenter to the Service Layer
Presenter in Action
Sharing the Presenter with a Windows Application
Navigation
The Application Controller Pattern
Defining the Navigation Workflow
Navigating Within a Web Forms Site
Testability in Web Forms with MVP
Writing Testable Code
Aspects of Testable Code
Unit Testing
Test-Driven Development
Testing a Presenter Class
Creating a Unit Test
Testing Presenters in Isolation
Summary
IV. Infrastructure of the Application
16. The HTTP Request Context
Initialization of the Application
Properties of the HttpApplication Class
Application Modules
Methods of the HttpApplication Class
Events of the HttpApplication Class
The global.asax File
Compiling global.asax
Syntax of global.asax
Application Directives
Code Declaration Blocks
Server-Side