Updated March 20, 2023
Overview of .NET Framework Architecture
This article will help you in understanding the basics of the .net framework and its architecture.
.net framework is not a new one but it is widely used by many companies. It is a framework developed by Microsoft and it basically runs on Microsoft windows. Its first beta version was 1.0 which was released in the year 2002. It is a framework for developing a console base, window-based application, and web-based application. This framework supports many programming languages like c# and visual basics. So it’s easy for the developer to choose any language to develop their required application.
Components of .NET Framework Architecture
The architecture of the .net framework is based on .net component. Let’s have a look at its component and its description of its architecture with the help of its diagram.
1. CLR (Common Language Runtime)
It is a platform on which .net programs are executed. as we said developer can choose any .net programming language for it. CLR manages the execution of the program written in any language. JIT (Just-in-time) Compiler is a part of CLR that converts the managed code which is compiled intermediate language code, into machine instructions and then executed on the CPU of the computers.
When the code is compiled, the compiler converts its source code into the intermediate language (IL) which is CPU independent. now the JIT (just in time) compiler compiles the IL code into its CPU specific native code. It provides a robust and secure execution environment. It provides an interface between the framework and operating system.
There are two types of code categorized in .net framework one manages code that will run and execute under the CLR environment. Another one is unmanaged code which will not run and execute in the CLR environment. Also, it supports multiple languages that simplify application development.
It has many major features so Let’s have a look at its major features.
- Code Access security
- Memory management
- Thread support
- Debug engine
- Capabilities in optimizing, securing and providing robust capabilities like application deployment and side by side execution.
- Garbage collection which removes unwanted resources when it is not required
- Exception handling which includes cross-language exceptions. Exceptions are errors when the program or application is executed
- JIT Compilation (Just-In-Time)
Suppose we wrote a program and it needs memory, CLR now allocates the memory for the program in scope and de-allocates the memory when it is not required or it is completed.
2. Framework Class Library (FCL)
It is a collection of thousands of classes, interfaces, namespaces and value types that are used for .NET application to build an application.it is basically a standard library. It is a key component of the .net framework that provides core functionalities of .net.
FCL is specially designed to provide services to the Windows API (application programming interface), which was used before the .net was created. Framework class library has its own code base which is easy to use, as managed, object-oriented. On the other hand, API is unmanaged, modular and not easy to use. It contains many classes that support the following functionalities.
- Exception handling support
- Stream operations and input/output
- Base and User-defined data types
- Access to data
- Communication with underlying systems
- Creating web-client and server applications
- Creating a window-based GUI based application
- Provides support for creating web services
- Garbage collection
- Security, data access.
- Database connectivity
- Network communication
It is organized in a hierarchical tree structure which is divided into Namespaces. Basically Namespaces are the logical grouping of types and ways to organize .net FCL according to their functionality, usability as well as a category from where they belong to. Its inbuilt security mechanism helps in the verification and validation of an application.
FCL gives us the consistent base types that are used widely across all the .net enabled languages. FCL are managed classes that provide access to system services. System namespace is the root of types in the .net framework. FCL classes are easy to use and are object-oriented and we can use it in program developments. also, third party components can able to integrate with the classes in the .net framework.
Developers or programmers don’t have any tension of managing the memory because it has memory management feature and thread management. FCL is the same as java foundation class. But the main challenge in with FCL is to know or identify the specific class which can provide us the required functionality. If the FCL library is not used properly by the programmer than it will have an adverse effect on a developer’s productivity which led to discouraging its usage.
FCL is integrated with CLR (Common Language Runtime) that manages the code execution. Also, classes and interfaces are grouped in the namespaces so that they can be accessed easily.
3. Language
As we know.net supports many languages and that’s why it is easy for the developer to choose any language for the development of the required application. The various application can be built in the .net framework which is classified broadly in the following categories.
- Winform: form-based application is developed with the help of Winform, which will run on an end-user machine. Notepad is one of the examples of client-based applications.
- ASP .NET: web-based applications are developed by ASP .net.it will run on any of the browsers like chrome, internet explorer or Firefox. Internet information services are installed on which web applications will be processed on this server. IIS is used to execute ASP.NET applications which are a Microsoft component. This result of the execution is now sent to the client and now this output is shown in the browser.
- ADO .Net: It’s a technology that develops applications and will interact with databases such as Oracle or Microsoft SQL servers. The most commonly used languages in .net are C# and VB .net.
Conclusion
In this article, you must have learned and gained the basic idea of architecture and the framework of .net. It’s very powerful, flexible, and simple for developing windows-based applications. as it supports many languages it’s easy for a developer to choose a wide variety of languages.
Recommended Articles
This is a guide to .NET Framework Architecture. Here we discuss an overview and the top 3 components of .NET framework architecture i.e. CLR, FCL, and Language. You may also look at the following articles to learn more –