An Introduction to .Net Core
It was around October of 2016. As usual, I was doing some bug fixes on a maintenance project at work. A colleague in the nearby cubicle told “hey, there is a webinar of .Net core at 4pm, at the conference hall, are you coming?”. I said “No man, you go, I am not interested” (which I regret now). That was the first time when I heard the buzz word “.Net Core”. In the later years also I heard about it from here and there, but still I did n’t care to look into the topic due to my innate lazy behavior and procrastination.
Years passed, and it was then April of 2020,when the world was hit by the COVID-19 pandemic, and most of the people started working from home. As working from home, I got plenty of free time, which in the beginning I obviously wasted in watching films, social media, doing nothing etc. One day out of no interest, I watched a youtube video of .Net core while surfing through some film trailers. And I got interested. So I watched another video about .Net core, and another. Then I read couple of books about .Net core, and watched some PluralSight videos about it too. And I found this new buzz thing very cool. So here I will try to share some of the key points I got from all of the article I have read/viewed so far.
What is .Net Core ?
.Net core is a development platform for building things like web apps, web apis, microservices, cloud native apps, Internet Of Things (IoT),console apps etc. It got released in June 2016.
You may be thinking, wait a second, all these can be achieved by the old .Net Frameworks too right? why should I care to learn .Net Core? Well, you are not alone, when I was starting out, I also thought like that. In between .Net Core is not just an upgradation to the previous .Net framework, but its a re-write of the whole platform itself, to target some specific goals in mind.
Some of the key features of .Net Core which I found interesting are as follows:
- Cross Platform :-
.Net Frameworks are great, but they lack a key thing. Means they have tight coupling towards the Windows Operating System and underlying Internet Information Service (IIS) server. So it was impossible to run our dear .net applications on platforms like Linux, MacOs etc. Microsoft had identified this issue long before and their fix to this problem was .Net core. A cross platform webserver called “Kestrel” makes the .Net core application to be platform agnostic (I will cover more about Kestrel in the coming blog posts). So in short, .Net Core helps you build cross-platform apps.
2. Modular :-
When you first start a .Net core application there is no overhead of MVC or anything like that. Everything is optional. If you want to create just a static web site you can do that. Then later you can add components only when you are in need of them (means you can add mvc, web api’s, support for SPA like Angular, React etc, on demand). This modular architecture will become very handy as you develop along.
3. Open Source :-
Yes, it is open source. The whole source code for .Net core is available on GitHub . If you feel like you need to change some feature of .Net core, change the code, submit the pull request, and your fixes will come in the source code. So open source lovers, you are welcome!
4. Improved performance :-
With new enhancements of .net core, the code get more optimized that results into improved performance. Also we don’t actually have to change the code, the compiler will automatically optimize the code whenever the code is re-compiled. The performance is many times faster than any of the previous .net frameworks.
Conclusion:
If you are starting out with developments with .Net ecosystem or you are an existing .Net developer ,who wants to upgrade himself, .Net core is the ideal candidate. Microsoft will be incorporating cutting edge features in .Net core only in future. So I think its definitely worth learning!