Why dotnet core?

 

office-3193372_960_720

I just noticed that I have started all my posts by referring to the season and then I notice how long it is since I last wrote a blog post. Well, now I at least have a new goal for the new year, and that is to write more frequently, especially since I am continually learning new things these days.

Not am I only learning about new things but also revisiting familiar tools and techniques. Since graduation, I started working as a junior software developer where I am mostly programming in C#. The first programming language that I learned was C++, but in my second semester in computer science, I got familiar with C# and the ASP.NET MVC framework. Since C# is related to C++ and has a similar syntax as Java, I did not learn C# like I was learning my first programming language. I learned the most basic syntax that was useful for the ASP.NET MVC framework since the focus was more on the framework rather than learning a new programming language.

To recall, the ASP.NET framework is a part of the .NET framework from Microsoft and is only used to develop web applications while the .NET framework supports the implementation for many types of applications such as websites, services, and desktop apps. Like I mentioned before I used ASP.NET framework in my first steps in web development where the focus was on the MVC framework.


For the past months, I have revisited C# in a relatively new framework called .NET Core which is a cross-platform .NET implementation while the .NET framework only supports Windows. I have been developing mostly on MacOS and Linux, and I often had troubles with the .NET framework due to my operating system, although it was mainly the problem of running Visual Studio on a very old MacBook Pro a few years ago. Thus I enjoy being able to develop in macOS since it is currently my preferred operating system.

Windows users I work with mainly use Visual Studio, and there is even a Visual Studio version for mac, but for now, I prefer to use Visual Studio Code, which is a simple, lightweight editor with a bunch of extensions to add to it. When developing in .NET Core, one important extension is this C# extension for Visual Studio Code since Visual Studio Code supports debugging of C# applications running .NET Core.

Since I am a junior developer, the .NET Core documentation is an excellent friend of mine. I also learn a lot from developers on my team, by asking questions and doing code reviews. One of the first questions I asked was why to use .NET Core in the first place? Like discussed here at Microsoft’s .NET Core documentation, ASP.NET core is a redesign of ASP.NET 4.x. Architectural changes have been made which makes .NET Core leaner and more modular framework. Some of .NET Core main benefits are for example that it is architected for testability, it is a cross-platform framework (like I mentioned above), it is open-source, it has environment-based configuration system, and has built-in dependency injection. Also, it is lightweight, high-performance and supports modular HTTP request pipeline, the ability to host on IIS, Nginx, Apache, Docker or to self-host in my process, and it offers tooling that simplifies modern web development to name few benefits.

I have noticed due to my lack of experience in software development that I take these benefits for granted. Developers that I work with that have experience in both .NET, .NET Core, and other frameworks can tell the difference. Thus, I will continue learning its benefits as well as its drawbacks and probably notice the difference when starting to work with other frameworks.

FYI, I also recommend this tutorial if you want to try out creating a simple Web API with APS.NET Core using Visual Studio Code.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s