The .NET framework is a software framework developed by Microsoft and runs primarily on Microsoft Windows platform. It can be used to create Form-based applications, Web-based applications, and Web services. The first version of the .NET Framework 1.0 was released in the year 2002.
The .NET framework applications are cross-platform applications and the framework has been designed in such a way that it can be used from any of the following languages: C#, C++, Visual Basic, J#, F#, JScript, etc. All these languages can access the framework as well as communicate with each other.
Following are services that the .NET framework provides to running apps:
-
Memory management: In .NET framework apps, the CLR provides services such as allocating and releasing memory, handling object lifetimes, etc.
-
Class Library: Instead of having to write vast amounts of code to handle common low-level programming operations, programmers use a readily accessible library of types and their members from the .NET Framework Class Library (FCL).
-
Development Frameworks and Technologies: The .NET framework includes libraries for specific areas of app development, such as ASP.NET for web apps, ADO.NET for data access, Windows Communication Foundation (WCF) for service-oriented apps, and Windows Presentation Foundation (WPF) for Windows desktop apps.
-
Language Interoperability: The interaction required between new and older applications, the .NET framework provides a means to access functionality implemented in programs that execute outside the .NET environment. With this feature, routines written in one language are accessible to other languages, and programmers focus on creating apps in their preferred languages.
-
Side-by-side Execution: The .NET framework allowing multiple versions of the common language runtime to exist on the same computer. This means that multiple versions of apps can coexist and can run on the version of the .NET framework with which it was built.
The .NET framework has four main components:
-
Common Language Runtime
-
Framework Class Library
-
Core Languages (WinForms, ASP.NET, and ADO.NET)
-
Other Modules (WCF, WPF, WF, LINQ, Entity Framework, Parallel LINQ, etc.)
As the .NET Framework relates to C#, it defines two core and essential parts, the first is the Common Language Runtime (application virtual machine) and the second part is the Framework Class Library.
1. Common Language Runtime (CLR)
The CLR introduced in .NET Framework 2.0 and considered as a foundation of the .NET framework. It acts as an interface between the framework and operating system. This system manages the execution of your program (convert the program into native code) and providing core services such as memory management, thread management, security, and exception handling. It is a program execution engine that loads and executes the program. *The Common Language Infrastructure (CLI) is a platform on which the .NET programs are executed.
2. Framework Class Library (FCL)
The FCL is a collection of reusable types that tightly integrate with the Common Language Runtime. The class library is object-oriented, providing the user interface, data access, database connectivity, web application development, network communications, file access, etc. This library contains several classes, data types, interfaces, and used to perform multiple functions and build applications such as web, desktop, mobile applications, etc.
3. Core Languages:
-
WinForms: Client-based applications which read and write the file system fall under this category.
-
ASP.NET: Web services are introduced in .NET Framework 2.0. The Web-based applications fall under this category. ASP.NET is a framework for web and it provides the awesome integration of HTML, CSS, and JavaScript which makes it useful to develop web applications, websites and web services.
-
ADO.NET: It includes the application which is developed to communicate with the database like MS SQL Server, Oracle, etc. It consists of classes that can be used to connect, retrieve, insert and delete data.
4. Other Modules:
-
Windows Presentation Foundation (WPF): It is a graphical subsystem given by Microsoft which uses DirectX and is used in Windows-based applications for rendering User Interface.
-
Windows Communication Foundation (WCF): It is a framework for building connected and service-oriented applications used to transmit the data as asynchronous from one service endpoint to another service point.
-
Windows Workflow Foundation (WF): It is a technology given by Microsoft which provides a platform for building workflows within .Net applications.
-
Card Space: It is a Microsoft .NET framework software client which is designed to let users provide their digital identity to online services in a secure, simple and trusted way.
-
Language-Integrated Query (LINQ): It is introduced in .NET framework version 3.5. Basically, it is a query language used to make the query for data sources with Visual Basics or C# programming languages.
-
Entity Framework: It is an open-source Object-Relational Mapping based framework which introduced into .NET framework version 3.5. It enables the .NET developer to work at a higher level of abstraction with a database using .NET objects. It is Microsoft's recommended technology to deal with the database.
-
Parallel Language Integrated Query (PLINQ): It introduced in .NET framework 4.0 and also termed as PLINQ. It provides a concurrent query execution engine for LINQ. It executes the LINQ in parallel such that it tries to use as much processing power system on which it is executing.
-
Task Parallel Library (TPL): It is introduced in .NET framework 4.0 and used to write multithreaded and parallel code. It is a set of public types and APIs in the System.Threading and System.Threading.Tasks namespaces. It allows the developers to be more productive by simplifying the process of adding concurrency and parallelism to .NET applications.
-
.NET API for Store/UWP Apps: In 2012, Microsoft added some APIs for creating UWP (Universal Windows Platform) apps for Windows. Programmable in C#, C++, Visual Basic, and JavaScript. For UI, use XAML, HTML, or DirectX.
-
Task-Based Asynchronous Model: It is a model used to describe the asynchronous operations and tasks in the .NET framework.
So with this, I think you now have a brief idea about the .NET framework and its capabilities. The .NET framework is required for C# programming language.
You may also like: