How .NET works and why we need it

laptop

.NET is a framework from Microsoft that allows you to use the same namespaces, libraries, and APIs for different languages. The most common are four languages in the .NET family:

C#;
Visual Basic;
Visual C++;
F#.

When you create a program in one of these languages, you connect the System namespace at the beginning. If it were not for .NET, you would have to create a separate System for each of these languages. That is, it would violate one of the main principles of programming – DRY (Don’t repeat yourself).

What .NET is for
It may seem to ordinary users that this is just some programming stuff that doesn’t affect their lives in any way. In fact, it makes sense for them, too.

If it weren’t for .NET, users would have to set up a runtime environment for programs in every language. That is, in order to run a Visual Basic application, you have to download the runtime environment for Visual Basic. If the program is written in C#, you have to download the runtime for it as well.

This will very quickly fill your computer with slightly different copies of the same libraries.

It is also important for programmers, because it allows them to develop one environment that is used for four languages at once. Otherwise, regular developers would have to wait until a new version of the libraries for their language is released. Less popular languages like F# would get an update much later than C#.

In addition to the main languages, there are others that are supported by .NET. These include COBOL, Fortran, Haskell and even Java – you can check out the full list.

These languages are often written in older (legacy) projects that are difficult to translate to the new technology. .NET allows you to rewrite part of the program in COBOL to .NET standards, and then just write the new parts in a more modern language, like Visual Basic.

Understanding the principles of .NET allows you to learn new architectural solutions and see one of the best implementations of the DRY rule. It will help you write more elegant programs that don’t repeat code or individual modules. In addition, it can be asked about in an interview.

Edit