21
The ASP.NET Server Model The ASP.NET Server Model Martin Parry Martin Parry Developer and Platform Evangelism Group Developer and Platform Evangelism Group Microsoft Microsoft [email protected] [email protected] http://www.martinparry.com http://www.martinparry.com

The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft [email protected]

Embed Size (px)

Citation preview

Page 1: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

The ASP.NET Server ModelThe ASP.NET Server Model

Martin ParryMartin Parry

Developer and Platform Evangelism GroupDeveloper and Platform Evangelism Group

MicrosoftMicrosoft

[email protected]@microsoft.com

http://www.martinparry.comhttp://www.martinparry.com

Page 2: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

AgendaAgenda

User InterfaceUser Interface

CompilationCompilation

Application ServicesApplication Services

Server ArchitectureServer Architecture

Page 3: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

ASP.NET ControlsASP.NET Controls

User Controls (.ascx)User Controls (.ascx)

Developed rather like a pageDeveloped rather like a page

Web ControlsWeb Controls

Override a function and emit HTML/scriptOverride a function and emit HTML/script

Compare creation/consumption experienceCompare creation/consumption experience

@OutputCache directive on User Controls@OutputCache directive on User Controls

Affects server-side cacheabilityAffects server-side cacheability

Page 4: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Master PagesMaster Pages

Can define the common regions of your pages in Can define the common regions of your pages in one placeone place

Insert “content placeholder” controlsInsert “content placeholder” controls

Each page consists of “content” controls that Each page consists of “content” controls that map onto the placeholdersmap onto the placeholders

Compare with User ControlsCompare with User Controls

Page 5: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

ThemesThemes

Under ...\App_Themes\<ThemeName>Under ...\App_Themes\<ThemeName>

Can specify a .css file and/or .skin filesCan specify a .css file and/or .skin files

.skin file specifies server-side properties for controls.skin file specifies server-side properties for controls

.css can affect only client-side properties.css can affect only client-side properties

Theme is selected via page directive or configTheme is selected via page directive or config

Page 6: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

ASP.NET User InterfaceASP.NET User Interface

Page 7: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

ASP.NET CompilationASP.NET Compilation

Applications consist of .aspx/.ascx source files, Applications consist of .aspx/.ascx source files, plus code-behind source files (.cs or .vb)plus code-behind source files (.cs or .vb)

We can choose what to deploy...We can choose what to deploy...

All source. Code-behind source goes in App_CodeAll source. Code-behind source goes in App_Code

All binaryAll binary

Compiled pages and code-behind go in bin folderCompiled pages and code-behind go in bin folder

.aspx etc. still present but just empty markers.aspx etc. still present but just empty markers

UpdatableUpdatable

Code-behind compiled in bin folderCode-behind compiled in bin folder

.aspx etc. present in full..aspx etc. present in full.

Page 8: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Compilation ModelCompilation Model

Page 9: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Application ServicesApplication Services

Membership Role Manager Personalization

Site Navigation Database Caching

Management

Page 10: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Windows SQL Server Custom

Provider Model Design Pattern

SQL Express

Membership Role Manager Personalization

Site Navigation Database Caching

Management

Application ServicesApplication Services

Page 11: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Membership Role Manager Personalization

Site Navigation Database Caching

Management

ASP.NET 2.0 Developer StackASP.NET 2.0 Developer Stack

Page 12: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Membership Role Manager Personalization

Site Navigation Database Caching

Management

Page 13: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Membership Role Manager Personalization

Site Navigation Database Caching

Management

New ASP.NET 2.0 “Control Buckets” (Approximately 50)

Page 14: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

ASP.NET Application ServicesASP.NET Application Services

Page 15: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Server ArchitectureServer Architecture

HttpHandlerHttpHandler

Request Response

Page 16: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

IIS6 ASP.NET IntegrationIIS6 ASP.NET Integration

Page 17: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

IIS7 ASP.NET IntegrationIIS7 ASP.NET Integration

Page 18: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

IIS7 Managed ModulesIIS7 Managed Modules

Can use HttpModules at all pipeline stagesCan use HttpModules at all pipeline stages

Can be used with all types of contentCan be used with all types of content

Modules listed in IIS admin toolModules listed in IIS admin tool

Enabled/disabled per-applicationEnabled/disabled per-application

Access to HttpContext in HttpModuleAccess to HttpContext in HttpModule

Context data that used to be read-only can potentially Context data that used to be read-only can potentially be written tobe written to

Page 19: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

IIS7 Managed ModuleIIS7 Managed Module

Page 20: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

Further InformationFurther Information

http://www.asp.nethttp://www.asp.net

http://www.iis.nethttp://www.iis.net

Page 21: The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft martin.parry@microsoft.com

© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.