Getting Started with .NET Core 1.0 and ASP.NET Core 1.0

May 01, 2016

Most of you already know about it and rest are still confused and don't know what the hell is happening. This may help for the one who are still digesting the big changes and not sure what is going on!

Story started long back (more than an year ago) and now have finally (I think) reached a much mature stage (comparatively).

Big Name Change

Starting with ASP.NET vNext (or vNext in general) with "K" set of tools. Then they renamed it to be called as ASP.NET 5 and finally settled with .NET Core 1.0 / ASP.NET Core 1.0.

Scott wrote about it few months back and I recommend to take a read (really a short one - "Naming is hard.").

Parallel Universe

The .NET and Webstack continues the journey forward now in parallel.

First: This one is "Windows Only" stack which currently includes .NET 4.6 and ASP.NET MVC 5 / WebAPI 2. This is current, most mature, old, reliable way of doing .NET / ASP.NET web stuffs. We know it from long back and have been using it since the birth of .NET and ASP.NET. The development of this stack continues in the same way and is rock solid. This one is not going away anytime sooner (I assume).

Q: Who should choose to stick with this?

  • Application who chooses to be hosted and served on Windows platform only (here we are not talking about client platform or browser newbies).
  • Application that uses features and code patterns which are not yet supported by the newer version of .NET / ASP.NET Core.

Second: This one is the "new kid on the block". With the idea of bringing "One ASP.NET" to the world and do .NET / ASP.NET development - hosting in unified and platform independent way. This can be majorly called .NET Core 1.0 and ASP.NET Core 1.0.

Q: Why should I choose or adapt this?

  • 'One ASP.NET' - One web stack - MVC (Available) / Web API (Available) / SignalR (hopefully someday) all in one stack for web development.
  • Cross-platform development - This mean you can develop your .NET Core 1.0 / ASP.NET Core 1.0 application using Visual studio or Visual Studio Code editor on Windows platform and / or using Visual Studio Code on MAC / Linux platform. Former has better support due to awesome Visual studio but VS Code is growing fast, is opensource and can also be your go to editor in general.
  • Host independent - With a concept something like "bring your own .NET" which is what you need to run new ASP.NET stack, this stack makes it possible to host ASP.NET Core 1.0 application in a platform independent way. Yes possibly can be hosted on Windows / Linux / OS X platform. The .NET framework and related artifacts along with your application packages can be shipped with the packages and hosted in platform of your choice.
  • Awesome community support and Open source - This is growing in front of your eyes, frequent release cycles, interactive.
  • "Let's do it again, and this time do it right" - I won't say that previous and current version of ASP.NET or .NET was all wrong. But over the time as stack is getting more mature the team and the audience has learned and shown the need of things now and then. Many of them are not possible with current setup or would break quite things (many other reasons). This new stack is developed from scratch, taking all those mistakes, suggestions, current trends, better ideas of doing things in consideration.

There is a catch:
I am not blaming, but Core stack is new and have just started (well not that new anyways). So many things missing or not there yet or dropped. Version 1.0 starts with the basics and will grow over time. Community is still copping up, all those major "third-party" packages / services that supports .NET / ASP.NET full stack is still not there yet for .NET Core / ASP.NET Core, hopefully will be there soon. So be prepared to be burned.

Introducing .NET Core

.NET Core in general - is now combination of few things. To simplify say .NET framework is made up of CLR and Framework libraries (and other things in between). Part of CLR is designed to run on full .NET on Windows and on Mono with Linux and OS X.

The .NET Core is a slim version of .NET with bare minimum tools / utils and clubs all framework libraries (only one you specify and needed in application) using the concept of packages from NuGet (we all know about this).

Following mechanism is supported using and is accomplished by set of tools - DNVM / DNX / DNU and are common and available on all supported platform to provide unified way of development and hosting.

Introducing ASP.NET Core

ASP.NET core is an set of modular and independent packages for each feature of ASP.NET which are developed on GitHub and release to NuGet for use in your application based on your requirement. Few are basic packages to start with / required and rest to club as and when needed.

This also means you are not limited to host ASP.NET core application only on IIS. Application developed using the new stack can be hosted via your choice of Web Server using currently known practices, like with IIS on Windows and Apache / Nginx on Linux and OSX (backed by new web server shipped with this stack called Kestrel).

ASP.NET Core uses OWIN as reference point with concept of Middleware / Pipeline and uses industry best practices for web development.

You can find useful info and more on it as ASP.NET vNext page.

Note: Above information is an effort to explain the new changes to .NET / ASP.NET in more generic way and some what technically, kind of story telling or explaining it in an summarized way.
I am not an official authority of the product, a developer like you who has been following the path and understanding the part since early days, I might have made mistakes or understood / written something wrong. If you think so please connect so we can learn the right thing and may help others doing the same :)

Happy coding!