ASP.NET 5 is now ASP.NET Core 1.0

aspnetcore

Yesterday it was announced on the ASP.NET Community Standup by Damian Edwards and on Scott Hanselman’s blog that Microsoft has decided to rename ASP.NET 5 (also formerly known as ASP.NET vNext) to ASP.NET Core 1.0.

Reset Major Version Number

As many in the community, I view this rename prior to the RTM as a good thing.  ASP.NET 5 was a very confusing name as it is a completely new version of ASP.NET.  I welcome the reset to 1.0 as it gives a better description that this is indeed a rewrite and ground up work.

Also, frameworks such as Entity Framework had also had an identity crisis as they also were just incrementing the major version number, even though they are completely new as well.  Because of this, Entity Framwork 7 is now being renamed to Entity Framework Core 1.0

Core

I’m still unsure about how I feel about adding the word “Core” to the framework name.  My main concerns are:

Google Juice

How does this affect searching and Google results?  Searching and when creating content that will be indexed must include the word “Core” and possibly the version number.

Version number may not be an issue as there won’t likely be an overlap in somewhat current/useful version numbers.  Eg, Entity Framework 5 vs Entity Framework Core 5.

Perception

This is a rewrite.  As Steve Smith blogged with the history and meaning behind ASP and ASP.NET, it may not seem valid anymore to call it Active Server Pages.

I do think the perception of Microsoft and it’s association to .NET is changing (for the better?) to developers not currently using .NET.  However, I do believe there is a stigma associated ASP.NET in these other communities.

I’m all about welcoming more developers, junior and seasoned, to the .NET ecosystem.  I would think ditching the ASP.NET name altogether might of helped in that direction more.

I am also aware of how much effort has been put into the ASP.NET brand, and you aren’t going to just throw that away, even if it may not have the best perception.

Overall

I’m happy with this decision.  Would I of preferred “Some Short Googleable Name” 1.0? I think so.  But ASP.NET Core 1.0 is much better than ASP.NET 5.

I do think there will still be some lingering confusion since the name ASP.NET 5 has been living for a bit, but with due time it will be water under the bridge.

 

ASP.NET Core Series: NancyFX

ASP.NET 5 NancyFXLast week I decided to start migrating one of my existing ASP.NET application that uses NancyFX over to ASP.NET Core.  The process is actually pretty straight forward if you are familiar with OWIN.

OWIN

OWIN defines a standard interface between .NET web servers and web applications. The goal of the OWIN interface is to decouple server and application, encourage the development of simple modules for .NET web development, and, by being an open standard, stimulate the open source ecosystem of .NET web development tools.

To clarify and reword slightly, OWIN is a open source specification that is not defined by Microsoft and is not an actual implementation.

ASP.NET Core supports OWIN and defines middleware to be used in a  request pipeline with the Microsoft.AspNet.Owin package.

ASP.NET Core NancyFX Demo

All of the source code for this demo is available on GitHub.

The first thing we are going to do for this demo is add the appropriate nuget packages.

Note: At the time of this post, ASP.NET Core is curently at RC1, which is still a pre-release and therfore you will need to include the “-Pre” option when installing any pre-release packages.

PM> Install-Package Microsoft.AspNet.Owin -Pre

PM> Install-Package Nancy

PM> Install-Package Nancy.Owin

Now in our Configuration method of our Startup class, there is a new extension method of UseOwin provided by the Microsoft.Asp.Net.Owin package, which allows us to include additional OWIN compatible middleware to our ASP.NET Core pipeline.

The Nancy.Owin package also provides an extension method UseNancy that we can use inside our UseOwn method.

For the demo, I’ve created a simple Nancy Module.  Since Nancy will find it automatically (which is really nice) there is no registration needed.

Nancy does not support targeting .NET Core however does support Mono.  You will have to remove the “dnxcore50” from frameworks section of the project.json

At this point, you are ready to run the demo.  Your application should be hosted on port 5000.  Calling http://localhost:5000/nancy/demo using Postman produces the expected output.

NancyFX

Owin Performance

The ASP.NET Core documentation notes that you should not use multiple calls to UseOwin.  Rather, insert all of your OWIN middleware grouped together within one UseOwin call.

Source Codegithub-octocat

The source code for this demo is available on Github.

ASP.NET Core Series

ASP.NET Core Series: The Basics

ASP.NET 5I’ve been wanting to create a ASP.NET Core Overview and series of blog posts on ASP.NET Core, but due to the number of betas and changes that came with those, I decided to hold off.

Although ASP.NET at the time of this post is still at RC1 (update 1) and not RTM yet, there likely may be some naming changes.  Still, I think we are at a stable enough point where you can take this series and get a good feeling about where ASP.NET currently stands and how you get started writing your own apps.

Series

This series will focus on development of ASP.NET Core applications using:

ASP.NET Core

ASP.NET Core is a new open-source and cross-platform framework for developing web applications in .NET.  It is a totally new version of ASP.NET built from the ground up.

Getting things straight

Before we jump to installation and getting a new project setup, I think it’s important to define some the pieces to the puzzle, as I was pretty confused early on.  Even if you are familiar with ASP.NET 4 and are using MVC or WebAPI now, a lot has changed.

.NET Execution Environment (DNX)

The DNX is a SDK and Runtime environment that enables you to build and run .NET applications cross platform (Windows, Linux, and Mac).  It does so by providing a standard execution environment across different flavors of .NET.  Flavors?  Yes. Flavors.

If you are primarily currently running and developing in Windows, then you are using the full “.NET Framework”.  However, you can also target Mono or .NET Core

Mono

Mono is an open source port of the .NET Framework sponsored by Xamarin.  Beyond the runtime environment supported by the DNX, it also includes a C# complier and Base Class Libraries compatible with the full .NET Framework.

.NET Core

Similar to Mono, this is a new open source runtime (CoreCLR) and libraries (CoreFX) that is cross platform.    The main benefit to .NET Core because of its modularity, is the ability to deploy and run a .NET Core application on a target host without the need to have the .NET Framework installed.  This also allows you to run different applications targeting different runtimes on the same host side by side.

Why?

I do believe there has been a bigger push by Microsoft and the community (hence this post) to reach out to developers that live in other ecosystems to advocate the use of .NET and ASP.NET Core.

With Visual Studio Code and Omnisharp, there is now a legitimate effort being put forward to create cross platform tooling outside of Windows where you can developg .NET and ASP.NET Core applications.

There is also a lot of effort being put into giving developers a incredibly easy path to being developing using ASP.NET Core applications.

Previously, if you were going to write an application in .NET, you had almost no options.  Your tooling was forced to Windows and Visual Studio.  This is no longer becoming the case.  It seems the new motto is build anywhere, run anywhere.

Next Up

Next post will be taking a look at DNX a bit more in detail, how to install, and how to create a new DNX Project.