Introduction to ASP.NET 5

ASP.NET 5 is a lean and composable framework for building web and cloud applications. It's fully open-source and available in Github. Composable meaning components that are "self-contained" (modular) that can be deployed independently and "stateless" that treats each request as an independent transaction, unrelated to any previous request. This is based on the .NET Execution Environment (DNX) that supports running cross-platform on Windows, Mac and Linux.

When configuring DNX, you need to pick the .NET flavor also (.NET Framework / .NET Core / Mono) and DNX and .NET Core is available for the greatest number of scenarios. The choice can be made based on the requirements on compatibility. Let's look at the pros and cons of each one.

.NET Framework

Pros:

  • More well-known and mature than the other two shipped with Windows.

  • Highest level of compatibility for your existing applications and libraries.

Cons:

  • Runs only on Windows

  • Not an active open-source

.NET Core

Pros:

  • Modular runtime and library implementation that includes a subset of the .NET Framework.

  • Open-source.

  • Feature complete on Windows and in progress for Linux and OS X.

  • Allows targeting a single consistent platform that can run on multiple platforms.

  • Applications can run on much more constrained environments (for example Windows server Nano).

  • It's built as a componentized set of libraries so the API surface area can be limited to just the pieces you need.

Cons:

  • Support for MAC and Linux is still very new and not ready for production workloads.

Mono

Pros:

  • Open-source and cross-platform

  • Built primarily for non-Windows platforms

Cons:

  • Not a supported platform by Microsoft

ASP.NET 5 provides the following many improvements over its predecessors:

  • Improved performance.

  • Better support for modern web development standards and tools.

  • Improved integration between WebAPI, MVC and WebForms.

  • Can easily develop applications using a variety of tools and editors.

  • Open-source and community focused.

  • Builds and runs cross-platform ASP.NET apps on Windows, Mac and Linux.

One important thing to note is Single Page Applications. A modern web application uses a combination of server-side and client-side behavior. ASP.NET has evolved over time to support more client-side behavior and with version 5 it includes support for Single Page Applications (SPAs) that virtually shift all the logic of the application to the client side and uses the server only for fetching and storing data. Your application approach to where its behavior resides will depend on a variety of factors.

Up Next
    Ebook Download
    View all
    Learn
    View all