30
May
2018
7 Top features to build better applications with ASP.NET Core 2.0

Developers constantly willing for the open source platform and cross-platform for building the applications for mobile, desktop or web without the constraints. Yes ASP.NET is now ASP.NET Core offering the best of the favorable features for developers, and with updates now it is to ASP.NET Core 2.0.

asp dot net core 2.0

Back in August, Microsoft announced a newer version of .NET Core along with ASP.NET Core named it ASP.NET Core 2.0. It is a package of amazing and outstanding features and functionalities that have boosted the performance by 20% and even raise the productivity. This results in letting the application be more reliable and robust.

Please note the prerequisites pointers – Visual Studio 2017 version 15.3 can be used to create the application based on ASP.NET Core 2.0 and even .NET Core SDK 2.0 can be downloaded for feasibility.

Let’s start exploring top 7 features of ASP.NET Core 2.0 -

  1. Minimum Code

    For an ASP.NET developer, smarter is to achieve the task by writing few lines of code for any of the module. By using ASP.NET Core earlier version, it was in need to set up web server – Kestrel, current directory, and if IIS is required then that too in the Main method. But with ASP.NET Core 2.0 this setup can be handled in CreateDefaultBuilder method automatically. Program.cs class has the minimum lines of code now with this version.

    Code Comparison –

    ASP.Net Core 1:

    public class Program
        {
            public static void Main(string[] args)
            {
                var host = new WebHostBuilder()
                    .UseKestrel()
                    .UseContentRoot(Directory.GetCurrentDirectory())
                    .UseIISIntegration()
                    .UseStartup()
                    .CaptureStartupErrors(true)
                    .UseSetting("detailedErrors", "true")
                    .Build();
     
                host.Run();
            }
        }

    ASP.Net Core 2:

    public class Program
        {
            public static void Main(string[] args)
            {
                var logger = NLog.LogManager.GetCurrentClassLogger();
                BuildWebHost(args).Run();
            }
     
            public static IWebHost BuildWebHost(string[] args) =>
                WebHost.CreateDefaultBuilder(args)
                .UseStartup()
                .ConfigureLogging(logging =>
                {
                    logging.ClearProviders();
                    logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
     
                })
                .UseDefaultServiceProvider(options => options.ValidateScopes = false)
                .Build();
        }
  2. SPA Template

    Angular 4, React.js and Knockout.js with Redux are no more the unaware terminologies, for better performance and flexibility, these are commonly used now. ASP.NET Core 2.0 SPA template is the sum up of all of them, where Angular 4 and React are executed in all the required pages. By using NPM, all the needed packages are automatically installed. No more to worry about installing the angular and typescript, as the packages are installed in the ready-made project, just to kick start from the coding.

  3. csproj Project Files

    A considerably notable big difference is with the project files. The older xproj project is now replaced with csproj. Instead of traditional csproject, Visual Studio was using xproj and project.json files, the updated file format is pretty simpler now by utilizing .NET tools like MSBuild.

  4. Razor View Engine with Roslyn and Razor Pages

    With Razor pages to create the dynamic pages for the web application is now possible. Rather it is more amenable as it caters features like Layout Pages, Partials Pages, Tad Helpers, Templates, code-behind page, directive etc. Although it does not follow the MVC standard pattern now and nor even uses the controller for view [.cshtml page]. Roslyn compilers and C# 7.1 features are now supported with ASP.NET Core 2.0 along with Razor View Engine .

  5. Visual Basic for .NET Core

    Visual Basic is now the part of .NET Core with the release of the newer version. With the deprecation of project.json, to perform the multi-targeting of frameworks and Visual Studio Ul, it has absolutely changed in Visual Studio 2017. One framework can be comfortably targeted within the project properties.

  6. Expanded OS Support, Meta Packages and Runtime Store

    The biggest goal of portability of .NET Core across various operating systems, desktops, servers and mobile has been fulfilled with the continuous Microsoft community support. Now Linux, Windows and macOS is treated as an individual Operating System.

    asp dot net solution explorer

    By expanding the reference section, all the relevant packages are already referred to the meta package. This can be clearly be seen in the attached screenshot.

    asp dot net solution explorer 2

  7. Expanded APIs and Ability to Reference Full Framework Libraries

    The set of APIs has now broadened the scope by including almost all the missing ones. More than 32000 APIs are now supported, which makes easier to port the code to the standard library without the major modifications in the code. Also, the problem of compatibility with third-party libraries is resolved with the new compatibility shim added to enable the full framework library reference,

    Microsoft team while the announcement indicated that – “Of course, this will only work for cases where the .NET Framework library uses APIs that are available for .NET Standard. That’s why this isn’t the preferred way of building libraries you intend to use across different .NET platforms. However, this compatibility shim provides a bridge that enables you to convert your libraries to .NET Standard without having to give up referencing existing libraries that haven’t been converted yet.”

Output of .Net Core 2.0

By using ASP.NET development Core Web Server option, it is easier to trace the application, as it shows how the application got started and got further rendered on the browser. Right from start to execution, each phase of information is clearly depicted here.

asp dot net core 2.0 output

20
Feb
2017
Software Development using Microsoft Technologies

Developing software using Microsoft technologies is still very relevant despite the failures of some of its technologies. The giant company has billions of cash and millions of customers that require technologies for developing software solutions.

The practice of software development integrates Microsoft apps, development tools and operating systems, which enable a secure and robust environment for organizations. Expertise with Microsoft technologies allow one to develop and deploy world-class enterprise solutions.

06
Feb
2017
The demand for Microsoft .Net Development Today

Software development companies as well as individual developers develop apps for both software and the web using the .NET framework. Microsoft .NET development has been around for years and continues to be in demand to create seamless and effective solutions that meet various business requirements.

17
Aug
2016
Microsoft .NET framework powers Enterprise Systems worldwide

The .NET framework powers numerous enterprise applications worldwide, like government, transit, hospital systems, flow of worldwide news and media and many other. If one’s focus is reliability and flexibility, then Microsoft’s .NET would give a site, product or application the portability desired. Most organizations and businesses, across the board, still are heavy users of Microsoft .NET Framework as a basis for most web-based software solution.

06
Apr
2010
What’s New in .NET 4.0 Framework?

In February Microsoft published the Release Candidate (RC) of its .NET Framework 4.0. Microsoft is well known to bring something unimagined to life and put it in public use. And its products have an uncanny knack of generating popularity waves.

18
Dec
2009
Why Hire Dedicated ASP.NET Developers from a Web Development Company

The need for Hire Dedicated ASP.NET Developers is mainly from consulting companies, B2B companies or from organizations that have large project on hand but do not have sufficient resources for developing applications on their own.