Blog Post Thumbnail

ASP.NET Core 2.0 Tutorial


ASP.Net Core is Microsoft next generation framework to develop web and mobile applications. So let’s get some understanding dot net core before touching asp.net core. .Net Core is a free open-source and cross-platform framework. For a long time, Microsoft wanted to extend its umbrella beyond Windows, in this context emergence of .NET core is one of the greatest transitions since the inception of .NET. Besides portability open source is another salient feature of .Net core, most of the web platforms are already open source. MS had already started its transition towards open source when it open source the ASP.NET MVC and now by open source the whole framework from top to bottom it fully achieved this milestone as well. It is with better support and more targeted framework for mobile apps.
It that can be taken (features wise) as a subset of ".NET Framework". It is redesigned as cross-platform, based on CoreCLR that is the complete cross-platform implementation of CLR. Has its own improved JIT. It is being taken as future of .Net. It is more scalable, modular and faster than .Net Framework for loosely coupled and component-based system.

Dot Net Core Limitation

  • There are be many third party components that are easily used by .Net Framework but cant be integrated with .Net Core.
  • Code in .Net Core may come across a lot of break and fix as it is not fully matured framework yet.
  • There are thing supported in .Net Framework but not in .Net Core like Web Forms, WPF and WF etc.
  • WCF services can be consumed but cannot be implemented
ASP.NET Core Using Recommendations:
 
Right now as it is relatively less matured as compared to .Net Framework so recommended for the projects where experiments are acceptable and rush development is not required or want to target the app for different platforms(CPUs & OS) like windows, Linux mac etc. .Net Framework is still recommended for highly ui centered, third party dependent and coupled applications.

ASP.NET core:

ASP.NET core can be based on .NET Core or .Net Framework, in fact, it is renamed form of ASP.NET 5. Some of its salient features are as following
 
  • It unifies both MVC and WEB API in a single programming model, which both were separate in simple ASP.NET with redundant overlapping features.
  • Its application structure is a new folder wwwroot for all type of static files.
  • It provides built-in dependency injection framework with Singleton, Scoped, Transient and Instance lifetime modes
  • Here project file extension is xproj.
  • Bin directory not placed at root but in artifact directory.
  • An asp.net core project by default has a file appsettings.json that contain application-level settings that were previously stored in web.config. Apart from json asp.net core support XML and .ini files as well.
  • Has better support to integrate client-side frameworks.
  • It can be hosted in IIS or self-host in own process, in fact, all asp.net core applications basically are console apps & in the startup method (Main) using web host application is hosted 
  • In ASP dot net core a Startup class is introduced which act to perform bootstrap operations just as global.asax in classic ASP dot net that contains entry-level functionality`
  • ASP.NET Core is with improved request pipeline, using middleware’s in place of classic asp.net Modules and filters in MVC. Middleware assists in plug and play features
  • Built-in client-side package manager bower
  • ASP.NET Core uses project.json file to maintain project configuration settings like nugget packages using or target framework etc. 
  • A new lightweight, redesigned Kestrel web server is there with non-blocking network support and better asynchronous programming models make asp.net core application quite faster
  •  It supports multiple environments and development mode
 
.Net core 2.0 has come to the market a few months back with enhancements like faster than the earlier version, build applications using command line console, enhanced support of serialization, networking, IO & threading support and extended language support etc.
 

 

Comments

Leave a comment

 
 


Related Articles