ASP.NET
stands for Active Server Page Network Enabled Technologies.
ASP.NET is
basically a platform/framework to build web-based application using one of the
many available programming languages such as C#, VB.NET etc.
The ASP.NET
is designed to work with HTTP protocol which is the most used protocol in web
technologies.
It is
important to realize the architecture of the ASP.NET before going ahead. The
ASP.NET uses libraries which are known as FCL Framework Class Library and CLR,
Common Language Runtime and a few collections of languages such as C#, VB.NET
etc. The architecture of ASP.NET is therefore about three things.
- Language: - The .NET allows you to use any one
of the programming languages as per the taste and skill of the developer.
- Library: - The .NET framework has some
standard libraries. For web-based application, we can use web library.
- CLR: - The CLR should be considered as a platform which facilitates running code written in any one of different languages such as C#, VB.NET etc.
Characteristics
of ASP.NET Framework
Code
Behind Mode- It is
all about separation of code and design of the application. This is very
important feature which allows the developer to focus on the code or design
independently. When an ASP.NET web application has file with .ASPX extension,
another file is created with .ASPX.CS extension if the code is in the C#
language. This is code file different from the design file.
State
management- The
concept of state is very crucial in the web application. When the data of web
form is transmitted to server, the state of data may change. Because HTTP
protocol is a stateless protocol, it is very important to store the state of
data when the user clicks to another page, otherwise the data will be lost.
Thus, it is very important to manage the state of data depending upon the
nature of requirements.
Caching- In the programming, caching is all
about keeping the data ready for use whenever user needs the data. Sometimes,
user visits the same page again and again. In this situation, the page can be
cached so that the retrieval time could be reduced. The pages are cached in
temporary locations.
Life Cycle
of ASP.NET Application
Every
application has its life cycle. Understanding the life cycle is important for
the ASP.NET developers. An ASP.NET application is a web application developed
using .NET frameworks. The web application has several web pages. The life
cycle of the application is as follows:
- When application starts, an index file or home file is executed. The request goes to the web server and Application_Start method is executed. In this method, all the global variables are initialized with their default values.
- Every time user sends request to the server, object is created such as request object, response object, context object by the server. Technically, they are known as HttpContext, HttpRequest & HttpResponse. The HttpContext is just the container for the HttpRequest and HttpResponse objects. The HttpRequest object contains information about the current request, including cookies and browser information. The HttpResponse object contains the response that is sent to the client.
- These objects are not enough to recognize the application. Therefore, server creates another object called HttpApplication
- Dispose- This is an event object which is invoked before the instance of the application is destroyed. This allows to manage resources.
- End of Application- The application is unloaded from the memory and memory is cleansed.
Page Life
Cycle
When request
is sent to the web server for a page by browser, several steps take place
before the response is sent back to the client browser. The steps and the
objects created in these steps are as follows:
- Page Request
- Page Start
- Page Initialization
- Page Load
- Validation
- Post back event handling
- Page Rendering
- Upload
When a page
is requested from the server, it checks whether the page requested is new one
or it has already been requested earlier. For this, the server searches the
cache. If the page is not requested before, the server compiles the page and
responds. In contrary situation, the server finds the page from the cache and
responds.
Page Start
In this
stage, two objects are created- request object and response object. The Request
object holds all the information sent to the server and the response object
holds all the information sent back to the client.
Continued...
Continued...
No comments:
Post a Comment