
What you need to know about ASP.net core
And why should you learn it
I’m playing around with ASP.net core for quite some time now while watching some course related to it. I pretty much enjoyed the journey. However, this is not to say I haven’t hit some roadblocks. But so far I’m quite impressed to see how decoupled the architecture of ASP.net core is than its traditional counterpart which is ASP.net.
.net core’s architecture was designed to be more decouple and target multiple platforms than .net framework which only surrounds around Microsoft ecosystem.
Okay so what do I need to know about ASP.NET Core exactly?
ASP.net core uses .net core as its framework
First and foremost, ASP.net Core is built around .net core which means you now have the ability to develop and deploy ASP.net apps in other Operating Systems such as in Mac and in Linux which gives us larger options in terms of looking for our own server.
Since .net core is independent from Microsoft ecosystem, this gives you the ability to have a total control of the environment on where you will develop or deploy the application. Though, sadly, this hardly matters nowadays due to the advent of cloud technologies like aws, MS Azure, etc. which gives you the option to run different Operating Systems in their servers.

The image clearly explains the current architecture of .net core. You can see that it’s independent and designed to be multiplatform/universal.
.net core is lighter compared to .net framework
This should pose no surprise to any developer who’s been playing with .net core for quite some time now. .net core has lighter footprint due to the fact that it’s now decoupled from .net framework and is an independent framework altogether. Which means, this doesn’t have lots of code dependencies(such as dlls) that came from .net framework and it’s codebase is still small.
In an ideal scenario, .net core wins than .net framework when it comes to performance.
These guys tried to benchmark the performance of ASP.net core in contrast with ASP.net 4.6.
The findings were astonishing and fascinating. It caters 1.15 million Requests Per Second which is a miles away from ASP.net 4.6 which only caters around below 200k requests!
It’s just a matter of what do you prefer for your team development needs.
ASP.net core uses MVC as its default web architecture
The Microsoft-dependent version of ASP.net uses two web architecture as its default template: Webforms and MVC.
In ASP.net core, this was no longer the case as Microsoft intended to get rid of Webforms either way. But there are some rumors that they’re trying to add support webforms for developers who still wants to use webforms as their web architecture.
Though personally, I’d try to stay away from Webforms if I were you. For your sanity’s sake.
Also, it’s worth pointing out that Web API and MVC were already combined as one instead of a separate structure altogether. So, it’s better, cleaner, and less confusing. When I was starting out my ASP.net MVC journey, I was confused between the two and why Microsoft decided to create another template for MVC (Web API) which is just essentially structured as..well..MVC!
ASP.net core projects support npm(Node Package Manager)
If you’re familiar and a big fan of nodejs, then make no mistake: You can use npm alongside nuget package manager! Now you can use either package managers which suits your needs. Although you could also use npm to ASP.net MVC 5, but you will need to configure the project so that it aligns with npm’s structure and make their packages work. It’s worthy to note that npm is independent and used alongside javascript frameworks like Angular 4.
This is perhaps one of the big advantage ASP.net core has over traditional ASP.net. With npm, using javascript libraries, frameworks has never been this easier.
But sadly, if you understand the pain of setting everything up together to make npm packages work seamlessly on front-end side (I swear I’ve played around with nodejs before and had to deal with these things!), then I don’t have to explain everything.
ASP.net core implements their own Dependency Injection containers
**sigh**
What a relief! It was like waking up from a bad dream.
I swear I was one of the few people that hates setting up IoC/DI containers like StructureMap, Ninject and Unity Container to inject dependencies in different controllers. If you’re a beginner in IoC/DI containers and just starting out using those containers I just mentioned, then I know for certain that it’s quite frustrating to set them up especially when you’re the type of developer that just wants to start coding your MVP for the people to see!
And this is a good news! No too much overhead. And not too much setup is needed for you to start reaping the benefits and use Dependency Injection in the repositories you need to use and reuse in every controllers that exist.
There are 3 ways you can inject a dependency:
- Scoped
- Transient
- Singleton
These methods depict and determines the lifetime of the dependency that you were trying to inject in each controllers where you used it. For more info, I’d suggest visiting this link:
The Bad
If there’s a good side then surely there’s also a bad side in learning and using ASP.net core in your projects. They say if there’s a Pros then there’s also some Cons.
I’ll enumerate them:
It’s brittle
Even after .net core 1 was released, developers were still reporting numerous bugs in github repository of ASP.net core. And a couple of times I run into few issues such as missing dependencies, current .net core version irrelevant in latest packages, etc. Though I understand the reason behind it. And I have to admit: .net core updates moved so fast.
There are instances where I left the project for a week, but after I hit dotnet restore, everything gets broken.
Entity Framework Core hasn’t grown mature enough as well. When I tried to associate a table into one-to-many relationship, where the table should have two or more data, EF Core migration doesn’t pluralize the table by default. So it’s not quite intelligent as of the moment.
Good news is, since it’s open-sourced, we will know the development status and stages of ASP.net core. You could also contribute to this awesome piece of repository.
Lots of developers around the world can now contribute in shaping ASP.net core unlike before.
Library support is still lacking and backwards compatibility might not be supported anymore
We all use nuget package manager to install the libraries we wanna use for our MVC apps. When I wanted to integrate a Unit Test within the app, I usually install NUnit package alongside NSubstitute for my mock objects.
When I wanted to implement Dependency Injection, I usually install Structuremap within my app.
If you’re dependent on those then you’re out of luck. .net core’s backward compatibility is still unstable and as of .net core 2.0, I heard rumors and seen some articles that you’re not allowed to use .net framework libraries anymore. Some project gets broken after upgrading to .net core 2.0. So you might wanna consider not using ASP.net core to your bigger projects at hand.
My Personal Verdict
Microsoft did indeed made everything right with ASP.net core. But they were a little bit too late in open-source market in my opinion. But who knows? We’ll see in later years. Personally I’d rather use ASP.net core than nodejs.
I feel like I’d rather stay away in using ASP.net core for now if the project was too big. It’s great to learn it. You might even learn different quirks just by simply learning ASP.net core. But if the project requires a more mature framework, then I’d suggest you’d rather use ASP.net MVC 5 for that.
But don’t get me wrong. ASP.net core is an interesting web framework to learn right now as we’re moving towards package-centric, more rapid way of developing applications to deliver MVPs as early as possible into the market. Even I learned a lot of stuffs when learning it along the way such as using webpack, grunt, npm altogether to install a javascript library. It made my front-end scripting easier than before where I have to download the js script and save it into my local directory, OR find a cdn link of that particular js library.