What is ASP.NET Core?

The last few years in the .NET ecosystem have been confusing, with the launch of .NET Core and ASP.NET Core. I’m clearing up the confusion by keeping it simple and just hitting the key points, rather than going into exhaustive depth on every little detail.

I started off by explaining what .NET Core is, and how it differs from the already-existing .NET Framework. Here, I’m going to do the same with ASP.NET Core specifically.

Intro to ASP.NET Core

ASP.NET Core is a brand new framework for building modern web applications. It is similar to, but distinct from, the already-existing ASP.NET framework that has been around for many years.

ASP.NET Core includes support for the MVC model, web APIs, as well as a new programming model called Razor Pages (which are distinct from Razor views, as used by the MVC model).

The end goal of ASP.NET Core is likely to make the original ASP.NET platform obsolete, but as of 2018 the original framework is maintained and there are no plans to stop doing so any time in the near future. The new ASP.NET Core framework offers many upgrades and improvements, however.

Choose Your Base Framework

One of the key new features of ASP.NET Core is that it can run on either .NET Core or the traditional .NET Framework. This means you can develop and run ASP.NET Core web applications on Linux, Mac, or Windows, giving you a lot more flexibility in choosing server technology and development systems. With ASP.NET Core, you also get to choose your web server, as it’s no longer tied to IIS.

Open Source

Along with .NET Core, ASP.NET Core is also open source! You can find the repository on Github here.

Not only is the source available, but Microsoft is also accepting community feedback and contributions. This means that Microsoft is responding to community feedback a lot more than they used to, resulting in a better framework for everyone.

Performance

Microsoft and the community have made some incredible performance improvements with ASP.NET Core. ASP.NET 4.6 can handle approximately 50,000 requests per second, while ASP.NET Core 1.0 is up to 1.15 Million requests per second (as seen here). Check out this graph (from Age of Ascent) highlighting the improvements:
age-of-ascent-1

Or read about how Raygun reduced their server count by 60% by switching from nodejs to ASP.NET Core.

Dependency Injection

ASP.NET Core is designed to support and use dependency injection right from the start. A set of minimal features is included by default that support constructor injection right out of the box. This means that for many cases, there will be no need for a third-party dependency injection framework (though of course the third-party frameworks do offer more features for advanced use cases).

Razor Pages

The old ASP.NET MVC style of building a web UI still exists mostly intact in ASP.NET Core, but it also has a new preferred way of building a web UI called Razor Pages. Razor Pages is is actually a little bit like a much improved version of the old ASP.NET Web Forms, which does sound a little horrifying, but actually seems to have some promise this time around.

To give you a (really) brief summary, a Razor Page is similar to an MVC View. The key difference is that the old MVC controller and model are replaced by a “PageModel” class which corresponds to that page only. The PageModel defines handlers for requests made to the page, as well as data properties to store data that gets sent to the page.

Razor Pages is a big topic all on its own, so check out a full intro here

The Bottom Line

ASP.NET Core is an existing new(ish) web framework from Microsoft, and looks to be a great choice for web developers looking to build reliable and fast web applications.

More Reading

If you’re looking for details on ASP.NET Core, look no further than the following:

You may also like

Leave a comment


Parse error: syntax error, unexpected ';' in /home/elevenwinds/sites/elevenwinds.com/wp-content/themes/thestory/footer.php on line 9