A Developer’s take on ASP.Net vNext or ASP.Net 5 or ASP.Net Core 1.0
As a developer we constantly strive to use the updated versions of ASP.Net. This helps us use the full power of .Net framework and make our life easy. Earlier Microsoft introduced new version of ASP.Net as ASP.Net vNext or ASP.Net 5 which was then renamed as ASP.Net Core 1.0. This primarily focus on the trends in Cloud first approach. ASP.Net 5 is built primarily for the cloud. This is for the first time we are seeing ASP.Net as an open source framework.
Following are the overview of ASP.Net Core 1.0 and .Net Core 1.0
- Net Core 1.0 is Open SourceThe entire source code is already released as open-source via the .NET Foundation. You can see the source at https://github.com/aspnet and follow progress on vNext in real-time. You can also send pull requests and contribute to the source code.
- Cloud optimized versions of MVC, Web API, Web Pages, SignalR, and EF. The session state and caching services can be replaced based on whether the app is running in the cloud or in a traditional hosting environment.
- MVC, Web API, and Web Pages merged into one framework (MVC6). MVC and Web API have been merged into a single programming model. For example, there’s now unified controller, routing, and model binding concepts between them. You can now have a single controller that returns both MVC views and formatted Web API responses, on the same HTTP verb.
- No dependency on System.Web. Typically it consumes 30K memory per request/response. Right now, in MVC 6 consume 2K memory per request-response. It’s too small memory consume.
- New project extension project.json to list all dependencies and a Startup class that replaces global.asax. This makes it easier to open vNext projects outside of Visual Studio so that you can edit them using any editor such as Notepad etc. You can even edit ASP.Net Core projects in the cloud.
- Cloud ready by design. Session state and caching adjust behavior depending on hosting environment.
Host agnostic in the same manner as Katana and OWIN. Applications written using ASP.Net Core 1.0 only know about a host abstraction layer, such as the IApplicationBuilder (formerly IBuilder) interface.
- Cloud ready by design. Session state and caching adjust behavior depending on hosting environment.
- Host agnostic in the same manner as Katana and OWIN. Applications written using ASP.Net Core 1.0 only know about a host abstraction layer, such as the IApplicationBuilder (formerly IBuilder) interface. Applications do not talk directly to the web server. Much of this abstraction is done through “feature interfaces” so that some servers can implement features and others can choose not to.
- True Side-by-side deployment. Just upload dependencies to the bin directory without affecting other apps on same server.
- Dependency Injection is built into .Net Core and is consistent across the stack. All of the .Net Core components such as MVC, Web API, SignalR, EF and Identity will use the same DI. This will allow us to provide the right set of services based on the environment that you are running in.
- Roslyn compiler for dynamic code compilation. Edit code and see changes without having to rebuild.
- Open source and cross-platform (can work on Mono, Mac, Linux, etc). Includes an active collaboration with Xamarin to ensure that cloud-optimized .NET applications can run on Mac or Linux on top of the Mono runtime.
- Version of .NET Framework Side by side support. When targeting the Cloud optimized mode in .Net Core, ASP.Net Core will let you deploy any other version of .NET Framework. Since now the .Net Core Framework can be deployed with the app, each app can run different versions of .Net Core side-by-side and upgrade separately, all on the same machine.
- More Enhancement for developer In ASP.Net Core, you can now edit your code files and refresh the browser to see the changes without explicitly building your app. You can also edit your application outside of Visual Studio.
- .Net Core will ship as NuGet packages. NuGet packages will also be the unit of reference in your application. NuGet packages and libraries references will be treated the same so it will be easier to manage the references in your project. In the previous versions of ASP.NETfeatures such as HttpContext, Session, Caching, and Membership were baked into the framework. As an app developer now if you do not need these features then you can choose not to bring it into your app.
- New Configuration. There is a new configuration system which can read values from environment variables. This configuration provides a unified API system for accessing configuration values. You can use the same APIs to access configuration values locally or in Azure.
Unleash the power and new features of .net for a better user friendly product or service.
Happy programming. :)