Sunday, 8 July 2012

How ASP.NET is different from VB.NET or C#

ASP.NET, VB.NET, C#


Many new programmers are confused about how ASP.NET is different from C# or VB.NET. Many new programmers misunderstand that ASP.NET is just another programming launguage.

What is ASP.NET ?

  • ASP.NET is the name of the Microsoft technology used for web site development.
  • ASP.NET is NOT a programming language like C# or VB.NET
  • ASP.NET development requires a programming language like C# or VB.NET to write code.
  • ASP stands for Active Server Pages.
  • There are several other technologies exist for web development (Eg: PHP). ASP.NET is the technology from Microsoft and it he widely used one.
  • ASP.NET technology comes with a rich set of components and controls that make the web development very easy.
  • Visual Studio .NET is the editor from Microsoft which helps you develop ASP.NET web sites faster and easily.
  • IIS is the web server from Microsoft which supports ASP.NET. To develop ASP.NET web sites, you must have IIS installed in your computer.

In ASP.NET programming, a web page is developed using HTML and a .NET programming language like C#, VB.NET or J#. You can choose your favourite .NET language to develop ASP.NET pages.

So, now you must be clear that ASP.NET is not a programming language and it requires a language like C# or VB.NET to develop ASP.NET web sites.

Web Applications Working


How web applications work ?

Web applications work quite different from regular windows applications. This section explains the fundamentals of a web application and how a web page is served when a client makes a request for a web page.
Web applications work quite different from regular windows applications. There are several computers involved when you view a web page.

Life Cycle of a Web Request



Viewing a web page is a simple process for a visitor. Just type the URL in a web browser like Internet Explorer or click on a hyper link in any existing web page. The web browser will display the page instantly to you.

But do you know that there are several computers involved in this process? Even though it is a very complex process, we can summarize the process as shown below:

1. You type the web page address (URL) in a browser. For example, consider the current page http://www.aspspider.com/tutorials.aspx. This URL has 3 parts:

  • The protocol - http:
  • The server name - www.aspspider.com
  • The file name - tutorials.aspx

2. Browser communicates with a computer in internet called 'Domain Name Server' to find out the IP Address of the server (Eg: www.aspspider.com).
3. Browser established a connection to the web server at that IP Address.
4. Server composes a 'Request' for the specified URL and sends the request to the web server to which it has established a connection.
5. The web server identifies the type of the page requested. If it is an asp.net web page, then browser knows that needs some processing by the asp.net service running as part of the web server. The request is handed over to the asp.net service. The asp.net service processes the asp.net page and generates the html output.
6. Web server sends the requested page to the browser.
7. When a response is received by the browser, it displays the web page to the user who typed the URL.

After you typed the URL in the browser, the request sent by the browser may go through several computers in the internet before it reaches the actual web server.

You must be surprised to know that so many things happen and several computers are involved before a simple web page is displayed to you. Most of the steps in the above process happens behind the screen. A visitor need not worry about how a web page is processed and served to the browser.

So, by now you must have got a better picture about how a windows application is different from a web application. When you run a windows application (desktop application), only one computer is involved in the whole process. You start an application in your computer and it runs in your computer. But when you request a web page from your home computer, the request goes through several servers in the internet and finally it reaches a computer called 'Web Server'. The actual web page is processed in the web server.