In this article, we will learn about an introduction to .NET Framework i.e. what is NET Framework, what it is used for, which applications we can build using .NET frameworks, history of the .NET Framework, different versions of .NET Frameworks available & supported and much more.
This is the first post in the Series – Getting Started with .NET Platform, .NET Framework & .NET Core (.NET 5+)
- Post 1 – Introduction to .NET Framework (this post)
- Post 2 – Introduction to .NET Core (.NET 5+)
- Post 3 – .NET Framework vs .NET Core (.NET 5+)
- Post 4 – Migrate from .NET Framework to .NET Core (.NET 6) – Detailed Guide
Table of Contents
.NET Framework Overview
.NET Framework is a platform provided by Microsoft for software developers and this developer platform consists of runtime services, base class libraries that can be used in your code, various tools to support software development tasks and also this platform supports more than one programming language to choose from.
.NET Framework is part of the .NET Platform and this .NET platform was first introduced in 2002 after that, it kept on improving and evolving with many upgrades all these years. Today .NET is a mature platform and yet it still keeps evolving with improvements and new features.
.NET Framework 4.8 is the latest and recommended version of the .NET Framework for the development of the applications. .NET Framework gets shipped with Windows OS.
.NET Framework is a managed execution environment on Windows and it also provides many services to the applications running in this managed environment. The service provided to .NET Framework applications includes development framework, common type system, memory management, etc.
The main goal of the .NET Framework is to provide an environment using which developers can develop/run/test their applications and users of the application are able to run the applications developed for the .NET framework.
Microsoft also provides an integrated development environment (IDE) named Visual Studio that can be used to design, develop & run .NET framework applications.
.NET SDK Can be downloaded here
Objective of .NET Framework
.NET Framework is designed to build and run windows/web applications on windows to fulfil the following objectives
- Provide an object-oriented programming environment for the development
- Provide a consistent runtime for the execution of the applications irrespective of whether it is executed locally, remotely or locally through we activation (Click Once)
- Provide an environment that makes it possible to execute applications in a safe and trusted or semi-trusted way.
- Provide consistent developer experience for developing varying types of applications such as console apps, windows app, web apps, services, etc.
- Provide inter-process communication as per industry standard which makes it possible to integrate .NET Framework-based application with any other application.
Release History of .NET Framework
.NET was launched by Microsoft in the year 2002 with the name .NET Framework 1.0. Since 2002 there is no looking back for the .NET Team and today at the start of 2022 we are at .NET Framework 4.8. Till today not only version number has changed over the years but the .NET framework has also evolved by improvements and adding new features.
Framework | CLR Version | Release Date | Supported Till |
.NET Framework 4.8 (Latest) | 4.0 | April 18, 2019 | |
.NET Framework 4.7.2 | 4.0 | April 30, 2018 | |
.NET Framework 4.7.1 | 4.0 | October 17, 2017 | |
.NET Framework 4.6.2 | 4.0 | April 5, 2017 | |
.NET Framework 4.6.1 | 4.0 | November 30, 2015 | April 26, 2022 |
.NET Framework 4.6 | 4.0 | July 20, 2015 | April 26, 2022 |
.NET Framework 4.5.2 | 4.0 | May 5, 2014 | April 26, 2022 |
.NET Framework 4.5.1 | 4.0 | October 17, 2013 | Not Supported |
.NET Framework 4.5 | 4.0 | August 15, 2012 | Not Supported |
.NET Framework 4.0 | 4.0 | April 12, 2010 | Not Supported |
.NET Framework 3.5 SP1 | 2.0 | November 18, 2008 | October 10, 2028 |
.NET Frameworks with different CLR versions can be installed side-by-side on the same machine. While .NET Frameworks with the same CLR version will upgrade the existing installed version. i.e. if you try to install the latest framework on a machine with .NET 3.5 & .NET 4.7.1 already installed on it then in that case 4.7.1 will be upgraded to 4.8 and 3.5 will remain as it is.
Major Components of .NET Framework
.NET framework is made of two major components Common Language Runtime (CLR) and the .NET Framework Class Library. The Class Library in .NET Framework provides a set of APIs and types to implement the common functionalities in your application targeting .NET Framework. The CLR is the execution engine that handles running applications.
Common Language Runtime (CLR)
The Common Language Runtime (CLR) is the heart of the .NET Framework. CLR is the execution engine that is responsible for the execution of the applications built on the .NET framework. CLR provides many services for the execution of the application such as compilation i.e. conversion of code into Intermediate Language (IL) or Microsoft Intermediate Language (MSIL), conversion of IL code (compiled code) into machine code (using JIT compiler), memory management using garbage collection, thread management, exception handling, Security and much more.
CLR manages the execution of the application regardless of the programming language used for the development of the application. This way CLR enhances developer productivity as it allows developers the use the programming language in which they are good and comfortable.
.NET Framework-based applications are coded in the programming of choice (C# or F# or Visual Basic) and compiled into the MSIL and this compiled IL code is stored in assemblies i.e. files with .dll or .exe file extension. CLR takes these assemblies and with help of the Just-In-Time (JIT) compiler converts this compiled code into Machine Code that can be executed on that computer it is running on.
.NET Framework Class Library
.NET framework ships with a vast set of APIs and types for the development and implementation of the common functionality in your application. The class library provides different types to hold your data like text, date, time, numbers, etc. and also provides APIs to perform read/write operations on the data i.e. read/write files, connecting to the database to save or retrieve data, maths operations, text operations, drawing operations, etc.
Programming Languages Supported in .NET Framework
.NET Framework supports majorly 3 main programming languages. So developers can choose and code in their preferred choice of language.
C# – Pronounced as C Sharp is the most popular programming language on the .NET platform. It is a simple, modern, objected-oriented and type-safe programming language available on the .NET platform.
F# – Pronounced as F Sharp allows developers to easily write programs that are clearly expressed, robust and performant.
Visual Basic – It is an object-oriented and type-safe language that is easy to read, write and understand.
.NET Framework applications are written in C#, F#, or Visual Basic and compiled to Common Intermediate Language (CIL).
Application Types Supported in .NET Framework
You can use .NET Framework to develop the following types of applications and services
- Console applications
- Windows GUI apps (Windows Forms)
- Windows Presentation Foundation (WPF) apps
- ASP.NET based applications
- Windows services
- Service-oriented apps using Windows Communication Foundation (WCF)
- Workflow-enabled apps using Windows Workflow Foundation (WF)
.NET Framework IDE
Visual Studio IDE (integrated development environment) can be used for the development of applications using the .NET Framework. There are different editions of Visual Studio provided by Microsoft and based on your need the best fit edition of Visual Studio can be selected for your development purpose.
The latest visual studio version available is Visual Studio 2022 version 17.0. The different editions available are Community, professional & enterprise. The Visual Studio Community is free to use but not for all there are terms and conditions available here which you can read and decide whether you can use it for free or not.
There is also a free code editor Visual Studio Code that is a lightweight but powerful editor that can run on Windows, macOS and Linux. There are extensions available for this code editor for C# language and .NET runtime.
.NET Framework Deployment Models
Deployment of .NET Framework-based applications involves packaging and distribution of the application. The packaging can be of a single assembly or multiple assemblies, multiple assemblies can also be compressed into a .cab (cabinet) files or as an installable .msi file using windows installer or third party installer.
You can distribute your application to a web server or other centralized location so that users can download and install the application. For distribution, you can choose from several deployment models like install from the web that is an online web installer or you can choose an offline installer using install from disc. For enterprise applications, you can even choose to install it from a local area network.
Summary
.NET as a platform with .NET Framework as an implementation provides many features and options which developers can choose from based on their needs and comfort. Microsoft has launched a new implementation of .NET Framework i.e .NET Core that supports many new features and now .NET Core is known as just .NET. If your application is on .NET Framework then there is no rush to migrate it to .NET Core but for newer applications, .NET Core is always preferred.
.NET Framework was designed to be a cross-platform Framework but it has been mainly a windows-only Framework as for web applications there is bounding to IIS that works on Windows.
In our next article, we will learn about the new age implementation of .NET Framework i.e. .NET Core (now known as .NET)
Please provide your suggestions & questions in the comments section below
References – What is .NET Framework?
You can also check my other trending articles on Build Resilient Microservices (Web API) using Polly in ASP.NET Core & Microservices with ASP.NET Core 3.1 – Ultimate Detailed Guide