.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 C# Language. 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 and integration with various programming languages for simple development and deployment of various Windows and desktop applications. It consists of class libraries and reusable components. 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 a 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 an application in a variety of .Net programming languages.

  1. Language – The first level is the programming language itself; the most common ones are VB.Net and C#.
  2. Compiler – There is a compiler that will be separate for each programming language. So, underlying the VB.Net language, there will be a separate VB.Net compiler. Similarly, for C#, you will have another compiler.
  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 of the FCL and provides basic functionalities.

Class Library Component in .NET Framework

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. We will learn about these namespaces more in detail in the subsequent chapters.

3. Languages

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 Internet Explorer, 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.

WPF (Windows Presentation Foundation): Windows Presentation Foundation (WPF) is a graphical subsystem by Microsoft for rendering user interfaces in Windows-based applications. WPF, previously known as “Avalon”, was initially released as part of .NET Framework 3.0 in 2006. WPF uses DirectX.

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.

WF (Workflow Foundation): Windows Workflow Foundation (WF) is a Microsoft technology that provides an API, an in-process workflow engine, and a re-hostable designer to implement long-running processes as workflows within .NET applications.

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.

Apart from the above features and libraries, .NET includes other APIs and Models to improve and enhance the .NET framework. In 2015, Task Parallel and Task parallel libraries were added. In .NET 4.5, a task-based asynchronous model was added.

Microsoft always ensures that .Net frameworks are in compliance with all the supported Windows operating systems.

.Net Framework Design Principle

Now in this .Net Architecture tutorial, we will learn the design principles of the .Net framework. The following design principles of the .Net framework are what make it very 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 gel 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 making Microsoft products work on other platforms, such as iOS 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 work or 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.
  5. Simplified Deployment: The .Net framework also has 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.

In the next article, I am going to discuss How to Download and Install Visual Studio on Windows. 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.