Introduction to .
Net
The .Net framework is a software development platform developed by Microsoft. The framework
was meant to developed applications, which would run on Windows platform. .Net 1.0 was release
in the year 2002. The current version of .Net framework is 4.7.1. The .Net framework can be used
to create both Form based and Web based application. Web service can also be developed using
.Net Framework. The framework supports various programming language such as Visual Basic and
C#, C++, COBOL, FORTRAN, J#, Pascal, Perl, etc. The main intention was to bridge the gap in
interoperability between services of various programming languages.
It is used to develop Form-based applications, Web-based applications, and Web services. There
is a variety of programming languages available on the .Net platform, VB.Net and C# being the most
common ones. It is used to build applications for Windows, phones, web, etc. It provides a lot of
functionalities and also supports industry standards.
.Net Framework Architecture
VB C++ C# More .Net
Languages
Common Language Specification
ASP.Net Windows Forms ADO.Net
Base Class Library
Common Language Runtime(CLR)
Operating System
Figure 1: .Net Framework Architecture
The architecture of the .Net framework is based on the following key component
1. Common Language Runtime (CLR):Common Language Runtime (CLR) is a managed exe-
cution environment that is part of Microsoft’s .NET framework. CLR manages the execution of
programs written in different supported languages.
CLR transforms source code into a form of byte code known as Common Language Infrastruc-
ture” (CIL). At run time, CLR handles the execution of the Common Language Infrastructure”
or CIL code. CLI is a platform on which the .Net programs are executed. Developers write
code in a supported .NET language, such as C# or VB.Net. The .NET compiler then converts
it into CIL code. During run time, the CLR converts the CIL code into something that can be
understood by the operating system. The language compilers store metadata that describes the
members, types and references in the compiled code. The CLR uses the metadata to layout
instances in memory, locate and load classes, enforce security, set runtime context boundaries,
and generate native code.
1
CLR allows for the easy use of different supported languages to achieve a common goal. This
makes it flexible for developers to choose their own programming language, provided it is
supported by the .NET framework. With CLR, .NET can manage the execution of all supported
languages by transforming them to byte code and then into the native code for the chosen
platform.
2. Framework Base Class Library:The .NET Framework includes a set of standard class li-
braries. A class library is a collection of methods and functions that can be used for the core
purpose. For example, there is a class library with methods to handle all file-level operations.
So there is a method which can be used to read the text from a file. Similarly, there is a method
to write text to a file. Most of the methods are split into either the System.* or Microsoft.*
namespaces. (The asterisk * just means a reference to all of the methods that fall under the
System or Microsoft namespace). A namespace is a logical separation of methods.
3. Language: The types of applications that can be built in the .Net framework is classified
broadly into the following categories.
(a) WinForms:This is used for developing Forms-based applications, which would run on an
end user machine. Notepad is an example of a client-based application.
(b) ASP.Net: This is used for developing web-based applications, which are made to run on
any browser such as Internet Explorer, Chrome or Firefox.
• The Web application would be processed on a server, which would have Internet
Information Services Installed.
• Internet Information Services or IIS is a Microsoft component which is used to exe-
cute an Asp.Net application.
• The result of the execution is then sent to the client machines, and the output is shown
in the browser.
(c) ADO.Net:This technology is used to develop applications to interact with Databases such
as Oracle or Microsoft SQL Server.
Characteristic of .NET Framework
1. Interoperability - The .Net framework provides a lot of backward support. Suppose if you had
an application built on an older version of the .Net framework, say 2.0. And if you tried to run
the same application on a machine which had the higher version of the .Net framework, say
3.5. The application would still work. This is because with every release, Microsoft ensures
that older framework versions get well with the latest version.
2. Portability- Applications built on the .Net framework can be made to work on any Windows
platform. And now in recent times, Microsoft is also envisioning to make Microsoft products
work on other platforms, such as iOS and Linux.
3. Security- The .NET Framework has a good security mechanism. The inbuilt security mecha-
nism helps in both validation and verification of applications. Every application can explicitly
define their security mechanism. Each security mechanism is used to grant the user access to
the code or to the running program.
4. Memory Management: The Common Language runtime does all the work or memory man-
agement. The .Net framework has all the capability to see those resources, which are not used
by a running program. It would then release those resources accordingly. This is done via a
program called the ”Garbage Collector” which runs as part of the .Net framework. The garbage
2
collector runs at regular intervals and keeps on checking which system resources are not uti-
lized, and frees them accordingly.
5. Simplified deployment :The .Net framework also have tools, which can be used to package
applications built on the .Net framework. These packages can then be distributed to client
machines. The packages would then automatically install the application.
Is .NET application platform dependent or platform independent?
The combination of Operating System Architecture and CPU Architecture is known as the platform.
Platform dependent means the programming language code will run only on particular Operating
System. A .NET application is platform-dependent because of the .NET framework which is only
able to run on the Windows-based operating system. The .Net application is platform-independent
also because of the Mono framework. Using the Mono framework the .Net application can run on
any Operating System including windows. Mono framework is a third-party software developed by
Novell Company which is now a part of Micro Focus Company. It is a paid framework.