.Net Core is a lightweight and cross-platform version of the DotNet framework and the awesome thing is Developers required the same expertise to work with Asp.Net Core as .Net Framework.
With Every Update, new features are added that help developers deploy high-performance & highly scalable web applications using less Code.
Are you a Web Developer or want to Develop an app for Desktop or Mobile, If you are a Game Developer or want to work on Machine Learning, DotNet Core is here for you.
Yes, all these kind of applications can be developed using .Net Core.
Here’s the top .Net Core Features you need to know:
High Performance
Actually, I agree with them who say that performance is one of the critical features of any application. Even in Web Applications, servers with huge resources are available but still, you need to have your application using minimum resources to perform maximum tasks.
Application Performance also depends on how you Code your application but we cannot ignore the Framework Architecture in Performace factor. With the introduction of Asp.net Core and the Kestrel web server, It becomes one of the fastest web application frameworks available.
Cross-platform & Container Support
Mac & Linux users waited so long & after .Net Core launch you can Develop using Microsoft Technologies using on Mac & Linux as well.
Containers are eating the clouds these days. Docker, Kuberenetes and other technologies are all the rage. ASP.NET Core allows developers to utilize all of these new technologies. Microsoft Azure even has support for deploying your application to containers and Kubernetes.
Single Programming Model for MVC and Web API
In MVC 5, controllers inherit from the System.Web.Mvc.Controller base class to serve over HTTP requests whereas Web API 2 controllers inherit from System.Web.Http.ApiController for creating RESTful Web services using JSON & XML.
With ASP.NET Core, MVC and Web API have been merged together. This move was really appreciated by Developers because It made the development simpler.
Dependency Injection
Built-in Dependency Injection is one of the most awesome features of .Net Core.
It is the preferred way for logging contexts, database contexts, and other things passed into your MVC controllers.
SPA Template
Asp.Net Core comes with latest Angular & React SPA Templates. When we create a project using SPA template then all packages required for Angular & React will be installed automatically using NPM.
It also supports Angular CLI that makes developers life easier.
wwwroot Folder for Static Files
In Asp.Net Framework developers create folders for Static Files(Images, CSS, Scripts)with names according to their choices. In Asp.Net Core there’s a default folder as “wwwroot” for all your static files.
Tag Helpers
Tags Helpers Introduced in Asp.net Core to create forms using HTML rapidly.
Here’s some example Code
Globalization and Localization
ASP.NET Core makes it easy to localize dates, numbers, and the text within your web application. If you want your application to be used across the globe, localization will be very important to you.
ASP.NET Core enables customizing your application for multiple languages via resource files. These resource files are considered as the central repository where all texts are kept, and web pages can read this resource file and get labels populated. There are two types of resources:
- Local Resources – specific for a page (i.e., there will be local resource file for every page)
- Global Resources – common for the whole website (i.e., one resource file accessed by all pages)
Cross-Site Request Forgery (CSRF) Protection
Security is important. It is also one of those things that can be a lot of work to prevent certain types of attacks. CSRF is in referencing to hijacking users authenticated session to perform an action that they did not initiate.
For example, let’s pretend that you log in to your bank account and then navigate to a different website. If that other website could do a POST to your bank website to transfer funds, that would be a bad thing. It could potentially do that if your online session on the banking website is valid and the bank does not properly validate requests.
ASP.NET has a good framework that is available to prevent these types of attacks. It generates anti-forgery tokens.
Some Top Features From .Net Framework
Here are some great features which have been developers favorites in .Net era.
WebSockets & SignalR
ASP.NET has first class support for WebSockets. This can be used to persist long running connections and communicate back and forth with the browser. SignalR is a full framework that is also available that makes it easy handle common scenarios.
We use SignalR very heavily, for example, when viewing the current monitoring data about one of your servers, every time we receive new data, we immediately push it to your browser so you can see it update in real time. These types of scenarios are perfect for WebSockets and SignalR makes it easy to do.
Extensible Output Caching
Asp.Net Core also supports Output Cashing, which means application generate cache for the most commonly used resources and static files. Next time when a user opens an application, he first gets served by the cache. This really improves the speed and user experience of a web application.
Action Filters
Action Filters are also supported in .Net Core. Filters are used for Caching, Authorization, Error Handling & for any other Custom Login.
Swagger OpenAPI
Swagger is a 3rd Party Library. It was also available for ASP.NET Framework. It is used to automatically generate Documentation for API. It makes easier for API developers to expose documentation for Front-End Developer.
Conclusion
.Net Core is one of the Top Framework for almost all kind of Applications, for any Device or any size of Application. Microsoft & the Community have done a lot of hard work to make .Net Core a competitive Framework in the Market to help Developers rapidly develop powerful applications with best performance & scalability. The Great thing was that .Net Framework Developers doesn’t require any new knowledge for working on .Net Core. That was also one of the reason that .Net Core was adopted by the Developers in a very short time period.