Why .NET Core should be the Microsoft framework of your choice.

On July 16 2018, by Krishnan Venkateshwaran

Given the plethora of technologies that Microsoft makes available for developers, it becomes a somewhat daunting task for you to choose the right set of technologies to develop your project in. For example, consider the following, you started with employing .NET Web forms and then migrated to MVC which was followed Web API, you also dabbled in WCF for a bit. It does look like we are somewhat spoilt for choices when it comes to picking a development stack of our choice.

But now you have a more recent player on the block .NET core, what's this all about? should we be targeting this instead of the classic .NET framework, very often we end up selecting something that might a have high learning curve and low productivity or something that might have a low learning curve but won't be that scalable and lastly there is also the dilemma of using some technology that might be rendered obsolete pretty soon. This article attempts to shed light on some of these questions.

Buzzwords: .NET Core & ASP.NET Core?

.NET Core is a high-performance open source development framework that is completely free and is cross-platform compatible, which means it can be run on MacOS or Linux in addition to Windows. It has been re-written from the ground up and is much faster, more importantly, it also unifies the previous MVC & ASP.NET into one single entity.

ASP.NET Core is a cross-platform collection of libraries that form a framework for building web applications. It can run on .NET Core as well as the regular .NET framework.

So you basically your ASP.NET Core applications can target either framework, the advantage is that for the first time you can run your .NET code natively on Linux & MacOS, so basically, this is no different from Java.

.NET Core benefits

.NET Core offers a lot of benefits over the regular .NET framework. Here are some of them explained in brief

  • Performance benefits : .NET has been written up from the ground up is more optimized and scalable and gives you better performance.
  • Platform independent : You can run your .NET core code on Linux or MacOS in addition to Windows, this is a great flexibility as it means you don’t need expensive windows machines to run your projects.
  • Running multiple versions side by side : You can run multiple .NET versions on the same machine seamlessly, the .NET core is built to make that an easier task.
  • Kestrel & Docker : .NET Core comes with its own compact but efficient cross-platform web server called  Kestrel, you could either use that to host your project or you could simply set it up to work in a  Docker container.
  • Microservices : The microservices architecture has become an important way for companies to engineer decentralized applications that are robust and responsive. .NET Core should be your natural choice for development using microservices.

.NET Core disadvantages

  • Incompatible third-party components : Many or some of the sub-systems in your project bundle might not work on .NET Core, this is going to be the case if you are using third-party components that haven’t been ported.
  • Visual Studio availability for Linux : Although it is cross-platform compatible, the best development tool Visual Studio has not been ported onto Linux environments, so if you are using Linux for development then you might lose out on using a good IDE like Visual Studio.
  • Missing features : If you are using ASP.NET web-forms or windows-forms then this will not work for you as .NET Core doesn’t support webforms nor does it have any such plans, they are however going to support windows forms in .NET Core 3.0.
  • WCF support lacking : .NET Core doesn’t support WCF, so if you need to develop to develop REST-based services then you will need to use WEB API instead.
  • Windows-specific API support : If you need to access Windows-specific API like WMI etc then .NET Core may not be the best fit for you.

Conclusion

.NET core being cross-platform opens up new doors for its adoption worldwide.

It can be self-hosted in its own container or can even use docker, this is a great advantage as far as hosting is concerned. Microsoft has already announced their plans for .NET Core 3. The salient features of .NET Core 3 include support for desktop applications for Windows, specifically windows-forms and windows presentation framework and in addition to this it also adds the ability to ship the framework as part of your application. .NET Core is a stable technology that's here to stay, it being Open Source is only driving more developer interest in it. Given the sturdiness and performance benefits, it is very likely that this might be the future of .NET in general and it makes sense in embracing it sooner than later. Do write to us in case you have any queries about migration to .NET core.

Krishnan Ventakeshwaran

Krishnan Ventakeshwaran is the technical head of Cybermax Solutions, a leading Custom software development company specialized in web development and payment gateway integration. Exceptional proficiency and ability to comprehend and rapidly deploy enterprise products that help our clients succeed.