Over the years, Microsoft has had many different frameworks with different purposes: ASP.NET MVC, Web Api, Forms, Web Forms etc. Now they have brought it all together in .NET (Core) and made it Open Source. I think it's pretty brilliant. It means, for example, that you can run all your .NET projects on a Linux server.

What is .NET

Microsoft .NET is a free, cross-platform, open-source platform that can be used to build many types of applications. Back in 2002, Microsoft released the .NET Framework and in 2014, Microsoft combined a number of different frameworks into what they called .NET Core. At the same time, it also became an open-source project that made it possible to move .NET to platforms other than Microsoft Windows, such as Linux. Since then, they have dropped the "Core" from the name (year 2020), so today the product is just called .NET and the latest version (December 2023) is .NET 8.


Under .NET you can program in 3 different programming languages: C#, F# and Visual Basic. I have been programming in C# since it first came out around 2002, and I think I have a pretty good experience with it. Previously I programmed in Borland Delphi / Turbo Pascal. It was the Dane Anders Hejlsberg who was the man behind Turbo Pascal and later Borland Delphi. When Anders Hejlsberg moved to Microsoft, he was the main architect behind the C# programming language and the .NET Framework. You could clearly sense that behind C# there was the same mindset as in Delphi. Therefore, it was very natural for me to get started with C# programming.

What I like about C# programming is that it's type-safe, so the development environment will immediately tell you if what you're typing is "wrong". I also like the fact that C# is very conducive to writing object-oriented code. This means that you will almost naturally write code that can be used in the same or other projects. I have a motto that says: If you type the same code twice, you've probably made a mistake. It may not always be true, but it's a very good thought to keep in mind.

.NET on Linux

If you want to run AspNet projects on a Linux server, the first step is to install AspNet on the server. You can choose to install the SDK (System Developers Kit) if you also want to develop the software on the Linux Server. Alternatively, you can install AspNet Core Runtime if you only want to run the programs. Download the desired version of AspNet on Microsoft's Download .NET page.

For example, on a Linux Server you can run with an Apache Webserver, but it can't run AspNet as well as AspNet. IIS under Windows can. But then AspNet for Linux has a built-in web server called Kestrel, and you can create something called a Reverse Proxy. It causes the Apache web server to forward traffic to the Kestrel web server.

Read about AspNet on Linux with Apache here:

And a bit about the Kestrel web server here:

Clean Architecture

Traditional software architecture, as I learned many years ago, is all about layering. At the top you have some user interface, then some business logic, and then some data access layer. At the bottom is the database. Each of these layers can then call things in the lower layers. This architecture has some drawbacks, you can let some things "leak" into the "wrong" layers, or you can skip a layer. And because the database is the bottom layer, it can be quite cumbersome/risky to make changes to the database (and you always will).

Not long ago I came across this article from a guy who calls himself Uncle Bob. He describes a slightly different way of looking at software architecture:

The Clean Architecture

It's from 2012, but I've grown to really like this way of looking at software architecture, and it's a great fit for coding in object-oriented C#. The project I've just completed with Online Booking was done with Clean Architecture, and it's definitely not the last time I'll go that route.

Another source of information about Clean Architecture comes from a Udemy course:
Clean Architectures for Beginners: A Practical Guide.

And a 3rd place for info on Clean Architecture is a slightly newer YouTube video from Microsoft (November 2023).


Play Video