ASP.NET Core Introduction

.NET Core is a new version of the .NET Framework, is the first application development box capabilities developed by Microsoft cross-platform (Windows, Mac OSX, Linux)

Microsoft ASP.NET Core is a new development, Web development framework based on .NET Core

ASP.NET Core is a redesign of ASP.NET, become fast, flexible, modern, and can work across different platforms.

If you've been exposed to ASP.NET, MVC or had any experience Web API, then you will have a very strong sense of familiarity.

In this tutorial, we will learn how to use ASP.NET Core to develop web applications, create, edit, and view all data in the database

A Brief History of ASP.NET

ASP.NET design the beginning, the Web was born, and since then, this framework has undergone a steady evolution, and eventually leads us to the latest version of ASP.NET Core 2.1

Evolution of ASP.NET, in fact, is the full version history of the evolution of a Web framework, but also the history of the past so many years of the Internet

  1. ASP.NET Core 2.1 is not a continuation of ASP.NET 4.x, or say, ASP.NET Core 1.0 is not a continuation of ASP.NET 4.6

  2. ASP.NET Core is a new Web framework, its parallel development with ASP.NET

  3. ASP.NET Core ASP.NET is redesigned, smaller, more modular

  4. While many see the familiar figure of ASP.NET from the ASP.NET Core, but this is not exactly the same, ASP.NET Core is a significant change to the ASP.NET environment
     

    What is ASP.NET Core?

    ASP.NET Core is a created by Microsoft for building web applications, API, web services framework for micro. It uses the common patterns, such as MVC (Model-View-Controller), dependency injection, and a request processing line constituted by the middleware. It is based on the open source Apache 2.0 license, that is to say, the source code is freely available, and welcome community members to defect mode fixes and new features submitted contributions.

    ASP.NET Core runs on Microsoft's .NET runtime library, similar to the Java Virtual Machine (JVM) or Ruby interpreter. There are several languages ​​(C #, Visual Basic, F #) can be used to write ASP.NET Core program. C # is the most common choice, I will adopt it in this book. You can build and run ASP.NET Core applications on Windows, Mac, and Linux.
     

ASP.NET Core benefits

ASP.NET Core has the following advantages:

  1. ASP.NET Core has a lot of architectural changes, these changes make ASP.NET Core leaner and more modular

  2. Modular design, such that ASP.NET Core no longer based System.Web.dll, but based on a set of fine and fully consider the NuGetpacket

  3. ASP.NET Core allows us to optimize the application, the package contains only the necessary NuGet

  4. More streamlined application can bring greater security, less maintenance, better performance and lower cost

Use ASP.NET Core, we can obtain the following benefits:

  1. ASP.NET applications can be built on Windows, Mac and Linux and cross-platform operation

  2. Use ASP.NET Core to build and run in parallel version of the application

  3. The new tool simplifies the development of modern Web applications

  4. Web UI and Web API to build a unified manner

  5. Cloud environment configuration

  6. Built-dependency injection

  7. Razor makes the tag closer to the tag of the HTML assistant Soundtrack

  8. That application can run on IIS, you can run in its own process

     

    And a web framework, demand what?

    Existing web framework has a lot of options: Node / Express, Spring, Ruby on Rails, Django, Laravel etc, are numerous. ASP.NET Core what merit it?

  • Speed ASP.NET Core quickly. Because .NET Core is compiled to run, perform faster than interpreted languages, such as JavaScript or Ruby, ASP.NET Core has been specifically optimized for multithreaded and asynchronous tasks. Compared with the use of code written in Node.js, execution speed is 5-10 times higher than normal.

  • Eco ASP.NET Core may inexperienced, but .NET already tried and tested. There are thousands of packages on NuGet (.NET package management system, similar npm, Ruby gems, or Maven). There are ready-made packages can be used to complete the anti-JSON serialization, database connectivity, PDF generation, or almost any need you can think of.

  • Security of Microsoft's development team is focused on security, it is to build a complete security of ASP.NET Core. It has been automatically handle the cleanup input data and cross-domain request forgery (CSRF), you do not have to worry about that. You also enjoy the advantages of static type checking .NET compiler, which is like a vigilant, and some obsessive-compulsive disorder reviewers. Thus, when using a variable or some data errors that unconscious on Chachinantao.

  • For comparison, here to point out that, .NET Framework is to achieve another .NET standard, it only runs on Windows. Before appeared in the .NET and .NET Core into Mac and Linux, it is the only .NET runtime library. ASP.NET Core can be run on a dedicated Windows .NET Framework, but I will not get involved in this topic.

    If you have been confused by these names, do not worry! We will soon write code practice.
     

    .NET and .NET Core Standards

    You may also have heard .NET and .NET Core standards, which named some confusion, so this made a brief doubts:

    .NET Standard is a platform-independent interface, which defines the features and API. It is worth noting, .NET standard is not equivalent to any actual code, or functionality, is only defined API. Existing standard .NET several different "versions" or level, reflecting the API provides a number of (or API breadth covered). Such as the number of standard .NET API 2.0 1.5 multiple than the standard .NET, which surpasses the API standard .NET more than 1.0.

    .NET Core is installed on Windows, Mac or Linux .NET runtime library. It on each operating system, using the corresponding native code implemented in the API defined in the standard .NET. You will want to install it on your machine, used to build and run ASP.NET Core applications.
     

    Compared with the .NET Framework .NET Core benefits include: cross-platform, improve performance, parallel version control, new API, open source. Currently NET Framework will not be replaced .NET Core. Core will attempt to narrow the gap between the two in the realization of, the following table compares the ASP.NET Core and ASP.NET 4.x:

    ASP.NET Core ASP.NET 4.x
    Be generated for Windows, macOS or Linux Be generated for Windows
    Razor page is the recommended method to use when creating Web UI in ASP.NET Core 2.x and later Using Web Forms, SignalR, MVC, Web API, WebHooks or website
    Multiple versions of each computer Each version of a computer
    4.x higher performance than ASP.NET Good performance
    When you select to run .NET Framework or .NET Core When run using the .NET Framework


    The use of scenarios

        (1) Under what circumstances require .NET Core comprising: a cross-platform user needs, the user is micro-oriented service, the user is using Docker containers, require high performance and scalable system, the application provides a parallel basis having .NET version.

        (2) using the .NET Framework, including under what circumstances: the current use .NET Framework (recommended extension rather than migrate), is not available for .NET Core third-party .NET libraries or NuGet package is not available for .NET Core of. NET technology, .NET Core platform is not supported.

         .NET technology is not available for .NET Core include: ASP.NET Web form can not be used to achieve a WCF service (in the future will consider implementing the Core), workflow-related services.

     

    Welcome to add a personal Micro Signal: Like if thoughts.

    I welcome the attention of the public numbers, not only recommend the latest blog for you, there are more surprises waiting for you and resources! Learn together and common progress!

 

Guess you like

Origin www.cnblogs.com/cool2feel/p/11422754.html