ASP.NET
3.5 features Asynchronous JavaScript and XML (AJAX), Integration with Windows
Communication Foundation (WCF), and Language Integrated Query (LINQ).
What’s
ASP.NET and Why?
ASP.NET
is the abstract programming model it propounds the Web Form Model, and ASP.NET
comes as native part of the Microsoft .Net Framework allows access to all power
of .Net.
Future: Dynamic Language
Runtime (DLR) where the next version of the SilverLight will be. SilverLight
support a subset of the WPF.
ASP.NET
is Web Form based and event driven programming.
HTTP
Request:
HTTP
Packet travels over a TCP connection.
Following
information can be found in an HTTP Request.
User Agent: The type of
browser that originated the request.
Connection: Close a
connection or keep alive.
If-Modified-Since: Provides client
side cache Validation.
A
blank link (of Carrige Return + line-Feed pair) separate the headers from the
content.
Server Side
Abstraction:
When
an aspx request comes to IIS it forwards it to ISAPI extension module to handle
it.
In
ASP.NET 2.0 and Later Page code can be precompiled and deployed as ana
assembly.
HtmlGenericControl
is used for less familiar tags like <span>, <font>, and
<iframe>.
Adaptive
Rendering: Render controls according to their requestee. Visit: www.asp.net/cssadapters
Page
Framework:
Page Events
Page Scripting (Java Scripiting +
AJAX)
Page Personalizing (Saving user
specific information)
Page Styling (Skins and Themes)
Page Prototyping (Master Pages)
The
Http Runtime:
The
HttpRequest is picked by IIS, given an identification token and passed to the
ASP.NET ISAPI extention (aspnet_isapi.dll) the entry processing for .Net
related processing.
IIS 5.X Ã
Request Ã
aspnet_isapi.dll Ã
aspnet_wp.exe à Load
CLR
à creates a separate
AppDomain for each Web Application
aspnet_wp.exe
runs under a restricted account.
aspnet_isapi.dll +
aspnet_wp.exe
provides following features:
·
Process Recycling
·
Page output caching
·
Memory Monitoring
·
Thread pooling
IIS 6.0
and Later(w3wp.exe) à aspnet_isapi.dll à Loads CLR Ã
creates a separate AppDomain for each Web Application
System
HTTP Modules:
System
HTTP modules are ASP.NET counterpart of ISAPI filters. ASP.NET applications
inherit a few system HTTP modules as defined in the machine.config. Preinstalled
modules provide features such as authentication, authorization, and session
related services.
An
HTTP module can preprocess and postprocessa request and it intercepts and
handles system events as well as events raised by other applications.
Application
Configuration:
Machine.config,
web.config, etc
Application
Services:
Authentication,
state management, caching, membership, role management, and personalization.
The
ASP.NET provider model:
It’s
the implementation of the strategy pattern. It’s about exposing the internal
implementation through well defines interface so that client may unplug the
default implementation and plug-in his own implementation.
The
Adapter Pattern:
If
you have some implementation already and want to plug-in it new framework use
adapter pattern that illustrates: Implement an A in class B that framework
class C understand and wrap your existing code into that interfaces
implementation.
Implementation
of the ASP.NET Provider Model:
Provider
model consist of Provider classes, configuration layer, and storage layer.
Provider classes:
A
provider class implements an interface known to its clients. ASP.NET uses base
classes instead of interfaces.
All
provder classes inherit from the ProviderBase class that exposes
an inheritable method Initialize() to which settings
read from configuration are passed.
Interface
VS Base Classes:
Uses interface and you may reach a
situation when you convert them to abstract classes.
A base class defines a common behavior and
a common programming interface for a tree of child classes. Classes are more
flexible and provide versining support.
Versioning support means you can add new
methods safely to the base class without requiring the other classes to
implement them.
Configuration Layer:
Each supported class type is assigned
a configuration section in configuration file. The content of the section are
passed as an argument to the Initialize() method of the
ProviderBase class.
Storage Layer:
Storage detail are packed in the
configuration section of the provider. E.g.: AspNetSqlProvider will require
connection string, userid, pwd etc.
Availble
ASP.NET Provider Base Classes:
MembershipProvider, PersonalizationProvider, ProfileProvider, ProtectedConfigurationProvider, RoleProvider, SessionStateStoreProviderBase,
SiteMapProvider, WebEventProvider.
Download
ASP.Net Provder toolkit from: