0% found this document useful (0 votes)
8 views6 pages

1 What Is

Uploaded by

Jesica D'cruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

1 What Is

Uploaded by

Jesica D'cruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

.

NET Program Execution


Let us first understand how VB6 or C++ programs (Non Dot net applications) executes.
We know that computers only understand machine level code.

Machine level code is also called as native or binary code.

So, when we execute a VB6 or C++ program, the respective language compiler, compiles the
respective language source code into native code, which can then be understood by the underlying
operating system and hardware.

This process is depicted in the image below.

Native code is specific (native) to the operating system on which it is generated.


If you take this compiled native code and try to run on another operating system it will fail. So
the problem with this style of program execution is that it is not portable from one platform to
another platform.
Let us now understand, how a .Net program executes.
Using dotnet we can create different types of applications.
A few of the common types of .NET applications include Web, Windows, Console and Mobile
Applications.
Irrespective of the type of the application, when you execute any .NET application the following
happens:
1. The .NET application gets compiled into Intermediate language (IL). IL is also referred as
Common Intermediate language (CIL) and Microsoft Intermediate language (MSIL).
Both .NET and non .NET applications generate an assembly. Assemblies have an extension of .DLL
or .EXE.
For example if you compile a windows or Console application, you get a .EXE, where as when we
compile a web or Class library project we get a .DLL.
The difference between a .NET and NON .NET assembly is that, DOT NET Assembly is in
intermediate language format where as NON DOTNET assembly is in native code format.

2. NON DOTNET applications can run directly on top of the operating system, where as
DOTNET applications run on top of a virtual environment called as Common Language
Runtime (CLR). CLR contains a component called Just In-Time Compiler (JIT),
https://www.youtube.com/watch?v=F-xfpETPtqM may you watch the whole video or for JIT
watch from 4.40minutes…….
which will convert the Intermediate language into native code which the underlying operating
system can understand.

So, in .NET the application execution consists of 2 steps


1. Language compiler, compiles the Source Code into Intermediate Language (IL)
2. JIT compiler in CLR converts, the IL into native code which can then be run on the underlying
operating system.
This process is shown in the image below.
Since, a .NET assembly is in Intermediate Language format and not native code, .NET assemblies
are portable to any platform, as long as the target platform has the Common Language Runtime
(CLR).
The target platform's CLR converts the Intermediate Language into native code that the underlying
operating system can understand.

Intermediate Language is also called as managed code.


This is because CLR manages the code that runs inside it.
For example, in a VB6 program, the developer is responsible for de-allocating the memory consumed
by an object. If a programmer forgets to de-allocate memory, its difficult to detect out of memory
exceptions.
On the other hand a .NET programmer need not worry about de-allocating the memory
consumed by an object. Automatic memory management, also known as garbage collection is
provided by CLR.
Since, CLR is managing and executing the Intermediate Language, it (IL) is also called as
managed code.
.NET supports different programming languages like C#, VB, J#, and C++.
C#, VB, and J# can only generate managed code (IL), where as C++ can generate both managed
code (IL) and un-managed code (Native code).
The native code is not stored permanently anywhere, after we close the program the native code is
deleted.
When we execute the program again, the native code gets generated again.
.NET program is similar to java program execution. In java we have byte codes and JVM (Java
Virtual Machine), where as in .NET we have Intermediate Language and CLR (Common Language
Runtime)

What is ASP.NET?

ASP.NET is a Web application framework developed by Microsoft to build dynamic data


driven Web applications and Web services
(https://www.c-sharpcorner.com/UploadFile/00a8b7/web-service/ ).

1. ASP.NET is a subset of .NET framework. In simple terms a framework is a collection of


classes.

2. ASP.NET is the successor to classic ASP (Active Server Pages).

What other technologies can be used to build web applications

1. PHP
2. Java
3. Ruby on Rails
4. Perl

What is a Web Application?


A web application is an application that is accessed by users using a web browser. Examples of
web browsers include
1. Microsoft Internet Explorer
2. Google Chrome
3. Mozilla FireFox
4. Apple Safari
5. Netscape Navigator

What are the advantages of Web applications?


1. Web Applications (google.com) just need to be installed only on the web server, where as desktop
applications ( eg. Microsoft Office) need to be installed on every computer, where you want to
access them.
2. Only a browser is required on the client machine to access a web application.
3. Maintenance, support and patches are easier to provide.
4. Accessible from anywhere, provided there is internet.
5. Cross Platform (Microsoft office is developed for Windows then it will not run on MacOS. But a
web application can be opened if you just have a browser that understands HTML)

How Web applications work?


1. Web applications work on client/server architecture
2. On the client all you need is a browser, that can understand HTML
3. On the server side, the Web application runs under Microsoft Internet Information Services (IIS)

When the client enters the URL of the web application in the browser, and submits the request.

The web server which hosts the web application, receives the request.

The request is then processed by the application.

The application generates, the HTML and hands it over to the IIS (web server).

IIS sends the generated HTML to the client, who made the initial request.

The client browser will the interpret the HTML and displays the user interface.

All this communication, happens over the internet using HTTP protocol.
HTTP stands for Hyper Text Transfer Protocol. (this is why you see the http:// in the url)

A protocol is a set of rules that govern how two or more items communicate.

You might also like