.NET Framework Architecture and Components

.NET Framework Architecture and Components

In this article, I am going to discuss .NET Framework Architecture and Components in detail. Please read our previous article where we give a brief introduction to .NET Framework. At the end of this article, you will understand what is .NET Framework, .Net Framework Architecture, .NET Components, and .Net Framework Design Principle are.

What is .Net Framework?

.NET is a framework to develop software applications. It is designed and developed by Microsoft and the first beta version was released in 2000. It is used to develop applications for Web, Windows, and Phones. Moreover, it provides a broad range of functionalities and support.

This framework contains a large number of class libraries known as Framework Class Library (FCL). The software programs written in .NET are executed in the execution environment, which is called CLR (Common Language Runtime). These are the core and essential parts of the .NET framework. This framework provides various services like memory management, networking, security, memory management, and type-safety.

.Net Framework is a software development platform developed by Microsoft for building and running Windows applications. The .Net framework consists of developer tools, programming languages, and libraries to build desktop and web applications. It is also used to build websites, web services, and games.

The .Net framework was meant to create applications, which would run on the Windows Platform. The first version of the .Net framework was released in the year 2002. The version was called .Net framework 1.0. The Microsoft .Net framework has come a long way since then, and the current version is .Net Framework 4.8.

The Microsoft .Net framework can be used to create both Form-based and Web-based applications. Web services can also be developed using the .Net framework. The framework also supports various programming languages such as Visual Basic and C#. So, developers can choose and select the language to develop the required application. In this chapter, you will learn some basics of the .Net framework.

The .Net Framework supports more than 60 programming languages such as C#, F#, VB.NET, J#, VC++, JScript.NET, APL, COBOL, Perl, Oberon, ML, Pascal, Eiffel, Smalltalk, Python, Cobra, ADA, etc.

In this .Net Architecture tutorial, you will learn .NET Framework basics-

  1. .Net Framework Architecture
  2. .NET Components
  3. .Net Framework Design Principle
.Net Framework Architecture

.Net Framework Architecture is a programming model for the .NET platform that provides an Execution Environment (CLR) and integration with various Programming Languages (C#, VB, F#, etc.) for the development and deployment of various Standalone (Console and Windows) and Web Applications (ASP.NET) applications. It consists of class libraries (Base Class Library) and reusable components (Component you can get from NuGet). The basic architecture of the .Net framework is shown below.

.Net Framework Architecture

.NET Components

The architecture of the .Net framework is based on the following key components.

1. Common Language Runtime Component in .NET Framework

It is the program execution engine that loads and executes the program. It converts the program into native code. It acts as an interface between the framework and the operating system. It does exception handling, memory management, and garbage collection. Moreover, it provides security, type-safety, interoperability, and portability. A list of CLR components is given below:

Common Language Runtime Component in .NET Framework

Working with Various programming languages:

As discussed earlier, a developer can develop any .NET application using any of the Dot Net-supported programming languages like C#, VB, F#, etc.

  1. Language – The first level is the programming language itself; the most common one that is used nowadays is C#.
  2. Compiler – There is a compiler that will be separate for each programming language. For example, VBC is the compiler for VB.Net language and CSC is the compiler for C# Language.
  3. Common Language Interpreter – This is the final layer in .Net that would be used to run a .net program developed in any programming language. So, the subsequent compiler will send the program to the CLI layer to run the .Net application.

Working with Various programming languages

2. Class Library Component in .NET Framework

The .NET Framework includes a set of standard class libraries. 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 that can be used to read the text from a file. Similarly, there is a method to write text to a file.

It is a standard library that is a collection of thousands of classes and is used to build an application. The BCL (Base Class Library) is the core component of the .NET Framework or you can say it is the basic building block of the .NET Framework.

Class Library Component in .NET Framework

3. Applications

The types of applications that can be built in the .Net framework are classified broadly into the following categories.

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. Windows Forms is a smart client technology for the .NET Framework, a set of managed libraries that simplify common application tasks such as reading and writing to the file system.

ASP.NET – This is used for developing web-based applications, which are made to run on any browser such as Edge, Chrome or Firefox. ASP.NET is a web framework designed and developed by Microsoft. It is used to develop websites, web applications, and web services. It provides a fantastic integration of HTML, CSS, and JavaScript. It was first released in January 2002.

  1. The Web application would be processed on a server, which would have Internet Information Services Installed.
  2. Internet Information Services or IIS is a Microsoft component that is used to execute an ASP.NET application.
  3. The result of the execution is then sent to the client machines, and the output is shown in the browser.

ADO.NET: This technology is used to develop applications to interact with databases such as Oracle or Microsoft SQL Server. ADO.NET is a module of the .Net Framework, which is used to establish a connection between applications and data sources. Data sources can be such as SQL Server and XML. ADO .NET consists of classes that can be used to connect, retrieve, insert, and delete data.

WCF (Windows Communication Foundation): It is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another.

LINQ (Language Integrated Query): It is a query language, introduced in .NET 3.5 framework. It is used to make the query for data sources with C# or Visual Basics programming languages.

Entity Framework: It is an ORM-based open-source framework that is used to work with a database using .NET objects. It eliminates a lot of developers’ effort to handle the database. It is Microsoft’s recommended technology to deal with the database.

Parallel LINQ: Parallel LINQ or PLINQ is a parallel implementation of LINQ to objects. It combines the simplicity and readability of LINQ and provides the power of parallel programming. It can improve and provide fast speed to execute the LINQ query by using all available computer capabilities.

.Net Framework Design Principle

The following design principles of the .Net framework are what make it really relevant to create Dot Net applications.

  1. Interoperability: The .Net framework provides a lot of backward support. Suppose 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 that 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 should work 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 released .NET Core or .NET which makes Microsoft products work on other platforms, such as Mac and Linux.
  3. Security: The .NET Framework has a good security mechanism. The inbuilt security mechanism helps in both the validation and verification of applications. Every application can explicitly define its 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 hard work for memory management. 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 collector runs at regular intervals and keeps on checking which system resources are not utilized, and frees them accordingly.

In the next article, I am going to discuss Introduction to C# Programming Language. Here, in this article, I try to explain .NET Framework Architecture and Components in detail. and I hope you enjoy this .NET Framework Architecture and Components article.

Leave a Reply

Your email address will not be published.