After using ASP.Net Core for a while, I quite impressed with how decoupled ASP.Net Core architecture is when compared to its older counterpart ASP.Net.
That’s not surprising, though, when you consider the principal rationale for .Net Core’s design was compatibility with multiple platforms unlike the traditional .Net framework which only works within Microsoft environments.
In the context of Microsoft’s product history, ASP.Net Core is pretty revolutionary, which could be why it’s attracted keen interest from the developer community.
The following are some of the most important things you need to know when working with ASP.Net Core.
1. ASP.Net Core is Platform-Independent
With such a diverse range of server operating environments in the world today, flexibility as an application requirement will only continue to grow in importance. Organizations want enterprise systems and development environments that will work seamlessly irrespective of the underlying operating system.
Since it’s built around .Net Core, ASP.Net Core allows you to develop and deploy applications on not just Microsoft Windows systems, but also Linux and Mac OS. This significantly increases your programming options.
2. .Net Core is Lighter than Traditional .Net
If you’ve used .Net before, speed and versatility is something you’ll quickly notice when you start to work with .Net Core. This is one of the top benefits of the decoupling from the dependency-heavy traditional .Net framework.
The reduction of DLLs and similarly linked codes ensure a lighter footprint and better performance overall. In one study, ASP.Net Core processed 1.15 million requests per second, a much higher figure compared to ASP.Net which handled less than 200,000 requests in a similar environment.
3. There’s Only One Default Web Architecture
The old ASP.Net uses either one of two web architectures: MVC and Webforms. It’s long been known that Microsoft is no longer enthusiastic about Webforms and was hoping to eventually get rid of it.
Whereas Microsoft intends to provide support for Webforms for those developers who are still keen on using it, ASP.Net Core is perhaps the first warning shot of Microsoft’s future intent. That’s because of the absence of Webforms and the complete focus on MVC.
In addition, MVC and Web PAI are no longer separate, but have been combined. All that makes ASP.Net Core cleaner, leaner and less confusing. The resulting websites load faster and are thus viewed favorably by search engine bots.
4. ASP.Net Core Supports NPM
If you’ve previously worked with and loved node.js, you’ll be glad to know that you can use Node Package Manager (npm) as well as NuGet Package Manager on ASP.Net Core. Choose either package manager depending on which you are most comfortable with and what you hope to achieve.
Whereas you could still use npm in ASP.Net MVC 5, you had to go through the sometimes strenuous process of configuring the project so it is aligned with npm’s structure.
5. Dependency Injection Containers
Seasoned .Net developers must have heaved a sigh of relief on learning that ASP.Net Core implements its own Dependency Injection containers. This has negated the need to separately (and tediously) set up IoC/DI containers such as Unity Container, Ninject and StructureMap to inject dependencies in multiple controllers.
It took beginner developers quite some time to develop the skills necessary to set up IoC/DI containers. That will no longer be necessary.
6. Broad Application Monitoring Options
Developers haven’t always been the target of application monitoring solutions and ASP.Net Core is no exception. Yet, end user expectations and cut-throat competition have pushed application monitoring to the fore of development considerations.
ASP.Net Core web applications are designed to be more easily and efficiently monitored. For more information on monitoring ASP.Net Core applications, visit this guide.
7. Bugs Still an Issue
Almost as soon as .Net Core 1 hit the market, developers started to report a plethora of bugs in the ASP.Net Core GitHub repository.
Some of these included missing dependencies and .Net Core versions that were inconsistent with the latest packages. Entity Framework Core has also not been free of problems and initially seemed to lack intuitiveness.
Microsoft is the world’s largest software company and many coders were a little disappointed. That being said, bugs are part and parcel of the development environment. To their credit, Microsoft has moved quite fast to release remedial updates for .Net Core. In addition, the platform is open source, so everyone can contribute to its improvement.
8. Limits on Backward Compatibility
NuGet package manager allows you to install the libraries you require for your MVC applications. For example, if you want to integrate Unit Test within the application, you can install the NUnit package together with NSubstitute. When you want to implement IoC/DI, you can install Structuremap in the application.
Unfortunately, these options may no longer be available when building applications in .Net Core. Backward compatibility is limited and unstable. On as recent a release as .Net Core 2.0, it was difficult to use .Net framework libraries. Some projects unraveled on upgrading to .Net Core 2.0.
The .Net Core framework is Microsoft’s belated foray into the open-source universe. Anyone determined to build a long career in web development would want to learn ASP.Net Core especially given the marketplace’s drive for more package-centric and rapidly deployed applications.