Get Ready for ASP.NET 5 with Some Exciting New Features!!
Microsoft’s flagship product ASP.NET framework has proved to be successful since its launch as it’s user-friendly and has powerful features. Continuous efforts have been put in by Microsoft to bring enhancements in its features so as to fit the changing business requirements. The latest version of .NET framework – ASP.NET 5 which represents the full reimagining of the framework is an effort towards the same. The purpose is to create modern applications for both cloud and local servers and simplify the development process. Here is a one-by-one walk-through of the new features of ASP.NET vNext.
MVC, Web API and Web Pages MergedIn ASP.NET 5, MVC, Web API and Web Pages have been bundled together into a single framework i.e. MVC 6. Prior to ASP.NET 5 the features of all three of them coincided, their implementation however being separate. The new approach eliminates duplication from the framework and makes it easier for developers to design apps that use these three frameworks. They are therefore not required to write different code irrespective of whether they are within MVC, Web API or Web Pages context.
Use of Different .NET Framework SimultaneouslyWhen your application is dependent on a particular version of .NET, all your apps have to be run on the same version of the framework. You might have been apprehensive about upgrading to new version of .NET due to uncertainty about your legacy apps not working properly on the upgraded framework. To overcome this, ASP.NET 5 allows you to define the dependencies within your deployment package. This will give you advantages of the latest releases for some apps while allowing you to stay with an older version for your legacy applications. Thus it supports side-by-side deployment where you can run different version of the framework simultaneously without facing any problem.
Capability to Self-Host or Host on IISASP.NET gives the flexibility of hosting your application either on IIS or self-hosting it in a custom process. By targeting the Core CLR, application can be deployed with all dependencies tied together within the deployment package. This is the reason why your application and its dependencies are complete in themselves and no longer require dependency on system installation of .NET. Due to this, you can run your application on any type of device or hosting platform. You will not have to decide which development framework to use based on your hosting and vice-versa.
New Flexible & Cross-Platform RuntimeEarlier, the .NET Framework used to be delivered as one single installation with new features being incorporated with every release without removing any, leading to a steady increase in the size of framework. This was followed solely to ensure that .NET installed Windows system supports all .NET applications. But there were chances of every application not using all the features installed as well. Thus to overcome this, ASP.NET 5 will provide improved flexibility, consisting of three different runtime environments:
- Full .NET CLR: This is the default runtime which provides the entire API set. It will be the best option if you are looking for compatibility of your previous application with ASP.NET.
- Core CLR (Cloud Optimized CLR): This is a modular runtime which gives flexibility of incorporating only those features which you require in your application, being added as NuGet packages. Your application is thus dependent only on the features you need. The Core CLR is about 11 MBs which is very less as compared to full .NET CLR which is 200 MBs. All components get updated on their own as per their schedule. Different Core CLR versions can run simultaneously and can be installed with your application.
- Cross Platform CLR: This runtime will help you to develop and run .NET apps on Mac and Linux OS supported devices. Until this runtime comes to you, Mono community can be utilized for cross – platform development.