Overview (Exploring .NET E1)
Published on 2022-03-19 by Ruben Heeren
I was recently watching the .NET conference 2021 keynote video. And I noticed one of the speakers, Scott Hunter saying that .NET is now a unified platform. I found that interesting. And to me and some people in the community, not everything about .NET is exactly clear.
I found myself asking questions like...
"What is the difference between .NET Framework, .NET Core, Mono and just .NET?"
"What is the difference between C#, F# and Visual Basic?".
Also, I wondered about how stuff like Internet of Things works in .NET. And what its practical applications are.
I thought that maybe other people would have similar questions. So in this series, I want to go over everything that is in the .NET development platform.
I want to keep it very high level, so that you get a nice overview of everything .NET has to offer you as a developer. I'll probably do something like a crash course on each of the development platforms. So one episode dedicated to Azure, one to web development, one to desktop development, etc.
This is the pilot, or the first entry of the series. And I want to dedicate it to getting a helicopter view of .NET as a whole.
Video Version of This Blog Post
Some of you prefer video content over written content and if so you're in luck. Check out the video below for a video version of this blog post. <br /> <br />
What Is .NET?
So let's start by asking this question. What is .NET?
Well, .NET is an open source developer platform created by Microsoft for building many different types of applications.
With .NET, you can use multiple languages, editors and libraries to build for web, mobile, desktop, games and Internet of Things.
In the IT industry .NET is considered a very old, perhaps even ancient framework. Microsoft started development on the .NET Framework, which is what is now called just .NET in the late 1990s. They did that originally under the name of Next Generation Windows Services. By late 2001, the first beta versions of .NET 1.0 were released. The first version of .NET Framework was released in February 2002, bringing managed code to Windows operating systems.
.NET Framework 4.8 was the final version of .NET Framework. It received its last update in 2019. In 2016, .NET Core 1.0 came out. And you can consider .NET Core to be the next iteration of the Windows-focused .NET Framework. .NET Core is free, open source and cross-platform. Officially it isn't owned by Microsoft, but to be honest with you, and to make a long story short, they kind of own it via the .NET Foundation. I don't find that a bad thing because Microsoft as a company has a lot of resources. And that gives me as a .NET developer more security that .NET will keep existing.
I'm curious to hear your opinion on that in the comments below.
So .NET Core goes up one major version number every year. And the major major version of software is the first number before the dot. So 1.0 2.0 3.0 etc.
That version went up all the way to .NET Core 3.1 Long Term Support in 2019. Then, the next logical major version would have been .NET Core 4 in 2020. But to avoid naming confusion with the .NET Framework, version 4, Microsoft decided to rename .NET Core to just .NET. And continue with version 5.
So in November 2020 .NET 5.0 was released. Which officially replaced .NET Framework, and this newly rebranded .NET will go up one major version every year in November. And this blog post was released during .NET version 6. Which in my opinion, is awesome.
Alright, so now that we know what .NET is, the next logical question is...
What can we do with it?
Well, you can do a lot in .NET. The infographic below from Scott's .NET Conf 2021 keynote presentation summarizes it.
You can re-use your .NET skills for all these development specializations.
So a popular thing to do in .NET is hosting your web applications and even your entire IT infrastructure in the cloud with Microsoft Azure. You can also build serverless microservice applications in Azure.
Another thing is building web applications with ASP.NET.
Also, you can build desktop applications with .NET MAUI, Windows Presentation Foundation and WinForms.
It's also possible to build mobile apps with .NET MAUI and Xamarin.
.NET even supports building video games and virtual reality apps with Unity.
Also Internet of Things apps with ARM targeting and the Azure Internet of Things hub.
And by the way, with ARM targeting I mean compiling applications targeting the ARM processor variant. Which is commonly found in stuff like sensors, fridges and smartphones.
And last but not least...
You can build artificial intelligence apps with machine learning .NET (ML.NET) and .NET for Apache Spark.
And Apache Spark is a unified engine for large scale data analytics.
Alright then, moving on to the languages.
In .NET 6, you can write your .NET apps in three languages.
You have C#, F# and Visual Basic. Of those C# is the most popular one. And as far as I'm aware, the best supported by the IDEs.
Although this probably isn't done often, you can mix and match these three languages in your .NET apps. Because they all get compiled to something called Microsoft Intermediate Language (Abbreviated to MIL, or just IL), which is a CPU independent set of instructions that can be efficiently converted to the native code. And native code is basically code that can directly give instructions to the CPU.
During the runtime, the Common Language Runtime (Abbreviated to CLR) converts the Microsoft intermediate Language code into native code. To the operating system using something called a just-in-time compiler or JIT-compiler.
Okay, so let's go over each of the languages in more detail.
C# was designed by Anders Hejlsberg from Microsoft in 2000. And at the time, many considered it to be Microsoft's Java. In my opinion, it has surpassed Java in terms of developer productivity. And language features. C# is an evolving language because along with .NET, it goes up a major version every year. I believe the language design design team looks around in the IT industry.. For good ideas, and adds them to C#.
So a few years after its release In 2002, C# was approved as an international standard by the European Computer Manufacturers Association. Which we usually abbreviate to ECMA. One year later in 2003. It was also approved by the International Organization for Standardization (abbreviated to ISO). Microsoft introduced C# along with the .NET Framework and Visual Studio IDE, which were both closed source at the time. Microsoft back then had no open source products.
Four years later, in 2004, a free and open source project called Mono began. And that provided a cross platform compiler and runtime environment for the C# programming language. A decade later, Microsoft released the now very popular Visual Studio Code code editor and Rosslyn, which is a compiler, and the unified .NET platform, which is the main focus of this series. All of these support C# and are free, open source and cross platform.
Mono also joined Microsoft but was not merged into .NET. I believe the game development part of .NET, Unity, still uses Mono to run games with.
So I talked a lot about things surrounding C#, but that is for good reason.
Because every C# developer is a .NET developer. And needs to have good knowledge of .NET.
Last but not least, because C# is kind of the main language in .NET, you can use it to build all the stuff mentioned in What is .NET?.
Ranging from microservices based cloud apps in Azure, to video games in Unity, to even smart fridges.
Alright, so that's an overview of C#, let's move on to F#.
So F# is a functional-first, general-purpose, strongly-typed, multi-paradigm programming language that encompasses functional, imperative and object-oriented programming methods. It has a lightweight syntax, that requires very little code to build software. Big influencers of it are C#, Python, Haskell, Scala and Erlang. Like C#, F# is an evolving language and also goes up one major version every year. F# has a large number of other capabilities that are normally found only in functional programming languages. Together, these features allow F# programs to be written in a completely functional style and also allow functional and object-oriented styles to be mixed.
I personally don't use F# because most of what you can do in F# can be done in C# and I believe C# also supports functional programming if you require that. If you want to go deeper on F#, check out some of the sources I used for this post.
Okay, moving on to Visual Basic. Visual Basic, originally called Visual Basic .NET or more commonly, VB.NET, is a multi-paradigm object-oriented programming language. It is implemented on .NET, Mono and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language. Visual Basic isn't dead yet, but as of March 11 2020, Microsoft announced that evolution of the VB.NET language has concluded.
Visual Basic is often used in conjunction with the Windows Forms GUI library to make desktop apps for Windows. Programming for Windows Forms with Visual Basic involves dragging and dropping controls on a form using a GUI designer and writing corresponding code for each control. C# and VB.NET are syntactically very different languages with very different histories.
Visual Basic is based on BASIC, and that goes back to Dartmouth College. In its beginning BASIC was used in the college community as a basic language for first exposure to computer programming and the acronym represented the language accurately. In the early 1980s. The language was picked up by Microsoft and expanded significantly beyond its original intent into their Visual Basic language/platform. That product was sold throughout the 1990s as a rapid application development tool for Windows programming.
Even though Visual Basic was a successful development platform, it was discontinued after its 6th version. VB6 when Microsoft introduced the .NET Framework and its related Visual Studio development platform in the early 2000s. At that time, the current C++ and VB6 languages were used by Microsoft as the basis for two new programming languages in their new Integrated Development Environment (IDE) called Visual Studio. These languages were named C# and VB.NET.
So that covers Visual Basic. Now I could add one more chapter about IDEs but I think this blog post is long enough now. That will be covered sometime in the future.
If you have any questions or subjects you want me to cover you can contact me via my website, so www.rubenheeren.com/contact, or by sending an email to [email protected] or just via the comments below.
In the next episode of this series we'll focus on the Microsoft Azure Cloud.
Thanks for reading. I'd love to hear your opinion on this post in the comments below.
I hope you'll join our developer Discord community. In there you can chat with other devs and people learning software development. There's also a support channel to get help if you're stuck on something.
Wikipedia - .NET Framework version history: https://en.wikipedia.org/wiki/.NET_Framework_version_history
Wikipedia - Software versioning: https://en.wikipedia.org/wiki/Software_versioning
Wikipedia - .NET: https://en.wikipedia.org/wiki/.NET
Microsoft - What is .NET?: https://dotnet.microsoft.com/en-us/learn/dotnet/what-is-dotnet
vb.net-informations - What is Microsoft Intermediate Language: http://vb.net-informations.com/framework/microsoft_intermediate_language.htm
Microsoft Docs - C# Version History: https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history
Wikipedia - C Sharp: https://en.wikipedia.org/wiki/C_Sharp_programming_language
Wikipedia - CLR: https://en.wikipedia.org/wiki/Common_Language_Runtime
Microsoft Docs - What is F#: https://docs.microsoft.com/en-us/dotnet/fsharp/what-is-fsharp
Wikipedia - F Sharp: https://en.wikipedia.org/wiki/F_Sharp_programming_language
Wikipedia - Visual Basic .NET: https://en.wikipedia.org/wiki/Visual_Basic_.NET
Wikipedia - C# vs Visual Basic: https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET
Good luck on your developer journey!